Re: [PATCH leds-next RFC 1/1] led: triggers: add HW LED triggers functionality

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> @@ -49,6 +54,29 @@ ssize_t led_trigger_store(struct device *dev, struct device_attribute *attr,
>  		goto unlock;
>  	}
>  
> +#ifdef CONFIG_LEDS_HW_TRIGGERS
> +	/* check if a hardware LED trigger was selected */
> +	if (!strncmp(buf, "hw:", 3)) {
> +		const char * const *hwtrig;
> +
> +		if (!led_cdev->hw_triggers) {

this should be led_cdev->available_hw_triggers


> @@ -95,6 +135,20 @@ ssize_t led_trigger_show(struct device *dev, struct device_attribute *attr,
>  					 trig->name);
>  	}
>  	up_read(&led_cdev->trigger_lock);
> +
> +#ifdef CONFIG_LEDS_HW_TRIGGERS

> +	for (hwtrig = led_cdev->available_hw_triggers;
> +	     *hwtrig; ++hwtrig) {

             hwtrig && *hwtrig



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux