diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2016-03-29 18:56:06 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-03-30 14:23:19 -0700 |
commit | e9f2f688d1a9434f615eec7180f14f0c52941bb9 (patch) | |
tree | 673b9c1e802a8798c43616321f3d5b934418e574 /drivers/staging/greybus/greybus_protocols.h | |
parent | 984c9d38ae370993f28b36c8be9923b1de39f5e7 (diff) |
greybus: interface: clean up device-id handling
Clean up the device id-handling and make sure we never allocate invalid
device ids due to a missing upper bound.
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/greybus_protocols.h')
-rw-r--r-- | drivers/staging/greybus/greybus_protocols.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/staging/greybus/greybus_protocols.h b/drivers/staging/greybus/greybus_protocols.h index 8370cfead6f2..2e126e671bd6 100644 --- a/drivers/staging/greybus/greybus_protocols.h +++ b/drivers/staging/greybus/greybus_protocols.h @@ -54,10 +54,11 @@ /* Fixed IDs for control/svc protocols */ -/* Device ID of SVC and AP */ -#define GB_DEVICE_ID_SVC 0 -#define GB_DEVICE_ID_AP 1 -#define GB_DEVICE_ID_MODULES_START 2 +/* SVC switch-port device ids */ +#define GB_SVC_DEVICE_ID_SVC 0 +#define GB_SVC_DEVICE_ID_AP 1 +#define GB_SVC_DEVICE_ID_MIN 2 +#define GB_SVC_DEVICE_ID_MAX 31 #define GB_SVC_CPORT_ID 0 #define GB_CONTROL_BUNDLE_ID 0 |