s5j/serial: Do not register uart devices without file descriptors
Device nodes can only be accessed through file descriptors,
so when they are disabled (through CONFIG_NFILE_DESCRIPTORS=0)
we do not register uart device nodes.
@@ -895,6 +895,7 @@ void up_earlyserialinit(void)
#if defined(USE_SERIALDRIVER)
void up_serialinit(void)
{
+#if CONFIG_NFILE_DESCRIPTORS > 0
/* Register the console */
#if defined(HAVE_SERIAL_CONSOLE)
uart_register("/dev/console", &CONSOLE_DEV);
@@ -916,6 +917,7 @@ void up_serialinit(void)
#ifdef TTYS4_DEV
uart_register("/dev/ttyS4", &TTYS4_DEV);
#endif
+#endif /* CONFIG_NFILE_DESCRIPTORS > 0 */
}
#endif /* USE_SERIALDRIVER */
