You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/02/18 19:05:52 UTC

[incubator-nuttx] branch master updated: ramlog: Remove g_ramlog_syslog_channel since it's same as g_default_channel

This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 51a2171  ramlog: Remove g_ramlog_syslog_channel since it's same as g_default_channel
51a2171 is described below

commit 51a2171c71c562a6710ca23d9a229ee55576aaa3
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Tue Feb 18 16:40:59 2020 +0800

    ramlog: Remove g_ramlog_syslog_channel since it's same as g_default_channel
    
    And remove syslog_init_e because all initialization is later now and we don't
    distinguish the initialition phase anymore after ramlog don't need special
    initialize.
---
 Documentation/NuttxPortingGuide.html       | 24 ++--------------
 arch/arm/src/common/up_initialize.c        |  8 ------
 arch/avr/src/common/up_initialize.c        |  8 ------
 arch/hc/src/common/up_initialize.c         |  8 ------
 arch/mips/src/common/up_initialize.c       |  8 ------
 arch/or1k/src/common/up_initialize.c       |  8 ------
 arch/renesas/src/common/up_initialize.c    |  8 ------
 arch/risc-v/src/common/up_initialize.c     |  8 ------
 arch/sim/src/sim/up_initialize.c           |  8 ------
 arch/x86/src/common/up_initialize.c        |  8 ------
 arch/xtensa/src/common/xtensa_initialize.c |  8 ------
 arch/z16/src/common/up_initialize.c        |  8 ------
 arch/z80/src/common/up_initialize.c        |  8 ------
 drivers/syslog/README.txt                  | 20 ++-----------
 drivers/syslog/ramlog.c                    | 46 ++----------------------------
 drivers/syslog/syslog_filechannel.c        |  3 +-
 drivers/syslog/syslog_initialize.c         | 35 +++++++----------------
 include/nuttx/syslog/ramlog.h              |  4 +--
 include/nuttx/syslog/syslog.h              | 15 ++--------
 sched/init/nx_start.c                      |  2 +-
 20 files changed, 26 insertions(+), 219 deletions(-)

diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html
index ef2ffdb..17f7652 100644
--- a/Documentation/NuttxPortingGuide.html
+++ b/Documentation/NuttxPortingGuide.html
@@ -6668,9 +6668,9 @@ int syslog_channel(FAR const struct syslog_channel_s *channel);
 <ul><pre>
 #include &lt;nuttx/syslog/syslog.h&gt;
 #ifndef CONFIG_ARCH_SYSLOG
-int syslog_initialize(enum syslog_init_e phase);
+int syslog_initialize(void);
 #else
-#  define syslog_initialize(phase)
+#  define syslog_initialize()
 #endif
 </ul></pre>
 <p><b>Description:</b>
@@ -6693,13 +6693,6 @@ int syslog_initialize(enum syslog_init_e phase);
       If <code>CONFIG_ARCH_SYSLOG</code> is selected, then the architecture-specific logic will provide its own SYSLOG device initialize which must include as a minimum a call to <code>syslog_channel()</code> to use the device.
   </li>
 </ul>
-<p><b>Input Parameters:</b>
-<ul>
-  <li>
-    <p>
-      <code>phase</code>: One of {<code>SYSLOG_INIT_EARLY</code>, <code>SYSLOG_INIT_LATE</code>}
-  </li>
-</ul>
 <p><b>Returned Value:</b>
   Zero (<code>OK</code>) is returned on success; a negated <code>errno</code> value is returned on any failure.
 </p>
@@ -6707,19 +6700,8 @@ int syslog_initialize(enum syslog_init_e phase);
   Different types of SYSLOG devices have different OS initialization
   requirements.  Some are available immediately at reset, some are available
   after some basic OS initialization, and some only after OS is fully
-  initialized.  In order to satisfy these different initialization
-  requirements, <code>syslog_initialize()</code> is called twice from the boot-up logic:
+  initialized.
 </p>
