]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
greybus: light: fix class-device parent
authorJohan Hovold <johan@hovoldconsulting.com>
Wed, 11 Nov 2015 09:07:04 +0000 (10:07 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 11 Nov 2015 17:18:28 +0000 (09:18 -0800)
Greybus bundle drivers should register their class devices as children
to the bundle device that they bind to.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/light.c

index 664be973fa9688f9855f2db781230ff75eb17256..3723a2ce29b3763add47241561326d76e92982f7 100644 (file)
@@ -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