diff options
Diffstat (limited to 'nuttx/drivers/mtd/ftl.c')
-rwxr-xr-x | nuttx/drivers/mtd/ftl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nuttx/drivers/mtd/ftl.c b/nuttx/drivers/mtd/ftl.c index 08fa94203..43c4b3aed 100755 --- a/nuttx/drivers/mtd/ftl.c +++ b/nuttx/drivers/mtd/ftl.c @@ -473,9 +473,12 @@ int ftl_initialize(int minor, ubyte *buffer, FAR struct mtd_dev_s *mtd) dev->mtd = mtd; - /* Get the device geometry */ + /* Get the device geometry. (casting to uintptr first eliminates + * complaints on some architectures where the sizeof long is different + * from the size of a pointer). + */ - ret = MTD_IOCTL(mtd, MTDIOC_GEOMETRY, (unsigned long)&dev->geo); + ret = MTD_IOCTL(mtd, MTDIOC_GEOMETRY, (unsigned long)((uintptr)&dev->geo)); if (ret < 0) { fdbg("MTD ioctl(MTDIOC_GEOMETRY) failed: %d\n", ret); |