summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/core.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2015-11-25 15:59:08 +0100
committerGreg Kroah-Hartman <gregkh@google.com>2015-11-25 15:30:03 -0800
commit88f7b96da75f816ba022190d6076720562cac050 (patch)
tree380477fdbe1cd0abd3c6f3d77ace7784f5e3e178 /drivers/staging/greybus/core.c
parent6106e51b742b32954351e6020cdb789bc33bf120 (diff)
greybus: svc: register svc device at hello
Register the svc device upon reception of the HELLO request. The SVC HELLO request contains the endo id and AP interface id, which will be exposed from the svc device rather than the endo. 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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c
index 8c8ba02b76e9..d1e26c4a26fc 100644
--- a/drivers/staging/greybus/core.c
+++ b/drivers/staging/greybus/core.c
@@ -81,6 +81,7 @@ static int greybus_uevent(struct device *dev, struct kobj_uevent_env *env)
struct gb_module *module = NULL;
struct gb_interface *intf = NULL;
struct gb_bundle *bundle = NULL;
+ struct gb_svc *svc = NULL;
if (is_gb_endo(dev)) {
/*
@@ -99,6 +100,8 @@ static int greybus_uevent(struct device *dev, struct kobj_uevent_env *env)
} else if (is_gb_bundle(dev)) {
bundle = to_gb_bundle(dev);
intf = bundle->intf;
+ } else if (is_gb_svc(dev)) {
+ svc = to_gb_svc(dev);
} else {
dev_WARN(dev, "uevent for unknown greybus device \"type\"!\n");
return -EINVAL;