Commit 36ff4a55 authored by Linus Torvalds's avatar Linus Torvalds

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
parents ed1cde68 e3671ac4
...@@ -472,14 +472,9 @@ pl010_set_termios(struct uart_port *port, struct ktermios *termios, ...@@ -472,14 +472,9 @@ pl010_set_termios(struct uart_port *port, struct ktermios *termios,
spin_unlock_irqrestore(&uap->port.lock, flags); spin_unlock_irqrestore(&uap->port.lock, flags);
} }
static void pl010_set_ldisc(struct uart_port *port) static void pl010_set_ldisc(struct uart_port *port, int new)
{ {
int line = port->line; if (new == N_PPS) {
if (line >= port->state->port.tty->driver->num)
return;
if (port->state->port.tty->ldisc->ops->num == N_PPS) {
port->flags |= UPF_HARDPPS_CD; port->flags |= UPF_HARDPPS_CD;
pl010_enable_ms(port); pl010_enable_ms(port);
} else } else
......
...@@ -1423,7 +1423,6 @@ static void hsu_global_init(void) ...@@ -1423,7 +1423,6 @@ static void hsu_global_init(void)
} }
phsu = hsu; phsu = hsu;
hsu_debugfs_init(hsu); hsu_debugfs_init(hsu);
return; return;
...@@ -1435,18 +1434,20 @@ static void hsu_global_init(void) ...@@ -1435,18 +1434,20 @@ static void hsu_global_init(void)
static void serial_hsu_remove(struct pci_dev *pdev) static void serial_hsu_remove(struct pci_dev *pdev)
{ {
struct hsu_port *hsu; void *priv = pci_get_drvdata(pdev);
int i; struct uart_hsu_port *up;
hsu = pci_get_drvdata(pdev); if (!priv)
if (!hsu)
return; return;
for (i = 0; i < 3; i++) /* For port 0/1/2, priv is the address of uart_hsu_port */
uart_remove_one_port(&serial_hsu_reg, &hsu->port[i].port); if (pdev->device != 0x081E) {
up = priv;
uart_remove_one_port(&serial_hsu_reg, &up->port);
}
pci_set_drvdata(pdev, NULL); pci_set_drvdata(pdev, NULL);
free_irq(hsu->irq, hsu); free_irq(pdev->irq, priv);
pci_disable_device(pdev); pci_disable_device(pdev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment