diff options
Diffstat (limited to 'drivers/serial/mfd.c')
-rw-r--r-- | drivers/serial/mfd.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/serial/mfd.c b/drivers/serial/mfd.c index bc9af503907f..5dff45c76d32 100644 --- a/drivers/serial/mfd.c +++ b/drivers/serial/mfd.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/console.h> | 28 | #include <linux/console.h> |
29 | #include <linux/sysrq.h> | 29 | #include <linux/sysrq.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/serial_reg.h> | 31 | #include <linux/serial_reg.h> |
31 | #include <linux/circ_buf.h> | 32 | #include <linux/circ_buf.h> |
32 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
@@ -1423,7 +1424,6 @@ static void hsu_global_init(void) | |||
1423 | } | 1424 | } |
1424 | 1425 | ||
1425 | phsu = hsu; | 1426 | phsu = hsu; |
1426 | |||
1427 | hsu_debugfs_init(hsu); | 1427 | hsu_debugfs_init(hsu); |
1428 | return; | 1428 | return; |
1429 | 1429 | ||
@@ -1435,18 +1435,20 @@ err_free_region: | |||
1435 | 1435 | ||
1436 | static void serial_hsu_remove(struct pci_dev *pdev) | 1436 | static void serial_hsu_remove(struct pci_dev *pdev) |
1437 | { | 1437 | { |
1438 | struct hsu_port *hsu; | 1438 | void *priv = pci_get_drvdata(pdev); |
1439 | int i; | 1439 | struct uart_hsu_port *up; |
1440 | 1440 | ||
1441 | hsu = pci_get_drvdata(pdev); | 1441 | if (!priv) |
1442 | if (!hsu) | ||
1443 | return; | 1442 | return; |
1444 | 1443 | ||
1445 | for (i = 0; i < 3; i++) | 1444 | /* For port 0/1/2, priv is the address of uart_hsu_port */ |
1446 | uart_remove_one_port(&serial_hsu_reg, &hsu->port[i].port); | 1445 | if (pdev->device != 0x081E) { |
1446 | up = priv; | ||
1447 | uart_remove_one_port(&serial_hsu_reg, &up->port); | ||
1448 | } | ||
1447 | 1449 | ||
1448 | pci_set_drvdata(pdev, NULL); | 1450 | pci_set_drvdata(pdev, NULL); |
1449 | free_irq(hsu->irq, hsu); | 1451 | free_irq(pdev->irq, priv); |
1450 | pci_disable_device(pdev); | 1452 | pci_disable_device(pdev); |
1451 | } | 1453 | } |
1452 | 1454 | ||