This adds the GREYBUS_ID environment variable to all interface uevents
to let userspace know the vendor/product id of the module interface that
has been added or removed from the system.
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
if (intf) {
if (add_uevent_var(env, "INTERFACE=%u", intf->interface_id))
return -ENOMEM;
+ if (add_uevent_var(env, "GREYBUS_ID=%04x/%04x",
+ (u16)(intf->vendor_id & 0xffff),
+ (u16)(intf->product_id & 0xffff)))
+ return -ENOMEM;
}
if (bundle) {