From 1cd56a80969d7c5cfc74d847c6f81cc2ab8dc829 Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <greg@kroah.com>
Date: Fri, 19 Dec 2014 14:56:36 -0800
Subject: [PATCH] greybus: greybus_host_device: rename modules -> interfaces

This is really a list of interfaces, not modules, so rename it so that
we don't get confused when we really do add modules to the whole system
later on.

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

diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c
index 3e00055bf4ae4..c90f74c7a25ea 100644
--- a/drivers/staging/greybus/core.c
+++ b/drivers/staging/greybus/core.c
@@ -183,7 +183,7 @@ struct greybus_host_device *greybus_create_hd(struct greybus_host_driver *driver
 	kref_init(&hd->kref);
 	hd->parent = parent;
 	hd->driver = driver;
-	INIT_LIST_HEAD(&hd->modules);
+	INIT_LIST_HEAD(&hd->interfaces);
 	INIT_LIST_HEAD(&hd->connections);
 	ida_init(&hd->cport_id_map);
 
diff --git a/drivers/staging/greybus/greybus.h b/drivers/staging/greybus/greybus.h
index 707189286dd93..ced329af2a2d2 100644
--- a/drivers/staging/greybus/greybus.h
+++ b/drivers/staging/greybus/greybus.h
@@ -99,7 +99,7 @@ struct greybus_host_device {
 	struct device *parent;
 	const struct greybus_host_driver *driver;
 
-	struct list_head modules;
+	struct list_head interfaces;
 	struct list_head connections;
 	struct ida cport_id_map;
 	u8 device_id;
diff --git a/drivers/staging/greybus/interface.c b/drivers/staging/greybus/interface.c
index 67b14df8a179f..d4ec7884c01e8 100644
--- a/drivers/staging/greybus/interface.c
+++ b/drivers/staging/greybus/interface.c
@@ -79,7 +79,7 @@ struct gb_interface *gb_interface_find(struct greybus_host_device *hd,
 {
 	struct gb_interface *intf;
 
-	list_for_each_entry(intf, &hd->modules, links)
+	list_for_each_entry(intf, &hd->interfaces, links)
 		if (intf->module_id == module_id)
 			return intf;
 
@@ -147,7 +147,7 @@ static struct gb_interface *gb_interface_create(struct greybus_host_device *hd,
 	}
 
 	spin_lock_irq(&gb_modules_lock);
-	list_add_tail(&intf->links, &hd->modules);
+	list_add_tail(&intf->links, &hd->interfaces);
 	spin_unlock_irq(&gb_modules_lock);
 
 	return intf;
@@ -229,6 +229,6 @@ void gb_remove_interfaces(struct greybus_host_device *hd)
 {
 	struct gb_interface *intf, *temp;
 
-	list_for_each_entry_safe(intf, temp, &hd->modules, links)
+	list_for_each_entry_safe(intf, temp, &hd->interfaces, links)
 		gb_interface_destroy(intf);
 }
diff --git a/drivers/staging/greybus/interface.h b/drivers/staging/greybus/interface.h
index 70dad49ec00b1..5dd2c20dc286c 100644
--- a/drivers/staging/greybus/interface.h
+++ b/drivers/staging/greybus/interface.h
@@ -15,7 +15,7 @@ struct gb_interface {
 	struct device dev;
 
 	struct list_head bundles;
-	struct list_head links;	/* greybus_host_device->modules */
+	struct list_head links;	/* greybus_host_device->interfaces */
 	u8 module_id;		/* Physical location within the Endo */
 
 	/* Information taken from the manifest module descriptor */
-- 
2.30.2