greybus: use protocol_id for numeric values
Switch to using "protocol_id" to refer to a byte-sized numeric
protocol number. A "protocol" will represent a protocol structure
(created in the next patch).
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
diff --git a/drivers/staging/greybus/manifest.c b/drivers/staging/greybus/manifest.c
index 09fcde9..2e22f54 100644
--- a/drivers/staging/greybus/manifest.c
+++ b/drivers/staging/greybus/manifest.c
@@ -181,7 +181,7 @@
while (true) {
struct manifest_desc *descriptor;
struct greybus_descriptor_cport *desc_cport;
- enum greybus_protocol protocol;
+ u8 protocol_id;
u16 cport_id;
bool found;
@@ -200,9 +200,9 @@
break;
/* Found one. Set up its function structure */
- protocol = (enum greybus_protocol)desc_cport->protocol;
+ protocol_id = desc_cport->protocol_id;
cport_id = le16_to_cpu(desc_cport->id);
- if (!gb_connection_create(interface, cport_id, protocol))
+ if (!gb_connection_create(interface, cport_id, protocol_id))
return 0; /* Error */
count++;