diff options
author | Jiri Slaby <jslaby@suse.cz> | 2020-04-17 13:59:58 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-04-23 16:53:44 +0300 |
commit | 63552502b274fe8acf4e2aafd93f58e9ad42acd6 (patch) | |
tree | 86718523e9612333fa105aa6e2abc2d1e2d0f53a /drivers/tty/rocket.c | |
parent | a8e7346b7c0a3b33963e5e043e2c612fdf69de34 (diff) | |
download | linux-63552502b274fe8acf4e2aafd93f58e9ad42acd6.tar.xz |
tty: rocket, remove unneeded variable
num_chan in register_PCI is used only as an alias for ports_per_aiop. So
drop num_chan and use ports_per_aiop directly.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20200417105959.15201-1-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/rocket.c')
-rw-r--r-- | drivers/tty/rocket.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/tty/rocket.c b/drivers/tty/rocket.c index fbaa4ec85560..077ef849f8cb 100644 --- a/drivers/tty/rocket.c +++ b/drivers/tty/rocket.c @@ -1882,7 +1882,7 @@ static int sPCIInitController(CONTROLLER_T * CtlP, int CtlNum, */ static __init int register_PCI(int i, struct pci_dev *dev) { - int num_aiops, aiop, max_num_aiops, num_chan, chan; + int num_aiops, aiop, max_num_aiops, chan; unsigned int aiopio[MAX_AIOPS_PER_BOARD]; CONTROLLER_t *ctlp; @@ -2154,8 +2154,7 @@ static __init int register_PCI(int i, struct pci_dev *dev) /* Reset the AIOPIC, init the serial ports */ for (aiop = 0; aiop < num_aiops; aiop++) { sResetAiopByNum(ctlp, aiop); - num_chan = ports_per_aiop; - for (chan = 0; chan < num_chan; chan++) + for (chan = 0; chan < ports_per_aiop; chan++) init_r_port(i, aiop, chan, dev); } @@ -2163,11 +2162,10 @@ static __init int register_PCI(int i, struct pci_dev *dev) if ((rcktpt_type[i] == ROCKET_TYPE_MODEM) || (rcktpt_type[i] == ROCKET_TYPE_MODEMII) || (rcktpt_type[i] == ROCKET_TYPE_MODEMIII)) { - num_chan = ports_per_aiop; - for (chan = 0; chan < num_chan; chan++) + for (chan = 0; chan < ports_per_aiop; chan++) sPCIModemReset(ctlp, chan, 1); msleep(500); - for (chan = 0; chan < num_chan; chan++) + for (chan = 0; chan < ports_per_aiop; chan++) sPCIModemReset(ctlp, chan, 0); msleep(500); rmSpeakerReset(ctlp, rocketModel[i].model); |