From: Johan Hovold Date: Fri, 4 Dec 2015 09:44:24 +0000 (+0100) Subject: greybus: core: add bundle id to bundle uevents X-Git-Tag: v5.15~12752^2~378^2~21^2~963 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c29c016f7e41404aa7288aad8088162cac291594;p=platform%2Fkernel%2Flinux-starfive.git greybus: core: add bundle id to bundle uevents Add the bundle id to bundle uevents. This is needed to identify bundles that are being removed (e.g. at hot-unplug). Signed-off-by: Johan Hovold 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 4ec7988..209e1cd 100644 --- a/drivers/staging/greybus/core.c +++ b/drivers/staging/greybus/core.c @@ -112,7 +112,9 @@ static int greybus_uevent(struct device *dev, struct kobj_uevent_env *env) // add a uevent that can "load" a bundle type // This is what we need to bind a driver to so use the info // in gmod here as well - return 0; + + if (add_uevent_var(env, "BUNDLE=%u", bundle->id)) + return -ENOMEM; } return 0;