OSDN Git Service

usb: gadget: legacy: dbgp: eliminate abuse of ep->driver data
authorRobert Baldyga <r.baldyga@samsung.com>
Wed, 16 Sep 2015 10:11:03 +0000 (12:11 +0200)
committerFelipe Balbi <balbi@ti.com>
Sun, 27 Sep 2015 15:54:31 +0000 (10:54 -0500)
commit4ce86bfaa62f7f044701b796f1ee84e80308457f
tree970aebdb868246d343f27d1bdfd1ac636f7433dc
parent18411c0f94716ec225a4f7e1d7735c80f5ec0dab
usb: gadget: legacy: dbgp: 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 dbgp, ep->driver_data was used only for endpoint claiming
and marking endpoints as enabled, so we can simplify code by reducing
it.

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