New procfs entries must be added BEFORE the procfs is mounted

This commit is contained in:
Gregory Nutt
2015-12-02 05:18:10 -06:00
parent dde6ba85a3
commit dd482c3f8b
@@ -65,6 +65,14 @@ int board_app_initialize(void)
#ifdef CONFIG_FS_PROCFS #ifdef CONFIG_FS_PROCFS
int ret; int ret;
#ifdef CONFIG_STM32_CCM_PROCFS
/* Register the CCM procfs entry. This must be done before the procfs is
* mounted.
*/
(void)ccm_procfs_register();
#endif
/* Mount the procfs file system */ /* Mount the procfs file system */
ret = mount(NULL, SAMV71_PROCFS_MOUNTPOINT, "procfs", 0, NULL); ret = mount(NULL, SAMV71_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
@@ -73,12 +81,6 @@ int board_app_initialize(void)
SYSLOG("ERROR: Failed to mount procfs at %s: %d\n", SYSLOG("ERROR: Failed to mount procfs at %s: %d\n",
SAMV71_PROCFS_MOUNTPOINT, ret); SAMV71_PROCFS_MOUNTPOINT, ret);
} }
#ifdef CONFIG_STM32_CCM_PROCFS
/* Register the CCM procfs entry */
(void)ccm_procfs_register();
#endif
#endif #endif
return OK; return OK;