Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8fe20f66 authored by Andrzej Pietrasiewicz's avatar Andrzej Pietrasiewicz Committed by Felipe Balbi
Browse files

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: default avatarAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent dec81cf1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);