]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ti-linux-kernel/ti-linux-kernel-next.git/commit
usb: gadget: u_serial: eliminate abuse of ep->driver data
authorRobert Baldyga <r.baldyga@samsung.com>
Thu, 25 Feb 2016 14:37:03 +0000 (20:07 +0530)
committerSekhar Nori <nsekhar@ti.com>
Fri, 26 Feb 2016 11:52:17 +0000 (17:22 +0530)
commit1be349a5700984920c8e105e901da4b134fa6dd5
tree07708262bd26d1beaa2063e4a3d73ef8b557e167
parent21cd624989b814d2579b5aa42ec716f1c3d21738
usb: gadget: u_serial: eliminate abuse of ep->driver data

commit 18411c0f94716ec225a4f7e1d7735c80f5ec0dab upstream.

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 u_serial ep->driver_data stores pointer to struct gs_port,
which is referenced in many places in code. Code using ep->driver_data
to mark endpoint as enabled/disabled has been removed.

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