Commit ff5c89d4 authored by Marek Behún's avatar Marek Behún Committed by Pavel Machek

leds: bcm6328, bcm6358: use devres LED registering function

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: default avatarMarek Behún <marek.behun@nic.cz>
Cc: Álvaro Fernández Rojas <noltari@gmail.com>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Jaedon Shin <jaedon.shin@gmail.com>
Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
Cc: stable@kernel.org
parent 2c677562
......@@ -383,7 +383,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment