OSDN Git Service

greybus: endo: rename gb_svc
authorAlex Elder <elder@linaro.org>
Fri, 22 May 2015 14:52:42 +0000 (09:52 -0500)
committerGreg Kroah-Hartman <gregkh@google.com>
Sat, 23 May 2015 23:31:42 +0000 (16:31 -0700)
Change the name of "struct gb_svc" to be "struct svc_info".  The
structure now contains only the SVC's serial number and version (and
are place holders anyway).  We will be defining a structure that
represents the SVC for the SVC protocol connection, and I want to
take back that name.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/endo.c
drivers/staging/greybus/endo.h

index 42f26f0..859c9c5 100644 (file)
@@ -35,7 +35,7 @@ static ssize_t serial_number_show(struct device *dev,
 {
        struct gb_endo *endo = to_gb_endo(dev);
 
-       return sprintf(buf, "%s", &endo->svc.serial_number[0]);
+       return sprintf(buf, "%s", &endo->svc_info.serial_number[0]);
 }
 static DEVICE_ATTR_RO(serial_number);
 
@@ -44,7 +44,7 @@ static ssize_t version_show(struct device *dev, struct device_attribute *attr,
 {
        struct gb_endo *endo = to_gb_endo(dev);
 
-       return sprintf(buf, "%s", &endo->svc.version[0]);
+       return sprintf(buf, "%s", &endo->svc_info.version[0]);
 }
 static DEVICE_ATTR_RO(version);
 
@@ -409,8 +409,8 @@ static int gb_endo_register(struct greybus_host_device *hd,
        // FIXME
        // 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");
+       strcpy(&endo->svc_info.serial_number[0], "042");
+       strcpy(&endo->svc_info.version[0], "0.0");
 
        dev_set_name(&endo->dev, "endo-0x%04x", endo->id);
        retval = device_add(&endo->dev);
index dd05269..2920b13 100644 (file)
@@ -10,7 +10,7 @@
 #define __ENDO_H
 
 /* Greybus "public" definitions" */
-struct gb_svc {
+struct gb_svc_info {
        u8 serial_number[10];
        u8 version[10];
 };
@@ -36,9 +36,9 @@ struct endo_layout {
 };
 
 struct gb_endo {
-       struct endo_layout layout;
        struct device dev;
-       struct gb_svc svc;
+       struct endo_layout layout;
+       struct gb_svc_info svc_info;
        u16 id;
 };
 #define to_gb_endo(d) container_of(d, struct gb_endo, dev)