OSDN Git Service

USB: serial: f81534: only read configuration once
authorJi-Ze Hong (Peter Hong) <hpeter@gmail.com>
Thu, 11 Jan 2018 06:47:18 +0000 (14:47 +0800)
committerJohan Hovold <johan@kernel.org>
Thu, 11 Jan 2018 10:00:25 +0000 (11:00 +0100)
commitf047d35782553ab862003a58b0fcf7e1b542e4f9
tree1b9e5eb637af64459908f46c99ddd875149ab4cf
parent138651e1186bef33d0d330ca735d85784ee6535b
USB: serial: f81534: only read configuration once

In the original code, We'll read configuration in calc_num_ports()
and read again in attach(). In fact, we can move all content from
attach() to calc_num_ports() to simplify the code.

Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_kernel@gmail.com>
[ johan: replace commit summary ]
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/f81534.c