-<ul>
-  <li>
-    <p>
-      <code>syslog_initialize()</code> is called from the architecture-specific <code>up_initialize()</code> function as some as basic hardware resources have been initialized: Timers, interrupts, etc.  In this case, <code>syslog_initialize()</code> is called with the argument <code>SYSLOG_INIT_EARLY</code>.
-  </li>
-  <li>
-    <p>
-      <code>syslog_initialize()</code> is called again from <code>nx_start()</code> when the full OS initialization has completed, just before the application main entry point is spawned.  In this case, <code>syslog_initialize()</code> is called with the argument <code>SYSLOG_INIT_LATE</code>.
-  </li>
-</ul>
 <p>
   There are other types of SYSLOG channel devices that may require even further initialization.  For example, the file SYSLOG channel (described below) cannot be initialized until the necessary file systems have been mounted.
 </p>
diff --git a/arch/arm/src/common/up_initialize.c b/arch/arm/src/common/up_initialize.c
index e4d63b8..7e802f4 100644
--- a/arch/arm/src/common/up_initialize.c
+++ b/arch/arm/src/common/up_initialize.c
@@ -49,7 +49,6 @@
 #include <nuttx/net/loopback.h>
 #include <nuttx/net/tun.h>
 #include <nuttx/net/telnet.h>
-#include <nuttx/syslog/syslog.h>
 #include <nuttx/syslog/syslog_console.h>
 #include <nuttx/serial/pty.h>
 #include <nuttx/crypto/crypto.h>
@@ -201,13 +200,6 @@ void up_initialize(void)
   ptmx_register();
 #endif
 
-  /* Early initialization of the system logging device.  Some SYSLOG channel
-   * can be initialized early in the initialization sequence because they
-   * depend on only minimal OS initialization.
-   */
-
-  syslog_initialize(SYSLOG_INIT_EARLY);
-
 #if defined(CONFIG_CRYPTO)
   /* Initialize the HW crypto and /dev/crypto */
 
diff --git a/arch/avr/src/common/up_initialize.c b/arch/avr/src/common/up_initialize.c
index 7b4cbc1..4c76df0 100644
--- a/arch/avr/src/common/up_initialize.c
+++ b/arch/avr/src/common/up_initialize.c
@@ -48,7 +48,6 @@
 #include <nuttx/net/loopback.h>
 #include <nuttx/net/tun.h>
 #include <nuttx/net/telnet.h>
-#include <nuttx/syslog/syslog.h>
 #include <nuttx/syslog/syslog_console.h>
 #include <nuttx/serial/pty.h>
 #include <nuttx/crypto/crypto.h>
@@ -230,13 +229,6 @@ void up_initialize(void)
   ptmx_register();
 #endif
 
-  /* Early initialization of the system logging device.  Some SYSLOG channel
-   * can be initialized early in the initialization sequence because they
-   * depend on only minimal OS initialization.
-   */
-
-  syslog_initialize(SYSLOG_INIT_EARLY);
-
 #if defined(CONFIG_CRYPTO)
   /* Initialize the HW crypto and /dev/crypto */
 
diff --git a/arch/hc/src/common/up_initialize.c b/arch/hc/src/common/up_initialize.c
index 95b7a7a..3397f04 100644
--- a/arch/hc/src/common/up_initialize.c
+++ b/arch/hc/src/common/up_initialize.c
@@ -49,7 +49,6 @@
 #include <nuttx/net/loopback.h>
 #include <nuttx/net/tun.h>
 #include <nuttx/net/telnet.h>
-#include <nuttx/syslog/syslog.h>
 #include <nuttx/syslog/syslog_console.h>
 #include <nuttx/serial/pty.h>
 #include <nuttx/crypto/crypto.h>
@@ -163,13 +162,6 @@ void up_initialize(void)
   ptmx_register();
 #endif
 
-  /* Early initialization of the system logging device.  Some SYSLOG channel
-   * can be initialized early in the initialization sequence because they
-   * depend on only minimal OS initialization.
-   */
-
-  syslog_initialize(SYSLOG_INIT_EARLY);
-
 #if defined(CONFIG_CRYPTO)
   /* Initialize the HW crypto and /dev/crypto */
 
