Commit a702a09f authored by Alex Elder's avatar Alex Elder Committed by Greg Kroah-Hartman

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: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 0d17e0c9
......@@ -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);
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment