summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMatwey V. Kornilov <matwey@sai.msu.ru>2016-12-29 21:48:51 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-12 11:51:25 +0100
commit9c4b60fe5313c125b1bf68ef04b0010512c27f2d (patch)
treed918f2859bad5d4b06748d798c312cfa110f0da7 /drivers
parent6def047c29b94cd7de8ffaec567060fb610ef2d2 (diff)
downloadlinux-9c4b60fe5313c125b1bf68ef04b0010512c27f2d.tar.bz2
serial: 8250: moxa: Store num_ports in brd
When struct moxa8250_board is allocated, then num_ports should be initialized in order to use it later in moxa8250_remove. Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/serial/8250/8250_moxa.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250/8250_moxa.c b/drivers/tty/serial/8250/8250_moxa.c
index 26eb5393a263..d5069b2d4d79 100644
--- a/drivers/tty/serial/8250/8250_moxa.c
+++ b/drivers/tty/serial/8250/8250_moxa.c
@@ -68,6 +68,7 @@ static int moxa8250_probe(struct pci_dev *pdev, const struct pci_device_id *id)
sizeof(unsigned int) * nr_ports, GFP_KERNEL);
if (!brd)
return -ENOMEM;
+ brd->num_ports = nr_ports;
memset(&uart, 0, sizeof(struct uart_8250_port));