mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-05 14:17:43 +00:00
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>
This commit is contained in:
parent
f871cb9b2e
commit
35bfde3687
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue