Hi! > If the trigger with given configuration cannot be offloaded, the method > should return -EOPNOTSUPP, in which case the trigger must blink the LED > in SW. > > Signed-off-by: Marek Behún > + > +If the second argument (enable) to the trigger_offload() method is false, any > +active HW offloading must be deactivated. Are errors permitted in the "disable" case? > +static inline void led_trigger_offload_stop(struct led_classdev *led_cdev) > +{ > + if (!led_cdev->trigger_offload) > + return; > + > + if (led_cdev->offloaded) > + led_cdev->trigger_offload(led_cdev, false); > +} Set offloaded to false? Let me check the rest to decide if this makes sense. Best regards, Pavel -- http://www.livejournal.com/~pavelmachek