summaryrefslogtreecommitdiffstats
path: root/drivers/serial/suncore.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-11-24 14:03:34 -0800
committerDavid S. Miller <davem@davemloft.net>2009-11-24 14:03:34 -0800
commit4e3533d05b6e5e66d1cda27f6671251c99c62894 (patch)
tree0eed98a48ff54e7fbdeb51227ed95f1b4774e056 /drivers/serial/suncore.c
parent8301d386afc55c877bafe2c6c7dc75a96ddd2838 (diff)
downloadop-kernel-dev-4e3533d05b6e5e66d1cda27f6671251c99c62894.zip
op-kernel-dev-4e3533d05b6e5e66d1cda27f6671251c99c62894.tar.gz
serial: suncore: Add 'ignore_line' argument to sunserial_console_match().
This tells the logic to ignore the line match when deciding whether the device is the OpenFirmware specified console device or not. This is going to be used in the SU driver for rsc-console detection. There is probably a better way to handle this, but this is the least intrusive solution for now which we can validate won't break any other cases. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/serial/suncore.c')
-rw-r--r--drivers/serial/suncore.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/serial/suncore.c b/drivers/serial/suncore.c
index a2d4a19..50d3b5e 100644
--- a/drivers/serial/suncore.c
+++ b/drivers/serial/suncore.c
@@ -53,20 +53,21 @@ void sunserial_unregister_minors(struct uart_driver *drv, int count)
EXPORT_SYMBOL(sunserial_unregister_minors);
int sunserial_console_match(struct console *con, struct device_node *dp,
- struct uart_driver *drv, int line)
+ struct uart_driver *drv, int line, bool ignore_line)
{
- int off;
-
if (!con || of_console_device != dp)
return 0;
- off = 0;
- if (of_console_options &&
- *of_console_options == 'b')
- off = 1;
+ if (!ignore_line) {
+ int off = 0;
- if ((line & 1) != off)
- return 0;
+ if (of_console_options &&
+ *of_console_options == 'b')
+ off = 1;
+
+ if ((line & 1) != off)
+ return 0;
+ }
con->index = line;
drv->cons = con;
OpenPOWER on IntegriCloud