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

greybus: loopback: fix layer violation

A bundle (protocol) driver has no business creating sysfs entries for an
ancestor device.

Move the sysfs entries to the bundle device for now.
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Reviewed-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent c9e9de26
......@@ -921,7 +921,7 @@ static int gb_loopback_connection_init(struct gb_connection *connection)
struct gb_loopback *gb;
int retval;
char name[DEBUGFS_NAMELEN];
struct kobject *kobj = &connection->hd->endo->dev.kobj;
struct kobject *kobj = &connection->bundle->dev.kobj;
gb = kzalloc(sizeof(*gb), GFP_KERNEL);
if (!gb)
......@@ -1010,7 +1010,7 @@ static int gb_loopback_connection_init(struct gb_connection *connection)
static void gb_loopback_connection_exit(struct gb_connection *connection)
{
struct gb_loopback *gb = connection->bundle->private;
struct kobject *kobj = &connection->hd->endo->dev.kobj;
struct kobject *kobj = &connection->bundle->dev.kobj;
if (!IS_ERR_OR_NULL(gb->task))
kthread_stop(gb->task);
......
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