greybus: interface: add interface_id attribute
authorJohan Hovold <johan@hovoldconsulting.com>
Wed, 25 Nov 2015 14:58:58 +0000 (15:58 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 25 Nov 2015 23:27:06 +0000 (15:27 -0800)
Add interface_id attribute that user space needs to identify an
interface.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/interface.c

index 4ed782e6c7b0cc5cbdacfdf77fe096c7efc87e5b..b5d9046ead443afcf88167e65234c260fcf71677 100644 (file)
@@ -20,12 +20,14 @@ static ssize_t field##_show(struct device *dev,                             \
 }                                                                      \
 static DEVICE_ATTR_RO(field)
 
+gb_interface_attr(interface_id, u);
 gb_interface_attr(vendor_id, x);
 gb_interface_attr(product_id, x);
 gb_interface_attr(vendor_string, s);
 gb_interface_attr(product_string, s);
 
 static struct attribute *interface_attrs[] = {
+       &dev_attr_interface_id.attr,
        &dev_attr_vendor_id.attr,
        &dev_attr_product_id.attr,
        &dev_attr_vendor_string.attr,