diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2015-12-08 19:54:59 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-12-09 17:05:48 -0500 |
commit | a75fd8ba5c8c263d2d0341123822c769e7d95918 (patch) | |
tree | dfbdb35e35ae3af2c43d7b97cf34256df136d747 /drivers | |
parent | 5626e0bf99a065d53a0f9966ee335fb0707bd005 (diff) |
greybus: es2: Reserve CPorts 16 and 17
CPorts 16 and 17 are reserved for CDSI0 and CDSI1 by the ES2 APB, make
sure they won't be allocated dynamically.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/greybus/es2.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c index b1b6ad3a512b..86972a959b07 100644 --- a/drivers/staging/greybus/es2.c +++ b/drivers/staging/greybus/es2.c @@ -841,6 +841,7 @@ static int ap_probe(struct usb_interface *interface, int retval = -ENOMEM; int i; int num_cports; + int cport_id; udev = usb_get_dev(interface_to_usbdev(interface)); @@ -859,6 +860,14 @@ static int ap_probe(struct usb_interface *interface, return PTR_ERR(hd); } + /* + * CPorts 16 and 17 are reserved for CDSI0 and CDSI1, make sure they + * won't be allocated dynamically. + */ + do { + cport_id = ida_simple_get(&hd->cport_id_map, 16, 18, GFP_KERNEL); + } while (cport_id > 0); + es2 = hd_to_es2(hd); es2->hd = hd; es2->usb_intf = interface; |