diff --git a/arch/mips/src/common/up_initialize.c b/arch/mips/src/common/up_initialize.c
index a741582..2bab501 100644
--- a/arch/mips/src/common/up_initialize.c
+++ b/arch/mips/src/common/up_initialize.c
@@ -49,7 +49,6 @@
 #include <nuttx/net/loopback.h>
 #include <nuttx/net/tun.h>
 #include <nuttx/net/telnet.h>
-#include <nuttx/syslog/syslog.h>
 #include <nuttx/syslog/syslog_console.h>
 #include <nuttx/serial/pty.h>
 #include <nuttx/crypto/crypto.h>
@@ -165,13 +164,6 @@ void up_initialize(void)
   ptmx_register();
 #endif
 
-  /* Early initialization of the system logging device.  Some SYSLOG channel
-   * can be initialized early in the initialization sequence because they
-   * depend on only minimal OS initialization.
-   */
-
-  syslog_initialize(SYSLOG_INIT_EARLY);
-
 #if defined(CONFIG_CRYPTO)
   /* Initialize the HW crypto and /dev/crypto */
 
diff --git a/arch/or1k/src/common/up_initialize.c b/arch/or1k/src/common/up_initialize.c
index e0015f1..bfc6d42 100644
--- a/arch/or1k/src/common/up_initialize.c
+++ b/arch/or1k/src/common/up_initialize.c
@@ -49,7 +49,6 @@
 #include <nuttx/net/loopback.h>
 #include <nuttx/net/tun.h>
 #include <nuttx/net/telnet.h>
-#include <nuttx/syslog/syslog.h>
 #include <nuttx/syslog/syslog_console.h>
 #include <nuttx/serial/pty.h>
 #include <nuttx/crypto/crypto.h>
@@ -256,13 +255,6 @@ void up_initialize(void)
   ptmx_register();
 #endif
 
-  /* Early initialization of the system logging device.  Some SYSLOG channel
-   * can be initialized early in the initialization sequence because they
-   * depend on only minimal OS initialization.
-   */
-
-  syslog_initialize(SYSLOG_INIT_EARLY);
-
   /* Print OpenRISC CPU information */
 
   or1k_print_cpuinfo();
diff --git a/arch/renesas/src/common/up_initialize.c b/arch/renesas/src/common/up_initialize.c
index 1e04034..af51398 100644
--- a/arch/renesas/src/common/up_initialize.c
+++ b/arch/renesas/src/common/up_initialize.c
@@ -49,7 +49,6 @@
 #include <nuttx/net/loopback.h>
 #include <nuttx/net/tun.h>
 #include <nuttx/net/telnet.h>
-#include <nuttx/syslog/syslog.h>
 #include <nuttx/syslog/syslog_console.h>
 #include <nuttx/serial/pty.h>
 #include <nuttx/crypto/crypto.h>
@@ -149,13 +148,6 @@ void up_initialize(void)
   ptmx_register();
 #endif
 
-  /* Early initialization of the system logging device.  Some SYSLOG channel
-   * can be initialized early in the initialization sequence because they
-   * depend on only minimal OS initialization.
-   */
-
-  syslog_initialize(SYSLOG_INIT_EARLY);
-
 #if defined(CONFIG_CRYPTO)
   /* Initialize the HW crypto and /dev/crypto */
 
diff --git a/arch/risc-v/src/common/up_initialize.c b/arch/risc-v/src/common/up_initialize.c
index a6d0191..989837b 100644
--- a/arch/risc-v/src/common/up_initialize.c
+++ b/arch/risc-v/src/common/up_initialize.c
@@ -44,7 +44,6 @@
 #include <nuttx/arch.h>
 #include <nuttx/board.h>
 #include <nuttx/serial/pty.h>
-#include <nuttx/syslog/syslog.h>
 #include <nuttx/drivers/drivers.h>
 
 #include <arch/board/board.h>
@@ -147,12 +146,5 @@ void up_initialize(void)
   ptmx_register();
 #endif
 
-  /* Early initialization of the system logging device.  Some SYSLOG channel
-   * can be initialized early in the initialization sequence because they
-   * depend on only minimal OS initialization.
-   */
-
-  syslog_initialize(SYSLOG_INIT_EARLY);
-
   board_autoled_on(LED_IRQSENABLED);
 }
