summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-04-28 19:40:27 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2015-04-29 15:48:32 +0200
commit8f8b2297c0a17236ca4b5413e1f737536a8154a1 (patch)
tree268df6ba34156e7300c5e9040406c9e792bf42d2 /drivers
parent58d674650b96d7ae81cda68b0cbf40fb3f9a9726 (diff)
downloadlinux-8f8b2297c0a17236ca4b5413e1f737536a8154a1.tar.bz2
greybus: endo: Rename endo's 'type' as 'id'
There can be three Endo types: mini, medium and large. And that's what Endo 'type' should refer to. But we have named the 16 bit number that uniquely represents a valid endo, as its type. 'id' seems to be a more suitable name to that instead of 'type'. Lets rename it. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/greybus/endo.c18
-rw-r--r--drivers/staging/greybus/endo.h2
2 files changed, 10 insertions, 10 deletions
diff --git a/drivers/staging/greybus/endo.c b/drivers/staging/greybus/endo.c
index b8f6163566be..b9c7ee62456a 100644
--- a/drivers/staging/greybus/endo.c
+++ b/drivers/staging/greybus/endo.c
@@ -82,14 +82,14 @@ static int create_modules(struct gb_endo *endo)
u8 *endo_modules;
int i;
- /* Depending on the endo type, create a bunch of different modules */
- switch (endo->type) {
+ /* Depending on the endo id, create a bunch of different modules */
+ switch (endo->id) {
case 0x4755:
endo_modules = &endo_4755[0];
break;
default:
- dev_err(&endo->dev, "Unknown endo type 0x%04x, aborting!",
- endo->type);
+ dev_err(&endo->dev, "Unknown endo id 0x%04x, aborting!",
+ endo->id);
return -EINVAL;
}
@@ -118,18 +118,18 @@ struct gb_endo *gb_endo_create(struct greybus_host_device *hd)
endo->dev.dma_mask = hd->parent->dma_mask;
device_initialize(&endo->dev);
- // FIXME - determine endo "type" from the SVC
+ // FIXME - determine endo "id" from the SVC
// Also get the version and serial number from the SVC, right now we are
// using "fake" numbers.
strcpy(&endo->svc.serial_number[0], "042");
strcpy(&endo->svc.version[0], "0.0");
- endo->type = 0x4755;
+ endo->id = 0x4755;
- dev_set_name(&endo->dev, "endo-0x%04x", endo->type);
+ dev_set_name(&endo->dev, "endo-0x%04x", endo->id);
retval = device_add(&endo->dev);
if (retval) {
- dev_err(hd->parent, "failed to add endo device of type 0x%04x\n",
- endo->type);
+ dev_err(hd->parent, "failed to add endo device of id 0x%04x\n",
+ endo->id);
put_device(&endo->dev);
kfree(endo);
return NULL;
diff --git a/drivers/staging/greybus/endo.h b/drivers/staging/greybus/endo.h
index 649093e4025d..a4342aaa582b 100644
--- a/drivers/staging/greybus/endo.h
+++ b/drivers/staging/greybus/endo.h
@@ -18,7 +18,7 @@ struct gb_svc {
struct gb_endo {
struct device dev;
struct gb_svc svc;
- u16 type;
+ u16 id;
};
#define to_gb_endo(d) container_of(d, struct gb_endo, dev)