From 8ede6e36dfa88a4c0a0e66f34fb177af3beaab8f Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <greg@kroah.com>
Date: Thu, 11 Dec 2014 17:10:57 -0500
Subject: [PATCH] greybus: interface_block: rename the sysfs files to not have
 'module' in them

The sysfs files for an interface block should not have 'module' in them.
This was a hold-over from when we thought we were going to have
all attributes of a "module" in one directory.  Remove the prefix as
it's not needed, and is confusing considering modules can not have
strings or any of these attributes.

Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
---
 drivers/staging/greybus/greybus.h         |  2 +-
 drivers/staging/greybus/interface_block.c |  2 +-
 drivers/staging/greybus/sysfs.c           | 40 +++++++++++------------
 3 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/greybus/greybus.h b/drivers/staging/greybus/greybus.h
index 84516cb60a956..632b1cd2a60be 100644
--- a/drivers/staging/greybus/greybus.h
+++ b/drivers/staging/greybus/greybus.h
@@ -167,7 +167,7 @@ int gb_debugfs_init(void);
 void gb_debugfs_cleanup(void);
 
 extern struct bus_type greybus_bus_type;
-extern const struct attribute_group *greybus_module_groups[];
+extern const struct attribute_group *greybus_interface_block_groups[];
 
 int gb_uart_device_init(struct gb_connection *connection);
 void gb_uart_device_exit(struct gb_connection *connection);
diff --git a/drivers/staging/greybus/interface_block.c b/drivers/staging/greybus/interface_block.c
index 10b3f509773a0..7b18f4855cb5a 100644
--- a/drivers/staging/greybus/interface_block.c
+++ b/drivers/staging/greybus/interface_block.c
@@ -101,7 +101,7 @@ static struct gb_interface_block *gb_ib_create(struct greybus_host_device *hd,
 	gb_ib->dev.parent = hd->parent;
 	gb_ib->dev.bus = &greybus_bus_type;
 	gb_ib->dev.type = &greybus_interface_block_type;
-	gb_ib->dev.groups = greybus_module_groups;
+	gb_ib->dev.groups = greybus_interface_block_groups;
 	gb_ib->dev.dma_mask = hd->parent->dma_mask;
 	device_initialize(&gb_ib->dev);
 	dev_set_name(&gb_ib->dev, "%d", module_id);
diff --git a/drivers/staging/greybus/sysfs.c b/drivers/staging/greybus/sysfs.c
index 28d1b8d83873b..ae44c895760fd 100644
--- a/drivers/staging/greybus/sysfs.c
+++ b/drivers/staging/greybus/sysfs.c
@@ -20,37 +20,37 @@
 #include "kernel_ver.h"
 
 /* Module fields */
-#define gb_module_attr(field, type)					\
-static ssize_t module_##field##_show(struct device *dev,		\
+#define gb_ib_attr(field, type)					\
+static ssize_t field##_show(struct device *dev,		\
 				     struct device_attribute *attr,	\
 				     char *buf)				\
 {									\
 	struct gb_interface_block *gb_ib = to_gb_interface_block(dev);	\
 	return sprintf(buf, "%"#type"\n", gb_ib->field);		\
 }									\
-static DEVICE_ATTR_RO(module_##field)
-
-gb_module_attr(vendor, x);
-gb_module_attr(product, x);
-gb_module_attr(unique_id, llX);
-gb_module_attr(vendor_string, s);
-gb_module_attr(product_string, s);
-
-static struct attribute *module_attrs[] = {
-	&dev_attr_module_vendor.attr,
-	&dev_attr_module_product.attr,
-	&dev_attr_module_unique_id.attr,
-	&dev_attr_module_vendor_string.attr,
-	&dev_attr_module_product_string.attr,
+static DEVICE_ATTR_RO(field)
+
+gb_ib_attr(vendor, x);
+gb_ib_attr(product, x);
+gb_ib_attr(unique_id, llX);
+gb_ib_attr(vendor_string, s);
+gb_ib_attr(product_string, s);
+
+static struct attribute *interface_block_attrs[] = {
+	&dev_attr_vendor.attr,
+	&dev_attr_product.attr,
+	&dev_attr_unique_id.attr,
+	&dev_attr_vendor_string.attr,
+	&dev_attr_product_string.attr,
 	NULL,
 };
 
-static struct attribute_group module_attr_grp = {
-	.attrs =	module_attrs,
+static struct attribute_group interface_block_attr_grp = {
+	.attrs =	interface_block_attrs,
 };
 
-const struct attribute_group *greybus_module_groups[] = {
-	&module_attr_grp,
+const struct attribute_group *greybus_interface_block_groups[] = {
+	&interface_block_attr_grp,
 	NULL,
 };
 
-- 
2.30.2