greybus: endo: rename gb_svc

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>
This commit is contained in:
Alex Elder 2015-05-22 09:52:42 -05:00 committed by Greg Kroah-Hartman
parent 0d17e0c9f1
commit a702a09f20
2 changed files with 7 additions and 7 deletions

View 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);

View 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)