Commit 87c8eb8d authored by Viresh Kumar's avatar Viresh Kumar Committed by Greg Kroah-Hartman

greybus: hotplug function doesn't need to contain manifest now

Manifest is fetched with control protocol now and so we don't need space
for it in hotplug data.
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 6c68da26
...@@ -167,8 +167,7 @@ static void svc_hotplug(struct svc_function_hotplug *hotplug, ...@@ -167,8 +167,7 @@ static void svc_hotplug(struct svc_function_hotplug *hotplug,
switch (hotplug->hotplug_event) { switch (hotplug->hotplug_event) {
case SVC_HOTPLUG_EVENT: case SVC_HOTPLUG_EVENT:
/* Add a new interface to the system */ /* Add a new interface to the system */
if (payload_length < 0x03) { if (payload_length != sizeof(*hotplug)) {
/* Hotplug message is at least 3 bytes big */
dev_err(hd->parent, dev_err(hd->parent,
"Illegal size of svc hotplug message %d\n", "Illegal size of svc hotplug message %d\n",
payload_length); payload_length);
...@@ -180,8 +179,7 @@ static void svc_hotplug(struct svc_function_hotplug *hotplug, ...@@ -180,8 +179,7 @@ static void svc_hotplug(struct svc_function_hotplug *hotplug,
case SVC_HOTUNPLUG_EVENT: case SVC_HOTUNPLUG_EVENT:
/* Remove a interface from the system */ /* Remove a interface from the system */
if (payload_length != 0x02) { if (payload_length != sizeof(*hotplug)) {
/* Hotunplug message is only 2 bytes big */
dev_err(hd->parent, dev_err(hd->parent,
"Illegal size of svc hotunplug message %d\n", "Illegal size of svc hotunplug message %d\n",
payload_length); payload_length);
......
...@@ -82,7 +82,6 @@ enum svc_function_hotplug_event { ...@@ -82,7 +82,6 @@ enum svc_function_hotplug_event {
struct svc_function_hotplug { struct svc_function_hotplug {
__u8 hotplug_event; /* enum svc_function_hotplug_event */ __u8 hotplug_event; /* enum svc_function_hotplug_event */
__u8 interface_id; /* Interface id within the Endo */ __u8 interface_id; /* Interface id within the Endo */
__u8 data[0];
} __packed; } __packed;
enum svc_function_power_type { enum svc_function_power_type {
......
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