FLASH progmem memory MTD: Need to register with PROCFS if enabled
This commit is contained in:
parent
7b590ec9a2
commit
1c86c004c4
@ -392,6 +392,12 @@ FAR struct mtd_dev_s *progmem_initialize(void)
|
||||
|
||||
g_progmem.blkshift = blkshift;
|
||||
g_progmem.initialized = true;
|
||||
|
||||
#ifdef CONFIG_MTD_REGISTRATION
|
||||
/* Register the MTD with the procfs system if enabled */
|
||||
|
||||
mtd_register(&priv->mtd, "progmem");
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Return the implementation-specific state structure as the MTD device */
|
||||
|
@ -321,8 +321,19 @@ static int skel_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
|
||||
|
||||
FAR struct mtd_dev_s *skel_initialize(void)
|
||||
{
|
||||
/* Allocate an instance of the private data structure -- OR, if there can
|
||||
* only be a single instance of the driver, then use a shared, global
|
||||
* device structure.
|
||||
*/
|
||||
|
||||
/* Perform initialization as necessary */
|
||||
|
||||
#ifdef CONFIG_MTD_REGISTRATION
|
||||
/* Register the MTD with the procfs system if enabled */
|
||||
|
||||
mtd_register(&priv->mtd, "skeleton");
|
||||
#endif
|
||||
|
||||
/* Return the implementation-specific state structure as the MTD device */
|
||||
|
||||
return (FAR struct mtd_dev_s *)&g_skeldev;
|
||||
|
Loading…
Reference in New Issue
Block a user