]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: f_printer: eliminate abuse of ep->driver data
authorRobert Baldyga <r.baldyga@samsung.com>
Wed, 16 Sep 2015 10:10:53 +0000 (12:10 +0200)
committerFelipe Balbi <balbi@ti.com>
Sun, 27 Sep 2015 15:54:31 +0000 (10:54 -0500)
commit7c5a70b2cba74a02e3b996a692f7fadc292a5ec6
tree8dcf886cc743cf4d704e522e052b8066164bb587
parent20dfa189a8d154a030f46689d9094b7af4b65d62
usb: gadget: f_printer: eliminate abuse of ep->driver data

Since ep->driver_data is not used for endpoint claiming, neither for
enabled/disabled state storing, we can reduce number of places where
we read or modify it's value, as now it has no particular meaning for
function or framework logic.

In case of f_printer we only need to store in ep->driver_data pointer to
struct printer_dev, as it's used in rx_complete() and tx_complete()
callbacks. All other uses of ep->driver_data are now meaningless and can
be safely removed.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/function/f_printer.c