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>
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,
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);