diff options
author | Robert Baldyga <r.baldyga@samsung.com> | 2015-09-16 13:10:40 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-09-27 18:54:31 +0300 |
commit | 35bfde36872607b1de87288f9798af79820a910f (patch) | |
tree | 174ca2395ed0c683e47fe3f89653347733de2efe /drivers/usb/gadget/function | |
parent | f871cb9b2e178667a351a6fae9d930826ec10e95 (diff) | |
download | linux-35bfde36872607b1de87288f9798af79820a910f.tar.xz |
usb: gadget: f_ncm: obtain cdev from function instead of driver_data
The 'driver_data' field in ep0 is never set to pointer to cdev, so we
have to obtain it from another source as in this context ep->driver_data
contains invalid data.
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/function')
-rw-r--r-- | drivers/usb/gadget/function/f_ncm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/function/f_ncm.c b/drivers/usb/gadget/function/f_ncm.c index 3f05c6bd57f0..394cdbfc40f1 100644 --- a/drivers/usb/gadget/function/f_ncm.c +++ b/drivers/usb/gadget/function/f_ncm.c @@ -586,7 +586,7 @@ static void ncm_ep0out_complete(struct usb_ep *ep, struct usb_request *req) unsigned in_size; struct usb_function *f = req->context; struct f_ncm *ncm = func_to_ncm(f); - struct usb_composite_dev *cdev = ep->driver_data; + struct usb_composite_dev *cdev = f->config->cdev; req->context = NULL; if (req->status || req->actual != req->length) { |