diff --git a/arch/sim/src/sim/up_initialize.c b/arch/sim/src/sim/up_initialize.c
index 5ef6abb..ee2531d 100644
--- a/arch/sim/src/sim/up_initialize.c
+++ b/arch/sim/src/sim/up_initialize.c
@@ -50,7 +50,6 @@
 #include <nuttx/net/tun.h>
 #include <nuttx/net/telnet.h>
 #include <nuttx/mtd/mtd.h>
-#include <nuttx/syslog/syslog.h>
 #include <nuttx/syslog/syslog_console.h>
 #include <nuttx/serial/pty.h>
 #include <nuttx/crypto/crypto.h>
@@ -240,13 +239,6 @@ void up_initialize(void)
   ptmx_register();
 #endif
 
-  /* Early initialization of the system logging device.  Some SYSLOG channel
-   * can be initialized early in the initialization sequence because they
-   * depend on only minimal OS initialization.
-   */
-
-  syslog_initialize(SYSLOG_INIT_EARLY);
-
 #if defined(CONFIG_CRYPTO)
   /* Initialize the HW crypto and /dev/crypto */
 
diff --git a/arch/x86/src/common/up_initialize.c b/arch/x86/src/common/up_initialize.c
index efc6f73..82731be 100644
--- a/arch/x86/src/common/up_initialize.c
+++ b/arch/x86/src/common/up_initialize.c
@@ -49,7 +49,6 @@
 #include <nuttx/net/loopback.h>
 #include <nuttx/net/tun.h>
 #include <nuttx/net/telnet.h>
-#include <nuttx/syslog/syslog.h>
 #include <nuttx/syslog/syslog_console.h>
 #include <nuttx/serial/pty.h>
 #include <nuttx/crypto/crypto.h>
@@ -165,13 +164,6 @@ void up_initialize(void)
   ptmx_register();
 #endif
 
-  /* Early initialization of the system logging device.  Some SYSLOG channel
-   * can be initialized early in the initialization sequence because they
-   * depend on only minimal OS initialization.
-   */
-
-  syslog_initialize(SYSLOG_INIT_EARLY);
-
 #if defined(CONFIG_CRYPTO)
   /* Initialize the HW crypto and /dev/crypto */
 
diff --git a/arch/xtensa/src/common/xtensa_initialize.c b/arch/xtensa/src/common/xtensa_initialize.c
index 5161468..9d92d6e 100644
--- a/arch/xtensa/src/common/xtensa_initialize.c
+++ b/arch/xtensa/src/common/xtensa_initialize.c
@@ -49,7 +49,6 @@
 #include <nuttx/net/loopback.h>
 #include <nuttx/net/tun.h>
 #include <nuttx/net/telnet.h>
-#include <nuttx/syslog/syslog.h>
 #include <nuttx/syslog/syslog_console.h>
 #include <nuttx/serial/pty.h>
 #include <nuttx/crypto/crypto.h>
@@ -173,13 +172,6 @@ void up_initialize(void)
   ptmx_register();
 #endif
 
-  /* Early initialization of the system logging device.  Some SYSLOG channel
-   * can be initialized early in the initialization sequence because they
-   * depend on only minimal OS initialization.
-   */
-
-  syslog_initialize(SYSLOG_INIT_EARLY);
-
 #if defined(CONFIG_CRYPTO)
   /* Initialize the HW crypto and /dev/crypto */
 
diff --git a/arch/z16/src/common/up_initialize.c b/arch/z16/src/common/up_initialize.c
index 51cd2eb..4ce2e09e 100644
--- a/arch/z16/src/common/up_initialize.c
+++ b/arch/z16/src/common/up_initialize.c
@@ -49,7 +49,6 @@
 #include <nuttx/net/loopback.h>
 #include <nuttx/net/tun.h>
 #include <nuttx/net/telnet.h>
-#include <nuttx/syslog/syslog.h>
 #include <nuttx/syslog/syslog_console.h>
 #include <nuttx/serial/pty.h>
 #include <nuttx/crypto/crypto.h>
