From: Johan Hovold Date: Wed, 11 Nov 2015 09:07:04 +0000 (+0100) Subject: greybus: light: fix class-device parent X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f865734d3cf58cc9aba3f58962fbca7b97fe47d4;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/light.c b/drivers/staging/greybus/light.c index 664be973fa96..3723a2ce29b3 100644 --- a/drivers/staging/greybus/light.c +++ b/drivers/staging/greybus/light.c @@ -724,8 +724,7 @@ static int __gb_lights_flash_led_register(struct gb_channel *channel) goto fail; } - ret = led_classdev_flash_register(&connection->bundle->intf->dev, - fled); + ret = led_classdev_flash_register(&connection->bundle->dev, fled); if (ret < 0) goto fail; @@ -812,8 +811,7 @@ static int __gb_lights_led_register(struct gb_channel *channel) struct led_classdev *cdev = get_channel_cdev(channel); int ret; - ret = led_classdev_register(&connection->bundle->intf->dev, - cdev); + ret = led_classdev_register(&connection->bundle->dev, cdev); if (ret < 0) channel->led = NULL; else