Skip to content
Commit 199fb21d authored by David Brownell's avatar David Brownell Committed by Richard Purdie
Browse files

leds: bugfixes for leds-gpio



Three bugfixes to the leds-gpio driver, plus minor whitespace tweaks:

 - Do the INIT_WORK() before registering each LED, so if its trigger
   becomes immediately active it can schedule work without oopsing..

 - Use normal registration, not platform_driver_probe(), so that
   devices appearing "late" (hotplug type) can still be bound.

 - Mark the driver remove code as "__devexit", preventing oopses
   when the underlying device is removed.

These issues came up when using this driver with some GPIO expanders
living on serial busses, which act unlike "normal" platform devices:
they can appear and vanish along with the serial bus driver.

Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarRichard Purdie <rpurdie@rpsys.net>
parent c11eef21
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment