> @@ -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