summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/core.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@google.com>2016-01-21 18:13:41 -0800
committerGreg Kroah-Hartman <gregkh@google.com>2016-01-21 22:43:04 -0800
commit6ce4cc278deca9849bd54783294be7edbe24bac0 (patch)
treeb577249f645758280e1a8ef0604cd7241dc8c765 /drivers/staging/greybus/core.c
parent55ec09e898adb43cf69ebd8839e3d5656a0e7345 (diff)
greybus: add bundle class to the bundle uevent
When bundles are added and then removed, we have a race where we go to read the sysfs file, but it is now for a different bundle than the uevent was originally for. So add the bundle class to the uevent so we "know" what the correct bundle class was. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/core.c')
-rw-r--r--drivers/staging/greybus/core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c
index 522d0594eebc..1bb685bae7d2 100644
--- a/drivers/staging/greybus/core.c
+++ b/drivers/staging/greybus/core.c
@@ -125,6 +125,8 @@ static int greybus_uevent(struct device *dev, struct kobj_uevent_env *env)
if (add_uevent_var(env, "BUNDLE=%u", bundle->id))
return -ENOMEM;
+ if (add_uevent_var(env, "BUNDLE_CLASS=%02x", bundle->class))
+ return -ENOMEM;
}
return 0;