Skip to content

Commit

Permalink
leds: bcm6328, bcm6358: use devres LED registering function
Browse files Browse the repository at this point in the history
commit ff5c89d 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 <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: Pavel Machek <pavel@ucw.cz>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
elkablo authored and gregkh committed Nov 5, 2020
1 parent 3a38676 commit 9767f1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/leds/leds-bcm6328.c
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion drivers/leds/leds-bcm6358.c
Expand Up @@ -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;

Expand Down

0 comments on commit 9767f1d

Please sign in to comment.