@@ -165,13 +164,6 @@ void up_initialize(void)
   ptmx_register();
 #endif
 
-  /* Early initialization of the system logging device.  Some SYSLOG channel
-   * can be initialized early in the initialization sequence because they
-   * depend on only minimal OS initialization.
-   */
-
-  syslog_initialize(SYSLOG_INIT_EARLY);
-
 #if defined(CONFIG_CRYPTO)
   /* Initialize the HW crypto and /dev/crypto */
 
diff --git a/arch/z80/src/common/up_initialize.c b/arch/z80/src/common/up_initialize.c
index 61556c9..beaf3d0 100644
--- a/arch/z80/src/common/up_initialize.c
+++ b/arch/z80/src/common/up_initialize.c
@@ -50,7 +50,6 @@
 #include <nuttx/net/loopback.h>
 #include <nuttx/net/telnet.h>
 #include <nuttx/net/tun.h>
-#include <nuttx/syslog/syslog.h>
 #include <nuttx/syslog/syslog_console.h>
 #include <nuttx/serial/pty.h>
 #include <nuttx/crypto/crypto.h>
@@ -164,13 +163,6 @@ void up_initialize(void)
   ptmx_register();
 #endif
 
-  /* Early initialization of the system logging device.  Some SYSLOG channel
-   * can be initialized early in the initialization sequence because they
-   * depend on minimal OS initialization.
-   */
-
-  syslog_initialize(SYSLOG_INIT_EARLY);
-
 #if defined(CONFIG_CRYPTO)
   /* Initialize the HW crypto and /dev/crypto */
 
diff --git a/drivers/syslog/README.txt b/drivers/syslog/README.txt
index dbc46df..6b8541c 100644
--- a/drivers/syslog/README.txt
+++ b/drivers/syslog/README.txt
@@ -189,9 +189,9 @@ SYSLOG Channels
   Prototype:
 
     #ifndef CONFIG_ARCH_SYSLOG
-    int syslog_initialize(enum syslog_init_e phase);
+    int syslog_initialize(void);
     #else
-    #  define syslog_initialize(phase)
+    #  define syslog_initialize()
     #endif
 
   Description:
@@ -209,10 +209,6 @@ SYSLOG Channels
       logic will provide its own SYSLOG device initialize which must include
       as a minimum a call to syslog_channel() to use the device.
 
-  Input Parameters:
-
-    * phase - One of {SYSLOG_INIT_EARLY, SYSLOG_INIT_LATE}
-
   Returned Value:
     Zero (OK) is returned on success; a negated errno value is returned on
     any failure.
@@ -220,17 +216,7 @@ SYSLOG Channels
   Different types of SYSLOG devices have different OS initialization
   requirements.  Some are available immediately at reset, some are available
   after some basic OS initialization, and some only after OS is fully
