diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2016-04-13 19:19:02 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-04-21 10:06:00 +0900 |
commit | a6e5b014b8fe0bd4cb1e1ca0380320a200605742 (patch) | |
tree | 963b67c08d45090c768eff28ce8b1b27b3382604 /drivers/staging/greybus/core.c | |
parent | 1ed8cdef405806c246b62a1ba926e0251fdaa531 (diff) |
greybus: core: make the control object be a device
Make the control object be a greybus device.
The control device will be used to expose attributes specific to
greybus-type interfaces.
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/core.c')
-rw-r--r-- | drivers/staging/greybus/core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c index d8680667ca32..9f143e5a7c9c 100644 --- a/drivers/staging/greybus/core.c +++ b/drivers/staging/greybus/core.c @@ -86,6 +86,7 @@ static int greybus_uevent(struct device *dev, struct kobj_uevent_env *env) { struct gb_host_device *hd; struct gb_interface *intf = NULL; + struct gb_control *control = NULL; struct gb_bundle *bundle = NULL; struct gb_svc *svc = NULL; @@ -94,6 +95,10 @@ static int greybus_uevent(struct device *dev, struct kobj_uevent_env *env) } else if (is_gb_interface(dev)) { intf = to_gb_interface(dev); hd = intf->hd; + } else if (is_gb_control(dev)) { + control = to_gb_control(dev); + intf = control->intf; + hd = intf->hd; } else if (is_gb_bundle(dev)) { bundle = to_gb_bundle(dev); intf = bundle->intf; |