提交 8fe20f66 编写于 作者: A Andrzej Pietrasiewicz 提交者: Felipe Balbi

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: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 dec81cf1
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册