You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/01/30 03:09:46 UTC

[nuttx] branch master updated (631a8da1e2 -> 0842a291e0)

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

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


    from 631a8da1e2 sched: Map SCHED_OTHER to SCHED_FIFO or SCHED_RR
     new 28f92e8238 [MTD/SmartFS] Extract register_driver call to own function
     new 0842a291e0 [Drivers] Add smart_loop_register_driver call to drivers_initialize

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 drivers/drivers_initialize.c |  5 +++++
 drivers/mtd/smart.c          | 18 ++++++++++++++----
 include/nuttx/fs/smart.h     |  4 ++++
 3 files changed, 23 insertions(+), 4 deletions(-)


[nuttx] 02/02: [Drivers] Add smart_loop_register_driver call to drivers_initialize

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 0842a291e0cab6bc51a6cce285138bdb9d462d37
Author: Oleksandr Oryshchenko <a....@gmail.com>
AuthorDate: Sun Jan 29 16:43:43 2023 +0100

    [Drivers] Add smart_loop_register_driver call to drivers_initialize
---
 drivers/drivers_initialize.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/drivers_initialize.c b/drivers/drivers_initialize.c
index 9a1377edc2..9798b2cad2 100644
--- a/drivers/drivers_initialize.c
+++ b/drivers/drivers_initialize.c
@@ -28,6 +28,7 @@
 #include <nuttx/drivers/rpmsgdev.h>
 #include <nuttx/drivers/rpmsgblk.h>
 #include <nuttx/fs/loop.h>
+#include <nuttx/fs/smart.h>
 #include <nuttx/input/uinput.h>
 #include <nuttx/mtd/mtd.h>
 #include <nuttx/net/loopback.h>
@@ -184,4 +185,8 @@ void drivers_initialize(void)
 
   usrsock_rpmsg_server_initialize();
 #endif
+
+#ifdef CONFIG_SMART_DEV_LOOP
+  smart_loop_register_driver();
+#endif
 }


[nuttx] 01/02: [MTD/SmartFS] Extract register_driver call to own function

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 28f92e8238a2684bf943f8ed6f415e6c201ba88f
Author: Oleksandr Oryshchenko <a....@gmail.com>
AuthorDate: Sun Jan 29 16:42:59 2023 +0100

    [MTD/SmartFS] Extract register_driver call to own function
---
 drivers/mtd/smart.c      | 18 ++++++++++++++----
 include/nuttx/fs/smart.h |  4 ++++
 2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/smart.c b/drivers/mtd/smart.c
index b932116597..d0ca3fca09 100644
--- a/drivers/mtd/smart.c
+++ b/drivers/mtd/smart.c
@@ -6289,10 +6289,6 @@ int smart_initialize(int minor, FAR struct mtd_dev_s *mtd,
         }
     }
 
-#ifdef CONFIG_SMART_DEV_LOOP
-  register_driver("/dev/smart", &g_fops, 0666, NULL);
-#endif
-
   return OK;
 
 errout:
@@ -6320,6 +6316,20 @@ errout:
   return ret;
 }
 
+/****************************************************************************
+ * Name: smart_loop_register_driver
+ *
+ * Description:
+ *   Registers SmartFS Loop Driver
+ ****************************************************************************/
+
+#ifdef CONFIG_SMART_DEV_LOOP
+int smart_loop_register_driver(void)
+{
+  return register_driver("/dev/smart", &g_fops, 0666, NULL);
+}
+#endif
+
 /****************************************************************************
  * Name: smart_losetup
  *
diff --git a/include/nuttx/fs/smart.h b/include/nuttx/fs/smart.h
index 935804ed7b..bab05ca680 100644
--- a/include/nuttx/fs/smart.h
+++ b/include/nuttx/fs/smart.h
@@ -152,6 +152,10 @@ extern "C"
  * Public Function Prototypes
  ****************************************************************************/
 
+#ifdef CONFIG_SMART_DEV_LOOP
+int smart_loop_register_driver(void);
+#endif
+
 #undef EXTERN
 #ifdef __cplusplus
 }