diff options
-rw-r--r-- | arch/sparc/include/asm/fb.h | 4 | ||||
-rw-r--r-- | drivers/serial/suncore.c | 15 |
2 files changed, 13 insertions, 6 deletions
diff --git a/arch/sparc/include/asm/fb.h b/arch/sparc/include/asm/fb.h index e834880be204..2173432ad7f7 100644 --- a/arch/sparc/include/asm/fb.h +++ b/arch/sparc/include/asm/fb.h | |||
@@ -1,5 +1,6 @@ | |||
1 | #ifndef _SPARC_FB_H_ | 1 | #ifndef _SPARC_FB_H_ |
2 | #define _SPARC_FB_H_ | 2 | #define _SPARC_FB_H_ |
3 | #include <linux/console.h> | ||
3 | #include <linux/fb.h> | 4 | #include <linux/fb.h> |
4 | #include <linux/fs.h> | 5 | #include <linux/fs.h> |
5 | #include <asm/page.h> | 6 | #include <asm/page.h> |
@@ -18,6 +19,9 @@ static inline int fb_is_primary_device(struct fb_info *info) | |||
18 | struct device *dev = info->device; | 19 | struct device *dev = info->device; |
19 | struct device_node *node; | 20 | struct device_node *node; |
20 | 21 | ||
22 | if (console_set_on_cmdline) | ||
23 | return 0; | ||
24 | |||
21 | node = dev->of_node; | 25 | node = dev->of_node; |
22 | if (node && | 26 | if (node && |
23 | node == of_console_device) | 27 | node == of_console_device) |
diff --git a/drivers/serial/suncore.c b/drivers/serial/suncore.c index 544f2e25d0e5..6381a0282ee7 100644 --- a/drivers/serial/suncore.c +++ b/drivers/serial/suncore.c | |||
@@ -55,7 +55,12 @@ EXPORT_SYMBOL(sunserial_unregister_minors); | |||
55 | int sunserial_console_match(struct console *con, struct device_node *dp, | 55 | int sunserial_console_match(struct console *con, struct device_node *dp, |
56 | struct uart_driver *drv, int line, bool ignore_line) | 56 | struct uart_driver *drv, int line, bool ignore_line) |
57 | { | 57 | { |
58 | if (!con || of_console_device != dp) | 58 | if (!con) |
59 | return 0; | ||
60 | |||
61 | drv->cons = con; | ||
62 | |||
63 | if (of_console_device != dp) | ||
59 | return 0; | 64 | return 0; |
60 | 65 | ||
61 | if (!ignore_line) { | 66 | if (!ignore_line) { |
@@ -69,12 +74,10 @@ int sunserial_console_match(struct console *con, struct device_node *dp, | |||
69 | return 0; | 74 | return 0; |
70 | } | 75 | } |
71 | 76 | ||
72 | con->index = line; | 77 | if (!console_set_on_cmdline) { |
73 | drv->cons = con; | 78 | con->index = line; |
74 | |||
75 | if (!console_set_on_cmdline) | ||
76 | add_preferred_console(con->name, line, NULL); | 79 | add_preferred_console(con->name, line, NULL); |
77 | 80 | } | |
78 | return 1; | 81 | return 1; |
79 | } | 82 | } |
80 | EXPORT_SYMBOL(sunserial_console_match); | 83 | EXPORT_SYMBOL(sunserial_console_match); |