summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@google.com>2016-02-26 21:54:38 -0800
committerGreg Kroah-Hartman <gregkh@google.com>2016-02-26 21:57:03 -0800
commit611924dd72594200ac55957b4e68b0a65bab143b (patch)
tree3bade5eb495903a7e01739a916b974f2c1713efb /drivers/staging
parentfb37f137b78f186275b15e8ce1e5a26b51a6e6ad (diff)
greybus: expose full 32 bits of vid/pid to userspace
Now that userspace is ready for all 32 bits of the vid/pid, take off our mask and send the full values. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/greybus/core.c5
-rw-r--r--drivers/staging/greybus/interface.c25
2 files changed, 4 insertions, 26 deletions
diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c
index 2fb95744e01c..ca7469ee8994 100644
--- a/drivers/staging/greybus/core.c
+++ b/drivers/staging/greybus/core.c
@@ -112,9 +112,8 @@ static int greybus_uevent(struct device *dev, struct kobj_uevent_env *env)
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)))
+ if (add_uevent_var(env, "GREYBUS_ID=%08x/%08x",
+ intf->vendor_id, intf->product_id))
return -ENOMEM;
}
diff --git a/drivers/staging/greybus/interface.c b/drivers/staging/greybus/interface.c
index 5e49bc826fe7..2f3966f319bc 100644
--- a/drivers/staging/greybus/interface.c
+++ b/drivers/staging/greybus/interface.c
@@ -23,33 +23,12 @@ static DEVICE_ATTR_RO(field)
gb_interface_attr(ddbl1_manufacturer_id, "0x%08x");
gb_interface_attr(ddbl1_product_id, "0x%08x");
gb_interface_attr(interface_id, "%u");
+gb_interface_attr(vendor_id, "0x%08x");
+gb_interface_attr(product_id, "0x%08x");
gb_interface_attr(vendor_string, "%s");
gb_interface_attr(product_string, "%s");
gb_interface_attr(serial_number, "0x%016llx");
-static ssize_t vendor_id_show(struct device *dev,
- struct device_attribute *attr,
- char *buf)
-{
- struct gb_interface *intf = to_gb_interface(dev);
-
- /* clear the upper 16-bits to keep userspace "simple" */
- return scnprintf(buf, PAGE_SIZE, "0x%04x\n",
- (0x0000FFFF & intf->vendor_id));
-}
-static DEVICE_ATTR_RO(vendor_id);
-
-static ssize_t product_id_show(struct device *dev, struct device_attribute *attr,
- char *buf)
-{
- struct gb_interface *intf = to_gb_interface(dev);
-
- /* clear the upper 16-bits to keep userspace "simple" */
- return scnprintf(buf, PAGE_SIZE, "0x%04x\n",
- (0x0000FFFF & intf->product_id));
-}
-static DEVICE_ATTR_RO(product_id);
-
static ssize_t version_show(struct device *dev, struct device_attribute *attr,
char *buf)
{