From: Johan Hovold Date: Thu, 3 Dec 2015 18:18:04 +0000 (+0100) Subject: greybus: core: add interface id to interface and bundle uevents X-Git-Tag: v5.15~12752^2~378^2~21^2~964 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c5e6b05ce4a18e7d6b73be0579c0698c8cc31b6c;p=platform%2Fkernel%2Flinux-starfive.git greybus: core: add interface id to interface and bundle uevents Add the interface id to interface and bundle uevents. This is needed to identify interfaces that are being removed (e.g. at hot-unplug). Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c index 3d8b7ef..4ec7988 100644 --- a/drivers/staging/greybus/core.c +++ b/drivers/staging/greybus/core.c @@ -102,6 +102,11 @@ static int greybus_uevent(struct device *dev, struct kobj_uevent_env *env) if (add_uevent_var(env, "BUS=%u", hd->bus_id)) return -ENOMEM; + if (intf) { + if (add_uevent_var(env, "INTERFACE=%u", intf->interface_id)) + return -ENOMEM; + } + if (bundle) { // FIXME // add a uevent that can "load" a bundle type