greybus: es2: fix endpoint requirement check
authorJohan Hovold <johan@hovoldconsulting.com>
Wed, 4 Nov 2015 17:55:13 +0000 (18:55 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 5 Nov 2015 04:35:18 +0000 (20:35 -0800)
commitb6d808525aef6703f2bf7662c7ef99f5e7349bb4
tree41ae2add964c5c8a95d86ca9b0584f1b6009e021
parenta51e8551e298841f26ccf02193caf2b69da2434c
greybus: es2: fix endpoint requirement check

The current es2 implementation only checks for no IN or OUT bulk
endpoints, but still assumes there are precisely NUM_BULKS of each.

Specifically, urbs could be allocated and initialised to default values,
which amounts to bulk urbs being submitted to the control endpoint.

We should be able to handle any number of endpoints, but for now let's
just require NUM_BULKS of each.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/es2.c