diff options
author | Amitoj Kaur Chawla <amitoj1606@gmail.com> | 2016-03-07 14:51:42 (GMT) |
---|---|---|
committer | Jacek Anaszewski <j.anaszewski@samsung.com> | 2016-03-14 08:22:21 (GMT) |
commit | 50154e29e5cc4f0e5f38871f9c90e686bfd09f18 (patch) | |
tree | aea86b09f52934c852498981e538310bbcb54239 /drivers/leds/leds-ipaq-micro.c | |
parent | eae7c98acd13b35bc37608a430086b417b1150fe (diff) | |
download | linux-50154e29e5cc4f0e5f38871f9c90e686bfd09f18.tar.xz |
leds: lm3533: 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.
To be compatible with this change, remove an unnecessary label by
replacing it with direct return statement.
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>
Diffstat (limited to 'drivers/leds/leds-ipaq-micro.c')
0 files changed, 0 insertions, 0 deletions