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
This commit is contained in:
Linus Torvalds 2010-09-20 16:44:24 -07:00
commit 36ff4a5517
2 changed files with 11 additions and 15 deletions

View File

@ -472,14 +472,9 @@ pl010_set_termios(struct uart_port *port, struct ktermios *termios,
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 (line >= port->state->port.tty->driver->num)
return;
if (port->state->port.tty->ldisc->ops->num == N_PPS) {
if (new == N_PPS) {
port->flags |= UPF_HARDPPS_CD;
pl010_enable_ms(port);
} else

View File

@ -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);
}