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

Skip to content
Commit e2ae67a3 authored by Konstantin Shkolnyy's avatar Konstantin Shkolnyy Committed by Johan Hovold
Browse files

USB: cp210x: relocate private data from USB interface to port



This change is preparation for implementing a cp2108 bug workaround.
The workaround requires storing some private data. Right now the data is
attached to the USB interface and allocated in the attach() callback.
The bug detection requires USB I/O which is done easier from port_probe()
callback rather than attach(). Since the USB access functions take port
as a parameter, and since the private data is used exclusively by these
functions, it can be allocated in port_probe(). Also, all cp210x devices
have exactly 1 port per USB iterface, so moving private data from the USB
interface to port is trivial.

Signed-off-by: default avatarKonstantin Shkolnyy <konstantin.shkolnyy@gmail.com>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent ebfb319b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment