mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 02:21:16 +00:00
5d33fff5ca
commit 392369019eb96e914234ea21eda806cb51a1073e upstream.
When probing with DT, we add each LED one at a time. If we find a LED
without a PWM device (because it is not available yet) we fail the
initialisation, unregister previous LEDs, and then by way of managed
resources, we free the structure.
The problem with this is we may have a scheduled and active work_struct
in this structure, and this results in a nasty kernel oops.
We need to cancel this work_struct properly upon cleanup - and the
cleanup we require is the same cleanup as we do when the LED platform
device is removed. Rather than writing this same code three times,
move it into a separate function and use it in all three places.
Fixes:
|
||
---|---|---|
.. | ||
trigger | ||
dell-led.c | ||
Kconfig | ||
led-class.c | ||
led-core.c | ||
led-triggers.c | ||
leds-88pm860x.c | ||
leds-adp5520.c | ||
leds-asic3.c | ||
leds-atmel-pwm.c | ||
leds-bd2802.c | ||
leds-blinkm.c | ||
leds-clevo-mail.c | ||
leds-cobalt-qube.c | ||
leds-cobalt-raq.c | ||
leds-da903x.c | ||
leds-da9052.c | ||
leds-dac124s085.c | ||
leds-fsg.c | ||
leds-gpio-register.c | ||
leds-gpio.c | ||
leds-hp6xx.c | ||
leds-lm355x.c | ||
leds-lm3530.c | ||
leds-lm3533.c | ||
leds-lm3642.c | ||
leds-locomo.c | ||
leds-lp55xx-common.c | ||
leds-lp55xx-common.h | ||
leds-lp3944.c | ||
leds-lp5521.c | ||
leds-lp5523.c | ||
leds-lp5562.c | ||
leds-lp8788.c | ||
leds-lt3593.c | ||
leds-max8997.c | ||
leds-mc13783.c | ||
leds-net48xx.c | ||
leds-netxbig.c | ||
leds-ns2.c | ||
leds-ot200.c | ||
leds-pca955x.c | ||
leds-pca9532.c | ||
leds-pca9633.c | ||
leds-pwm.c | ||
leds-rb532.c | ||
leds-regulator.c | ||
leds-renesas-tpu.c | ||
leds-s3c24xx.c | ||
leds-ss4200.c | ||
leds-sunfire.c | ||
leds-tca6507.c | ||
leds-wm831x-status.c | ||
leds-wm8350.c | ||
leds-wrap.c | ||
leds.h | ||
Makefile |