Skip to contentSkip to conversation

avr32: atmel_default_console_device depends on CONFIG_SERIAL_ATMEL

PATCH In review Geert Uytterhoeven 2 participants 2 messages Feb 12, 2013 – Feb 13, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 avr32: atmel_default_console_device depends on CONFIG_SERIAL_ATMEL

allnoconfig:

arch/avr32/mach-at32ap/built-in.o: In function `at32_select_gpio':
(.init.text+0x548): undefined reference to `atmel_default_console_device'

---
 arch/avr32/mach-at32ap/at32ap700x.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/avr32/mach-at32ap/at32ap700x.c +2 -0
index b323d8d..a2fe61b 100644
@@ -1060,7 +1060,9 @@ struct platform_device *__init at32_add_device_usart(unsigned int id)
 
 void __init at32_setup_serial_console(unsigned int usart_id)
 {
+#ifdef CONFIG_SERIAL_ATMEL
 	atmel_default_console_device = at32_usarts[usart_id];
+#endif
 }
 
 /* --------------------------------------------------------------------
Signature · 1 line
1.7.0.4
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Geert Uytterhoeven

allnoconfig:

arch/avr32/mach-at32ap/built-in.o: In function `at32_select_gpio':
(.init.text+0x548): undefined reference to `atmel_default_console_device'

Indeed, I guess building without serial support has never been done.

Quoted 2 lines
Quoted 18 lines
---
 arch/avr32/mach-at32ap/at32ap700x.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/avr32/mach-at32ap/at32ap700x.c +2 -0
index b323d8d..a2fe61b 100644
@@ -1060,7 +1060,9 @@ struct platform_device *__init at32_add_device_usart(unsigned int id)
 
 void __init at32_setup_serial_console(unsigned int usart_id)
 {
+#ifdef CONFIG_SERIAL_ATMEL
 	atmel_default_console_device = at32_usarts[usart_id];
+#endif
 }
 
 /* --------------------------------------------------------------------
Signature · 2 lines
mvh
Hans-Christian Egtvedt