From daf26128d7e93c499edefdd89624fcc9d64bca5c Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sun, 27 Jan 2019 11:27:46 -0600 Subject: [PATCH] include/nuttx/fs/fs.h: Move the union inode_ops_u i_mtd field into the mount section of inode_ops_u and remove the guard to simplify fs which support both block and mtd. --- include/nuttx/fs/fs.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/nuttx/fs/fs.h b/include/nuttx/fs/fs.h index 51066ee3ed1..c83f5682b52 100644 --- a/include/nuttx/fs/fs.h +++ b/include/nuttx/fs/fs.h @@ -378,6 +378,7 @@ union inode_ops_u FAR const struct file_operations *i_ops; /* Driver operations for inode */ #ifndef CONFIG_DISABLE_MOUNTPOINT FAR const struct block_operations *i_bops; /* Block driver operations */ + FAR struct mtd_dev_s *i_mtd; /* MTD device driver */ FAR const struct mountpt_operations *i_mops; /* Operations on a mountpoint */ #endif #ifdef CONFIG_FS_NAMED_SEMAPHORES @@ -386,9 +387,6 @@ union inode_ops_u #ifndef CONFIG_DISABLE_MQUEUE FAR struct mqueue_inode_s *i_mqueue; /* POSIX message queue */ #endif -#ifdef CONFIG_MTD - FAR struct mtd_dev_s *i_mtd; /* MTD device driver */ -#endif #ifdef CONFIG_PSEUDOFS_SOFTLINKS FAR char *i_link; /* Full path to link target */ #endif