mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
leds: bcm6328, bcm6358: use devres LED registering function
commit ff5c89d44453e7ad99502b04bf798a3fc32c758b upstream. These two drivers do not provide remove method and use devres for allocation of other resources, yet they use led_classdev_register instead of the devres variant, devm_led_classdev_register. Fix this. Signed-off-by: Marek Behún <[email protected]> Cc: Álvaro Fernández Rojas <[email protected]> Cc: Kevin Cernekee <[email protected]> Cc: Jaedon Shin <[email protected]> Signed-off-by: Pavel Machek <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
a908e29705
commit
8ac92a5e5f
2 changed files with 2 additions and 2 deletions
|
|
@ -332,7 +332,7 @@ static int bcm6328_led(struct device *dev, struct device_node *nc, u32 reg,
|
|||
led->cdev.brightness_set = bcm6328_led_set;
|
||||
led->cdev.blink_set = bcm6328_blink_set;
|
||||
|
||||
rc = led_classdev_register(dev, &led->cdev);
|
||||
rc = devm_led_classdev_register(dev, &led->cdev);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ static int bcm6358_led(struct device *dev, struct device_node *nc, u32 reg,
|
|||
|
||||
led->cdev.brightness_set = bcm6358_led_set;
|
||||
|
||||
rc = led_classdev_register(dev, &led->cdev);
|
||||
rc = devm_led_classdev_register(dev, &led->cdev);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue