leds: oneshot trigger: simplifications from core changes
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 2 Jul 2018 20:05:29 +0000 (22:05 +0200)
committerJacek Anaszewski <jacek.anaszewski@gmail.com>
Thu, 5 Jul 2018 21:21:13 +0000 (23:21 +0200)
commit81d5533297fb672012bb298c1f7545f9c168ccb0
tree095e181b2ca8d515f5b051cb81c414f70d4eb821
parent823f786ac7615f1bf822227fc4cbeafe11fb6bf8
leds: oneshot trigger: simplifications from core changes

The trigger core learned error handling for the activate callback and
can handle device attributes now. This allows simplifying the driver
considerably. Note that .deactivate() is only called when .activate()
succeeded, so the check for .activated can go away in .deactivate().

Also make use of module_led_trigger() and do some minor coding style
improvements.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
drivers/leds/trigger/ledtrig-oneshot.c