summaryrefslogtreecommitdiff
path: root/drivers/serial/mfd.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-09-21 03:44:24 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-09-21 03:44:24 +0400
commit36ff4a5517779355f4bd62030cdb8498c3954f29 (patch)
treeb7afaeef8b3eca3ddf3ebfc99b2562e850d52582 /drivers/serial/mfd.c
parented1cde68365c1251b920900c51e73675ff38dc66 (diff)
parente3671ac429fe50cf0c1b4f1dc4b7237207f1d956 (diff)
downloadlinux-36ff4a5517779355f4bd62030cdb8498c3954f29.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: serial: mfd: fix bug in serial_hsu_remove() serial: amba-pl010: fix set_ldisc
Diffstat (limited to 'drivers/serial/mfd.c')
-rw-r--r--drivers/serial/mfd.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/serial/mfd.c b/drivers/serial/mfd.c
index bc9af503907f..324c385a653d 100644
--- a/drivers/serial/mfd.c
+++ b/drivers/serial/mfd.c
@@ -1423,7 +1423,6 @@ static void hsu_global_init(void)
}
phsu = hsu;
-
hsu_debugfs_init(hsu);
return;
@@ -1435,18 +1434,20 @@ err_free_region:
static void serial_hsu_remove(struct pci_dev *pdev)
{
- struct hsu_port *hsu;
- int i;
+ void *priv = pci_get_drvdata(pdev);
+ struct uart_hsu_port *up;
- hsu = pci_get_drvdata(pdev);
- if (!hsu)
+ if (!priv)
return;
- for (i = 0; i < 3; i++)
- uart_remove_one_port(&serial_hsu_reg, &hsu->port[i].port);
+ /* For port 0/1/2, priv is the address of uart_hsu_port */
+ if (pdev->device != 0x081E) {
+ up = priv;
+ uart_remove_one_port(&serial_hsu_reg, &up->port);
+ }
pci_set_drvdata(pdev, NULL);
- free_irq(hsu->irq, hsu);
+ free_irq(pdev->irq, priv);
pci_disable_device(pdev);
}