-  initialized.  In order to satisfy these different initialization
-  requirements, syslog_initialize() is called twice from the boot-up logic:
-
-    * syslog_initialize() is called from the architecture-specific
-      up_initialize() function as some as basic hardware resources have been
-      initialized: Timers, interrupts, etc.  In this case,
-      syslog_initialize() is called with the argument SYSLOG_INIT_EARLY.
-    * syslog_initialize() is called again from nx_start() when the full OS
-      initialization has completed, just before the application main entry
-      point is spawned.  In this case, syslog_initialize() is called with
-      the argument SYSLOG_INIT_LATE.
+  initialized.
 
   There are other types of SYSLOG channel devices that may require even
   further initialization.  For example, the file SYSLOG channel (described
diff --git a/drivers/syslog/ramlog.c b/drivers/syslog/ramlog.c
index bbb7670..7823d45 100644
--- a/drivers/syslog/ramlog.c
+++ b/drivers/syslog/ramlog.c
@@ -93,12 +93,6 @@ struct ramlog_dev_s
  * Private Function Prototypes
  ****************************************************************************/
 
-/* Syslog channel methods */
-
-#ifdef CONFIG_RAMLOG_SYSLOG
-static int ramlog_flush(void);
-#endif
-
 /* Helper functions */
 
 #ifndef CONFIG_RAMLOG_NONBLOCKING
@@ -121,19 +115,6 @@ static int     ramlog_poll(FAR struct file *filep, FAR struct pollfd *fds,
  * Private Data
  ****************************************************************************/
 
-#ifdef CONFIG_RAMLOG_SYSLOG
-static const struct syslog_channel_s g_ramlog_syslog_channel =
-{
-  ramlog_putc,
-  ramlog_putc,
-  ramlog_flush
-};
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
 static const struct file_operations g_ramlogfops =
 {
   NULL,         /* open */
@@ -181,17 +162,6 @@ static struct ramlog_dev_s g_sysdev =
  ****************************************************************************/
 
 /****************************************************************************
- * Name: ramlog_flush
- ****************************************************************************/
-
-#ifdef CONFIG_RAMLOG_SYSLOG
-static int ramlog_flush(void)
-{
-  return OK;
-}
-#endif
-
-/****************************************************************************
  * Name: ramlog_readnotify
  ****************************************************************************/
 
@@ -720,7 +690,7 @@ int ramlog_register(FAR const char *devpath, FAR char *buffer, size_t buflen)
 }
 
 /****************************************************************************
- * Name: ramlog_syslog_channel
+ * Name: ramlog_syslog_register
  *
  * Description:
  *   Use a pre-allocated RAM logging device and register it at the path
@@ -729,21 +699,11 @@ int ramlog_register(FAR const char *devpath, FAR char *buffer, size_t buflen)
  ****************************************************************************/
 
 #ifdef CONFIG_RAMLOG_SYSLOG
-int ramlog_syslog_channel(void)
+void ramlog_syslog_register(void)
 {
-  int ret;
-
   /* Register the syslog character driver */
 
-  ret = register_driver(CONFIG_SYSLOG_DEVPATH, &g_ramlogfops, 0666, &g_sysdev);
-  if (ret < 0)
-    {
-      return ret;
-    }
-
-  /* Use the RAMLOG as the SYSLOG channel */
-
-  return syslog_channel(&g_ramlog_syslog_channel);
+  register_driver(CONFIG_SYSLOG_DEVPATH, &g_ramlogfops, 0666, &g_sysdev);
 }
 #endif
 
diff --git a/drivers/syslog/syslog_filechannel.c b/drivers/syslog/syslog_filechannel.c
index e7db192..ce6fa1f 100644
--- a/drivers/syslog/syslog_filechannel.c
+++ b/drivers/syslog/syslog_filechannel.c
@@ -178,8 +178,7 @@ int syslog_file_channel(FAR const char *devpath)
     {
       /* We should still be able to back-up and re-initialized everything */
 
-      syslog_initialize(SYSLOG_INIT_EARLY);
-      syslog_initialize(SYSLOG_INIT_LATE);
+      syslog_channel(saved_channel);
       goto errout_with_lock;
     }
 
diff --git a/drivers/syslog/syslog_initialize.c b/drivers/syslog/syslog_initialize.c
index 87c575b..45baf8d 100644
--- a/drivers/syslog/syslog_initialize.c
+++ b/drivers/syslog/syslog_initialize.c
@@ -71,7 +71,7 @@
  *   as a minimum a call to syslog_channel() to use the device.
  *
  * Input Parameters:
- *   phase - One of {SYSLOG_INIT_EARLY, SYSLOG_INIT_LATE}
+ *  None
  *
  * Returned Value:
  *   Zero (OK) is returned on success; a negated errno value is returned on
@@ -79,41 +79,26 @@
  *
  ****************************************************************************/
 
-int syslog_initialize(enum syslog_init_e phase)
+int syslog_initialize(void)
 {
   int ret = OK;
 
 #if defined(CONFIG_SYSLOG_CHAR)
-  if (phase == SYSLOG_INIT_LATE)
-    {
-      /* Enable use of a character device as the SYSLOG device */
-
-      ret = syslog_dev_channel();
-    }
-
-#elif defined(CONFIG_RAMLOG_SYSLOG)
-  if (phase == SYSLOG_INIT_EARLY)
-    {
-      /* Use the RAMLOG as the SYSLOG device */
-
-      ret = ramlog_syslog_channel();
-    }
+  /* Enable use of a character device as the SYSLOG device */
 
+  ret = syslog_dev_channel();
 #elif defined(CONFIG_SYSLOG_CONSOLE)
-  if (phase == SYSLOG_INIT_LATE)
-    {
-      /* Use the console device as the SYSLOG device */
+  /* Use the console device as the SYSLOG device */
 
-      ret = syslog_console_channel();
-    }
+  ret = syslog_console_channel();
+#endif
 
+#ifdef CONFIG_RAMLOG_SYSLOG
+  ramlog_syslog_register();
 #endif
 
 #ifdef CONFIG_SYSLOG_CHARDEV
-  if (phase == SYSLOG_INIT_EARLY)
-    {
-      syslog_register();
-    }
+  syslog_register();
 #endif
 
   return ret;
diff --git a/include/nuttx/syslog/ramlog.h b/include/nuttx/syslog/ramlog.h
index c25471e..a764eae 100644
--- a/include/nuttx/syslog/ramlog.h
+++ b/include/nuttx/syslog/ramlog.h
@@ -130,7 +130,7 @@ extern "C"
 int ramlog_register(FAR const char *devpath, FAR char *buffer, size_t buflen);
 
 /****************************************************************************
- * Name: ramlog_syslog_channel
+ * Name: ramlog_syslog_register
  *
  * Description:
  *   Create the RAM logging device and register it at the specified path.
@@ -139,7 +139,7 @@ int ramlog_register(FAR const char *devpath, FAR char *buffer, size_t buflen);
  ****************************************************************************/
 
 #ifdef CONFIG_RAMLOG_SYSLOG
-int ramlog_syslog_channel(void);
+void ramlog_syslog_register(void);
 #endif
 
 /****************************************************************************
diff --git a/include/nuttx/syslog/syslog.h b/include/nuttx/syslog/syslog.h
index cd9a982..de57bdd 100644
--- a/include/nuttx/syslog/syslog.h
+++ b/include/nuttx/syslog/syslog.h
@@ -97,15 +97,6 @@
  * Public Types
  ****************************************************************************/
 
-/* Initialization phases */
-
-enum syslog_init_e
-{
-  SYSLOG_INIT_RESET = 0, /* Power on SYSLOG initialization phase */
-  SYSLOG_INIT_EARLY,     /* Early initialization in up_initialize() */
-  SYSLOG_INIT_LATE       /* Late initialization in nx_start(). */
-};
-
 /* This structure provides the interface to a SYSLOG device */
 
 typedef CODE ssize_t (*syslog_write_t)(FAR const char *buf, size_t buflen);
@@ -181,7 +172,7 @@ int syslog_channel(FAR const struct syslog_channel_s *channel);
  *   as a minimum a call to syslog_channel() to use the device.
  *
  * Input Parameters:
- *   phase - One of {SYSLOG_INIT_EARLY, SYSLOG_INIT_LATE}
+ *   None
  *
  * Returned Value:
  *   Zero (OK) is returned on success; a negated errno value is returned on
@@ -190,9 +181,9 @@ int syslog_channel(FAR const struct syslog_channel_s *channel);
  ****************************************************************************/
 
 #ifndef CONFIG_ARCH_SYSLOG
-int syslog_initialize(enum syslog_init_e phase);
+int syslog_initialize(void);
 #else
-#  define syslog_initialize(phase)
+#  define syslog_initialize()
 #endif
 
 /****************************************************************************
diff --git a/sched/init/nx_start.c b/sched/init/nx_start.c
index 8992cd5..c840cb9 100644
--- a/sched/init/nx_start.c
+++ b/sched/init/nx_start.c
@@ -801,7 +801,7 @@ void nx_start(void)
    * depend on having IDLE task file structures setup.
    */
 
-  syslog_initialize(SYSLOG_INIT_LATE);
+  syslog_initialize();
 
 #ifdef CONFIG_SMP
   /* Start all CPUs *********************************************************/