greybus: loopback: move sysfs entries to /sys/bus/greybus/devices/endo0
Currently we have sysfs entries that are created when the first incoming connection is created as sub-nodes of the module associated with that connection e.g. /sys/bus/grebus/devices/endo0:X where X is the module identifier associated with the new connection. This is conceptually incorrect since the sysfs entries we create actually aren't bound to a module. Depending on the order connections are brought up we can also have a situation where /sys/bus/greybus/devices/endo0:X has high-level control sysfs data-points but /sys/bus/greybus/devices/endo0:Y does not. Rather than needlessly replicate data-points across each endo0:X, endo0:Y, endo0:Z sysfs directories it is more sensible to locate the entries in /sys/bus/greybus/devices/endo0. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Patrick Titiano <ptitiano@baylibre.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
6872c46129
commit
f01f7a9851
@ -874,7 +874,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->bundle->intf->module->dev.kobj;
|
||||
struct kobject *kobj = &connection->hd->endo->dev.kobj;
|
||||
|
||||
gb = kzalloc(sizeof(*gb), GFP_KERNEL);
|
||||
if (!gb)
|
||||
@ -963,7 +963,7 @@ out_sysfs:
|
||||
static void gb_loopback_connection_exit(struct gb_connection *connection)
|
||||
{
|
||||
struct gb_loopback *gb = connection->private;
|
||||
struct kobject *kobj = &connection->bundle->intf->module->dev.kobj;
|
||||
struct kobject *kobj = &connection->hd->endo->dev.kobj;
|
||||
|
||||
if (!IS_ERR_OR_NULL(gb->task))
|
||||
kthread_stop(gb->task);
|
||||
|
Loading…
x
Reference in New Issue
Block a user