Skip to content
Commit e8603076 authored by JackyChou's avatar JackyChou Committed by Johan Hovold
Browse files

USB: serial: mos7840: clean up register handling



In the read/write function, set port 2 independently in the 2-port case.

When setting the offset of port registers, the offset between port 1 and
other ports is different, so port 1 is set independently.
Then in the rest of ports, the port 2 between 2-ports case and 4-ports case
is different, so port 2 in 2-ports case is set independently.

Specifically, port 2 in the 2-port case maps to the registers used by
port 3 in the 4-port case.

Signed-off-by: default avatarJackyChou <jackychou@asix.com.tw>
[ johan: simplify register-offset handling at port probe, add a comment
         and amend commit message ]
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent 6abd8371
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment