LKML Archive mirror
 help / color / mirror / Atom feed
* [GIT PATCH] TTY/Serial fixes for .36-rc6
@ 2010-09-20 23:42 Greg KH
  2010-09-20 23:43 ` [PATCH 1/2] serial: amba-pl010: fix set_ldisc Greg Kroah-Hartman
  2010-09-20 23:43 ` [PATCH 2/2] serial: mfd: fix bug in serial_hsu_remove() Greg Kroah-Hartman
  0 siblings, 2 replies; 3+ messages in thread
From: Greg KH @ 2010-09-20 23:42 UTC (permalink / raw
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel

Here are some serial driver bugfixes for the .36-rc6 kernel.

Minor stuff, but would be good to get included.

Please pull from:
	master.kernel.org:/pub/scm/linux/kernel/git/gregkh/tty-2.6.git/

These patches have been in the linux-next tree and -mm for a while now.

Patches will be sent to the linux-kernel mailing list, if anyone wants
to see them.

thanks,

greg k-h

------------

 drivers/serial/amba-pl010.c |    9 ++-------
 drivers/serial/mfd.c        |   17 +++++++++--------
 2 files changed, 11 insertions(+), 15 deletions(-)

---------------

Feng Tang (1):
      serial: mfd: fix bug in serial_hsu_remove()

Mika Westerberg (1):
      serial: amba-pl010: fix set_ldisc


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] serial: amba-pl010: fix set_ldisc
  2010-09-20 23:42 [GIT PATCH] TTY/Serial fixes for .36-rc6 Greg KH
@ 2010-09-20 23:43 ` Greg Kroah-Hartman
  2010-09-20 23:43 ` [PATCH 2/2] serial: mfd: fix bug in serial_hsu_remove() Greg Kroah-Hartman
  1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2010-09-20 23:43 UTC (permalink / raw
  To: linux-kernel; +Cc: Mika Westerberg, Alan Cox, Russell King, Greg Kroah-Hartman

From: Mika Westerberg <mika.westerberg@iki.fi>

Commit d87d9b7d1 ("tty: serial - fix tty referencing in set_ldisc") changed
set_ldisc to take ldisc number as parameter. This patch fixes AMBA PL010 driver
according the new prototype.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/serial/amba-pl010.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c
index 50441ff..2904aa0 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,
 	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
-- 
1.7.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] serial: mfd: fix bug in serial_hsu_remove()
  2010-09-20 23:42 [GIT PATCH] TTY/Serial fixes for .36-rc6 Greg KH
  2010-09-20 23:43 ` [PATCH 1/2] serial: amba-pl010: fix set_ldisc Greg Kroah-Hartman
@ 2010-09-20 23:43 ` Greg Kroah-Hartman
  1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2010-09-20 23:43 UTC (permalink / raw
  To: linux-kernel; +Cc: Feng Tang, Alan Cox, Greg Kroah-Hartman

From: Feng Tang <feng.tang@intel.com>

Medfield HSU driver deal with 4 pci devices(3 uart ports + 1 dma controller),
so in pci remove func, we need handle them differently

Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/serial/mfd.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/serial/mfd.c b/drivers/serial/mfd.c
index bc9af50..324c385 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);
 }
 
-- 
1.7.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-09-20 23:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-20 23:42 [GIT PATCH] TTY/Serial fixes for .36-rc6 Greg KH
2010-09-20 23:43 ` [PATCH 1/2] serial: amba-pl010: fix set_ldisc Greg Kroah-Hartman
2010-09-20 23:43 ` [PATCH 2/2] serial: mfd: fix bug in serial_hsu_remove() Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).