From: Greg Kroah-Hartman Date: Fri, 22 Jan 2016 02:13:41 +0000 (-0800) Subject: greybus: add bundle class to the bundle uevent X-Git-Tag: v4.14-rc1~2366^2~378^2~21^2~779 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6ce4cc278deca9849bd54783294be7edbe24bac0;p=platform%2Fkernel%2Flinux-rpi.git 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 Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c index 522d059..1bb685b 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;