Commit f865734d authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

greybus: light: fix class-device parent

Greybus bundle drivers should register their class devices as children
to the bundle device that they bind to.
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent cd414d47
...@@ -724,8 +724,7 @@ static int __gb_lights_flash_led_register(struct gb_channel *channel) ...@@ -724,8 +724,7 @@ static int __gb_lights_flash_led_register(struct gb_channel *channel)
goto fail; goto fail;
} }
ret = led_classdev_flash_register(&connection->bundle->intf->dev, ret = led_classdev_flash_register(&connection->bundle->dev, fled);
fled);
if (ret < 0) if (ret < 0)
goto fail; goto fail;
...@@ -812,8 +811,7 @@ static int __gb_lights_led_register(struct gb_channel *channel) ...@@ -812,8 +811,7 @@ static int __gb_lights_led_register(struct gb_channel *channel)
struct led_classdev *cdev = get_channel_cdev(channel); struct led_classdev *cdev = get_channel_cdev(channel);
int ret; int ret;
ret = led_classdev_register(&connection->bundle->intf->dev, ret = led_classdev_register(&connection->bundle->dev, cdev);
cdev);
if (ret < 0) if (ret < 0)
channel->led = NULL; channel->led = NULL;
else else
......
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