diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-20 19:44:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-20 19:44:24 -0400 |
commit | 36ff4a5517779355f4bd62030cdb8498c3954f29 (patch) | |
tree | b7afaeef8b3eca3ddf3ebfc99b2562e850d52582 | |
parent | ed1cde68365c1251b920900c51e73675ff38dc66 (diff) | |
parent | e3671ac429fe50cf0c1b4f1dc4b7237207f1d956 (diff) |
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
-rw-r--r-- | drivers/serial/amba-pl010.c | 9 | ||||
-rw-r--r-- | drivers/serial/mfd.c | 17 |
2 files changed, 11 insertions, 15 deletions
diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c index 50441ffe8e38..2904aa044126 100644 --- a/drivers/serial/amba-pl010.c +++ b/drivers/serial/amba-pl010.c | |||
@@ -472,14 +472,9 @@ pl010_set_termios(struct uart_port *port, struct ktermios *termios, | |||
472 | spin_unlock_irqrestore(&uap->port.lock, flags); | 472 | spin_unlock_irqrestore(&uap->port.lock, flags); |
473 | } | 473 | } |
474 | 474 | ||
475 | static void pl010_set_ldisc(struct uart_port *port) | 475 | static void pl010_set_ldisc(struct uart_port *port, int new) |
476 | { | 476 | { |
477 | int line = port->line; | 477 | if (new == N_PPS) { |
478 | |||
479 | if (line >= port->state->port.tty->driver->num) | ||
480 | return; | ||
481 | |||
482 | if (port->state->port.tty->ldisc->ops->num == N_PPS) { | ||
483 | port->flags |= UPF_HARDPPS_CD; | 478 | port->flags |= UPF_HARDPPS_CD; |
484 | pl010_enable_ms(port); | 479 | pl010_enable_ms(port); |
485 | } else | 480 | } else |
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) | |||
1423 | } | 1423 | } |
1424 | 1424 | ||
1425 | phsu = hsu; | 1425 | phsu = hsu; |
1426 | |||
1427 | hsu_debugfs_init(hsu); | 1426 | hsu_debugfs_init(hsu); |
1428 | return; | 1427 | return; |
1429 | 1428 | ||
@@ -1435,18 +1434,20 @@ err_free_region: | |||
1435 | 1434 | ||
1436 | static void serial_hsu_remove(struct pci_dev *pdev) | 1435 | static void serial_hsu_remove(struct pci_dev *pdev) |
1437 | { | 1436 | { |
1438 | struct hsu_port *hsu; | 1437 | void *priv = pci_get_drvdata(pdev); |
1439 | int i; | 1438 | struct uart_hsu_port *up; |
1440 | 1439 | ||
1441 | hsu = pci_get_drvdata(pdev); | 1440 | if (!priv) |
1442 | if (!hsu) | ||
1443 | return; | 1441 | return; |
1444 | 1442 | ||
1445 | for (i = 0; i < 3; i++) | 1443 | /* 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); | 1444 | if (pdev->device != 0x081E) { |
1445 | up = priv; | ||
1446 | uart_remove_one_port(&serial_hsu_reg, &up->port); | ||
1447 | } | ||
1447 | 1448 | ||
1448 | pci_set_drvdata(pdev, NULL); | 1449 | pci_set_drvdata(pdev, NULL); |
1449 | free_irq(hsu->irq, hsu); | 1450 | free_irq(pdev->irq, priv); |
1450 | pci_disable_device(pdev); | 1451 | pci_disable_device(pdev); |
1451 | } | 1452 | } |
1452 | 1453 | ||