diff options
author | Andrzej Pietrasiewicz <andrzej.p@samsung.com> | 2015-03-03 12:52:21 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-03-10 23:33:38 +0300 |
commit | 8fe20f661f3cfbb6778368eb3c73f8a6438ac640 (patch) | |
tree | 04145287a3a420d4dc84e70cf71b658f297e7ac6 /drivers/usb/gadget/legacy | |
parent | dec81cf1dcaac5b91de7cd32c96aadcb94840c7f (diff) | |
download | linux-8fe20f661f3cfbb6778368eb3c73f8a6438ac640.tar.xz |
usb: gadget: printer: don't access file global usb_printer_gadget in function's code
The printer_dev can be recovered from printer_func_unbind() function's
parameters.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/legacy')
-rw-r--r-- | drivers/usb/gadget/legacy/printer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/legacy/printer.c b/drivers/usb/gadget/legacy/printer.c index 3206ebcdd7a6..806475c19934 100644 --- a/drivers/usb/gadget/legacy/printer.c +++ b/drivers/usb/gadget/legacy/printer.c @@ -1159,7 +1159,7 @@ static void printer_func_unbind(struct usb_configuration *c, struct printer_dev *dev; struct usb_request *req; - dev = &usb_printer_gadget; + dev = container_of(f, struct printer_dev, function); device_destroy(usb_gadget_class, g_printer_devno); |