From cd414d472637a30104b4908f5f239f3c06d90fe9 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Wed, 11 Nov 2015 10:07:03 +0100 Subject: [PATCH] greybus: battery: 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 --- drivers/staging/greybus/battery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/greybus/battery.c b/drivers/staging/greybus/battery.c index 6b354de146d1..e119775fb19b 100644 --- a/drivers/staging/greybus/battery.c +++ b/drivers/staging/greybus/battery.c @@ -244,7 +244,7 @@ static int init_and_register(struct gb_connection *connection, gb->bat.num_properties = ARRAY_SIZE(battery_props); gb->bat.get_property = get_property; - return power_supply_register(&connection->bundle->intf->dev, &gb->bat); + return power_supply_register(&connection->bundle->dev, &gb->bat); } #else static int init_and_register(struct gb_connection *connection, @@ -262,7 +262,7 @@ static int init_and_register(struct gb_connection *connection, gb->desc.num_properties = ARRAY_SIZE(battery_props); gb->desc.get_property = get_property; - gb->bat = power_supply_register(&connection->bundle->intf->dev, + gb->bat = power_supply_register(&connection->bundle->dev, &gb->desc, &cfg); if (IS_ERR(gb->bat)) return PTR_ERR(gb->bat); -- 2.20.1