Messages in this thread | | | Date | Tue, 30 Jun 2015 20:30:16 +0200 | From | Pavel Machek <> | Subject | Re: [PATCH/RFC v2 1/5] leds: Use set_brightness_work for brightness_set ops that can sleep |
| |
> > /* Set LED brightness level */ > /* Must not sleep, use a workqueue if needed */ > void (*brightness_set)(struct led_classdev *led_cdev, > enum led_brightness brightness); > - /* > - * Set LED brightness level immediately - it can block the caller for > - * the time required for accessing a LED device register. > - */ > - int (*brightness_set_sync)(struct led_classdev *led_cdev, > - enum led_brightness brightness); > /* Get LED brightness level */ > enum led_brightness (*brightness_get)(struct led_classdev *led_cdev); >
NAK. Feel free to rearrange the code so that driver's work is easier, but keep separate callbacks for "can sleep" and "can not sleep" situations. 4 bytes are not worth the confusion. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
| |