linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial/uartlite: Only enable port if request_port succeeded
@ 2006-12-22 14:56 Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2006-12-22 14:56 UTC (permalink / raw)
  To: torvalds; +Cc: linux-serial

The uartlite driver would happily enable the port even if request_port
failed causing havoc. This patch fixes it.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>

diff -urpN linux-2.6.20-rc1/drivers/serial/uartlite.c linux-2.6.20-rc1.new/drivers/serial/uartlite.c
--- linux-2.6.20-rc1/drivers/serial/uartlite.c	2006-12-22 15:11:37.000000000 +0100
+++ linux-2.6.20-rc1.new/drivers/serial/uartlite.c	2006-12-22 15:20:51.000000000 +0100
@@ -278,8 +278,8 @@ static int ulite_request_port(struct uar
 
 static void ulite_config_port(struct uart_port *port, int flags)
 {
-	ulite_request_port(port);
-	port->type = PORT_UARTLITE;
+	if (!ulite_request_port(port))
+		port->type = PORT_UARTLITE;
 }
 
 static int ulite_verify_port(struct uart_port *port, struct serial_struct *ser)

-- 
Bye, Peter Korsgaard

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

* [PATCH] serial/uartlite: Only enable port if request_port succeeded
@ 2006-12-22 15:38 Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2006-12-22 15:38 UTC (permalink / raw)
  To: torvalds; +Cc: linux-serial

The uartlite driver used to always enable the port even if request_port
failed causing havoc. This patch fixes it.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>

diff -urpN linux-2.6.20-rc1/drivers/serial/uartlite.c linux-2.6.20-rc1.new/drivers/serial/uartlite.c
--- linux-2.6.20-rc1/drivers/serial/uartlite.c	2006-12-22 15:11:37.000000000 +0100
+++ linux-2.6.20-rc1.new/drivers/serial/uartlite.c	2006-12-22 15:20:51.000000000 +0100
@@ -278,8 +278,8 @@ static int ulite_request_port(struct uar
 
 static void ulite_config_port(struct uart_port *port, int flags)
 {
-	ulite_request_port(port);
-	port->type = PORT_UARTLITE;
+	if (!ulite_request_port(port))
+		port->type = PORT_UARTLITE;
 }
 
 static int ulite_verify_port(struct uart_port *port, struct serial_struct *ser)

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2006-12-22 16:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-22 15:38 [PATCH] serial/uartlite: Only enable port if request_port succeeded Peter Korsgaard
  -- strict thread matches above, loose matches on Subject: below --
2006-12-22 14:56 Peter Korsgaard

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 NNTP newsgroup(s).