Skip to contentSkip to conversation

cris: arch-v32/drivers/sync_serial.c: fix error macro position

PATCH In review Cong Ding 2 participants 2 messages Jan 14, 2013 – Jan 15, 2013

lore
Share & tools
lore

Cong Ding

author
#0 lore raw

PATCH 1/1 cris: arch-v32/drivers/sync_serial.c: fix error macro position

the macro CONFIG_ETRAXFS is used in wrong position - all the port[1] related stuff should be used only when CONFIG_ETRAXFS is enabled.

---
 arch/cris/arch-v32/drivers/sync_serial.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
arch/cris/arch-v32/drivers/sync_serial.c +3 -4
index a6a180b..f600cd3 100644
@@ -276,6 +276,7 @@ static int __init etrax_sync_serial_init(void)
 	initialize_port(0);
 #endif
 
+#ifdef CONFIG_ETRAXFS
 #if defined(CONFIG_ETRAX_SYNCHRONOUS_SERIAL_PORT1)
 	if (crisv32_pinmux_alloc_fixed(pinmux_sser1)) {
 		printk(KERN_WARNING
@@ -285,12 +286,10 @@ static int __init etrax_sync_serial_init(void)
 	ports[1].enabled = 1;
 	initialize_port(1);
 #endif
-
-#ifdef CONFIG_ETRAXFS
 	printk(KERN_INFO "ETRAX FS synchronous serial port driver\n");
-#else
+#else /* CONFIG_ETRAXFS */
 	printk(KERN_INFO "Artpec-3 synchronous serial port driver\n");
-#endif
+#endif /* CONFIG_ETRAXFS */
 	return 0;
 }
 
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 2 lines · Cong Ding

the macro CONFIG_ETRAXFS is used in wrong position - all the port[1] related stuff should be used only when CONFIG_ETRAXFS is enabled.

Problem should not be possible to see unless you enable CONFIG_ETRAX_SYNCHRONOUS_SERIAL_PORT1 also, which has
depends on ETRAX_SYNCHRONOUS_SERIAL && ETRAXFS
in the Kconfig...

Quoted 1 line

...But anyways, the hardware doesn't have the second synchronous serial port for ARTPEC-3, so for clarity I'll take this in the CRIS tree. My thanks.

/^JN - Jesper Nilsson

Signature · 1 line
               Jesper Nilsson -- [email protected]