linux/drivers/leds
Amitoj Kaur Chawla 48a7032ba0 leds: s3c24xx: Use devm_led_classdev_register
Switch to resource-managed function devm_led_classdev_register instead
of led_classdev_register and remove unneeded led_classdev_unregister.

Also, remove unnecessary function pdev_to_gpio, platform_set_drvdata
in the probe function and the remove function, s3c24xx_led_remove as
it is now has nothing to do.

The Coccinelle semantic patch used to make this change is as follows:
//<smpl>
@platform@
identifier p, probefn, removefn;
@@
struct platform_driver p = {
  .probe = probefn,
  .remove = removefn,
};

@prb@
identifier platform.probefn, pdev;
expression e;
@@
probefn(struct platform_device *pdev, ...) {
  ...
  e =
- led_classdev_register
+ devm_led_classdev_register
  (...);
   ...
?- led_classdev_unregister(...);
  ...
}
@remove depends on prb@
identifier platform.removefn;
@@
removefn(...) {
...
?- led_classdev_unregister(...);
...
}
//</smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2016-03-14 09:22:22 +01:00
..
trigger leds: ledtrig-ide-disk: Make the driver explicitly non-modular 2016-01-04 09:57:39 +01:00
Kconfig leds: Add SN3218 and SN3216 support to the IS31FL32XX driver 2016-03-14 09:22:22 +01:00
Makefile leds: Add driver for the ISSI IS31FL32xx family of LED controllers 2016-03-14 09:22:21 +01:00
dell-led.c dell-led: add mic mute led interface 2014-05-08 14:28:07 +08:00
led-class-flash.c leds: flash: Remove checking for state < 1 in flash_strobe_store() 2016-01-04 09:57:37 +01:00
led-class.c leds: core: avoid error message when a USB LED device is unplugged 2016-03-14 09:22:20 +01:00
led-core.c leds: core: add helpers for calling brightness_set(_blocking) 2016-03-14 09:22:21 +01:00
led-triggers.c leds: core: add managed version of led_trigger_register 2016-01-04 09:57:40 +01:00
leds-88pm860x.c leds: 88pm860x: Use devm_led_classdev_register 2016-03-14 09:22:22 +01:00
leds-aat1290.c leds: aat1290: Add missing of_node_put 2016-01-04 09:57:38 +01:00
leds-adp5520.c leds: adp5520: Remove work queue 2016-01-04 09:57:32 +01:00
leds-asic3.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-bcm6328.c leds: bcm6328: improve blink support 2016-01-04 09:57:40 +01:00
leds-bcm6358.c leds: bcm6358: remove unneeded busy status check 2016-01-04 09:57:40 +01:00
leds-bd2802.c leds: bd2802: Remove work queue 2016-01-04 09:57:32 +01:00
leds-blinkm.c leds: blinkm: Remove work queue 2016-01-04 09:57:32 +01:00
leds-clevo-mail.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-cobalt-qube.c leds: leds-cobalt-qube: Use devm_led_classdev_register 2015-11-03 08:59:09 +01:00
leds-cobalt-raq.c drivers/leds: don't use module_init in non-modular leds-cobalt-raq.c 2015-06-22 13:57:09 -07:00
leds-da903x.c leds: da903x: Remove work queue 2016-01-04 09:57:34 +01:00
leds-da9052.c leds: da9052: Remove work queue 2016-01-04 09:57:34 +01:00
leds-dac124s085.c leds: dac124d085: Remove work queue 2016-01-04 09:57:34 +01:00
leds-fsg.c leds: leds-fsg: Use devm_led_classdev_register 2015-08-28 14:06:23 +02:00
leds-gpio-register.c led: gpio: Fix possible ZERO_SIZE_PTR pointer dereferencing error. 2014-09-29 10:21:01 -07:00
leds-gpio.c leds: gpio: Use GPIOF_OUT_INIT_LOW instead of hardcoded zero 2016-03-14 09:22:21 +01:00
leds-hp6xx.c leds: leds-hp6xx: Use devm_led_classdev_register 2015-11-03 08:59:11 +01:00
leds-ipaq-micro.c leds: ipaq-micro: Implement brightness_set_blocking op 2016-01-04 09:57:38 +01:00
leds-is31fl32xx.c leds: Add SN3218 and SN3216 support to the IS31FL32XX driver 2016-03-14 09:22:22 +01:00
leds-ktd2692.c leds: ktd2692: Add missing of_node_put 2016-01-04 09:57:37 +01:00
leds-lm355x.c leds: lm355x: Remove work queue 2016-01-04 09:57:36 +01:00
leds-lm3530.c leds: Drop owner assignment from i2c_driver 2015-08-28 14:06:02 +02:00
leds-lm3533.c leds: lm3533: Use devm_led_classdev_register 2016-03-14 09:22:21 +01:00
leds-lm3642.c leds: lm3642: Remove work queue 2016-01-04 09:57:32 +01:00
leds-locomo.c leds: leds-locomo.c: Use devm_led_classdev_register 2015-11-03 08:59:50 +01:00
leds-lp55xx-common.c leds: lp55xx: Remove work queue 2016-01-04 09:57:33 +01:00
leds-lp55xx-common.h leds: lp55xx: Remove work queue 2016-01-04 09:57:33 +01:00
leds-lp3944.c leds: lp3944: improve wording and formatting in a comment 2016-03-14 09:22:20 +01:00
leds-lp5521.c leds: lp55xx: Remove work queue 2016-01-04 09:57:33 +01:00
leds-lp5523.c leds: lp55xx: Remove work queue 2016-01-04 09:57:33 +01:00
leds-lp5562.c leds: lp55xx: Remove work queue 2016-01-04 09:57:33 +01:00
leds-lp8501.c leds: lp55xx: Remove work queue 2016-01-04 09:57:33 +01:00
leds-lp8788.c leds: lp8788: Use devm_led_classdev_register 2016-03-14 09:22:22 +01:00
leds-lp8860.c leds: lp8860: Remove work queue 2016-01-04 09:57:33 +01:00
leds-lt3593.c leds: lt3593: Remove work queue 2016-01-04 09:57:34 +01:00
leds-max8997.c leds: max8997: Remove unneeded workqueue include 2016-01-04 09:57:35 +01:00
leds-max77693.c leds: max77693: Add missing of_node_put 2016-01-04 09:57:38 +01:00
leds-mc13783.c leds: mc13783: Remove work queue 2016-01-04 09:57:35 +01:00
leds-menf21bmc.c leds: leds-menf21bmc.c: Use devm_led_class_register 2015-11-03 08:59:52 +01:00
leds-net48xx.c leds: leds-net48xx: Use devm_led_classdev_register 2015-11-03 08:59:54 +01:00
leds-netxbig.c leds: netxbig: set led_classdev max_brightness 2015-11-03 08:59:36 +01:00
leds-ns2.c leds: ns2: Remove work queue 2016-01-04 09:57:37 +01:00
leds-ot200.c leds: leds-ot200: Use devm_led_classdev_register 2015-11-03 08:59:13 +01:00
leds-pca955x.c leds: pca955x: Remove work queue 2016-01-04 09:57:33 +01:00
leds-pca963x.c leds: pca963x: Remove work queue 2016-01-04 09:57:34 +01:00
leds-pca9532.c GPIO bulk updates for the v4.5 kernel cycle: 2016-01-17 12:32:01 -08:00
leds-powernv.c leds: powernv: Implement brightness_set_blocking op 2016-01-04 09:57:38 +01:00
leds-pwm.c leds: pwm: fix driver description and make license match the header 2016-01-04 09:57:37 +01:00
leds-rb532.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-regulator.c leds: regulator: Remove work queue 2016-01-04 09:57:35 +01:00
leds-s3c24xx.c leds: s3c24xx: Use devm_led_classdev_register 2016-03-14 09:22:22 +01:00
leds-sead3.c LED/MIPS: Move SEAD3 LED driver to where it belongs. 2015-11-03 08:59:20 +01:00
leds-ss4200.c leds: ss4200: fix attribute-creation race 2014-06-25 15:34:24 -07:00
leds-sunfire.c leds: sunfire: Use platform_register/unregister_drivers() 2016-01-04 09:57:38 +01:00
leds-syscon.c leds: syscon: Make the driver explicitly non-modular 2016-01-04 09:57:39 +01:00
leds-tca6507.c leds: tca6507: use gpiochip data pointer 2016-01-07 00:11:20 +01:00
leds-tlc591xx.c leds: tlc591xx: Remove work queue 2016-01-04 09:57:32 +01:00
leds-versatile.c ARM/leds: move ARM Versatile LED driver to leds subsystem 2014-03-28 10:54:15 +01:00
leds-wm831x-status.c leds: wm831x-status: Use devm_led_classdev_register 2016-03-14 09:22:22 +01:00
leds-wm8350.c leds: wm8350: Remove work queue 2016-01-04 09:57:35 +01:00
leds-wrap.c leds: leds-wrap.c: Use devm_led_classdev_register 2015-11-03 08:59:58 +01:00
leds.h leds: core: Drivers shouldn't enforce SYNC/ASYNC brightness setting 2016-01-04 09:57:31 +01:00