summaryrefslogtreecommitdiff
path: root/nuttx/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/drivers')
-rw-r--r--nuttx/drivers/mtd/smart.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/nuttx/drivers/mtd/smart.c b/nuttx/drivers/mtd/smart.c
index c20656565..9de557b5f 100644
--- a/nuttx/drivers/mtd/smart.c
+++ b/nuttx/drivers/mtd/smart.c
@@ -2084,8 +2084,10 @@ int smart_initialize(int minor, FAR struct mtd_dev_s *mtd)
/* Set these to zero in case the device doesn't support them */
+#ifdef CONFIG_MTD_SUBSECTOR_ERASE
dev->geo.subsectorsize= 0;
dev->geo.nsubsectors = 0;
+#endif
ret = MTD_IOCTL(mtd, MTDIOC_GEOMETRY, (unsigned long)((uintptr_t)&dev->geo));
if (ret < 0)
{