summaryrefslogtreecommitdiff
path: root/nuttx/fs/fat
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/fs/fat')
-rw-r--r--nuttx/fs/fat/fs_fat32.c4
-rw-r--r--nuttx/fs/fat/fs_fat32.h8
-rw-r--r--nuttx/fs/fat/fs_fat32util.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/nuttx/fs/fat/fs_fat32.c b/nuttx/fs/fat/fs_fat32.c
index 60622e2f7..0c28cea67 100644
--- a/nuttx/fs/fat/fs_fat32.c
+++ b/nuttx/fs/fat/fs_fat32.c
@@ -405,7 +405,7 @@ static int fat_close(FAR struct file *filep)
if (ff->ff_buffer)
{
- fat_io_free(ff->ff_buffer);
+ fat_io_free(ff->ff_buffer, fs->fs_hwsectorsize);
}
/* Then free the file structure itself. */
@@ -1651,7 +1651,7 @@ static int fat_unbind(void *handle, FAR struct inode **blkdriver)
if (fs->fs_buffer)
{
- fat_io_free(fs->fs_buffer);
+ fat_io_free(fs->fs_buffer, fs->fs_hwsectorsize);
}
kfree(fs);
diff --git a/nuttx/fs/fat/fs_fat32.h b/nuttx/fs/fat/fs_fat32.h
index c7fa5219c..71a21333b 100644
--- a/nuttx/fs/fat/fs_fat32.h
+++ b/nuttx/fs/fat/fs_fat32.h
@@ -697,11 +697,11 @@
****************************************************************************/
#ifdef CONFIG_FAT_DMAMEMORY
-# define fat_io_alloc(s) fat_dma_alloc(s)
-# define fat_io_free(s) fat_dma_free(s)
+# define fat_io_alloc(s) fat_dma_alloc(s)
+# define fat_io_free(m,s) fat_dma_free(m,s)
#else
-# define fat_io_alloc(s) kmalloc(s)
-# define fat_io_free(s) kfree(s)
+# define fat_io_alloc(s) kmalloc(s)
+# define fat_io_free(m,s) kfree(m)
#endif
/****************************************************************************
diff --git a/nuttx/fs/fat/fs_fat32util.c b/nuttx/fs/fat/fs_fat32util.c
index f8f5ef495..7231456d7 100644
--- a/nuttx/fs/fat/fs_fat32util.c
+++ b/nuttx/fs/fat/fs_fat32util.c
@@ -668,7 +668,7 @@ int fat_mount(struct fat_mountpt_s *fs, bool writeable)
return OK;
errout_with_buffer:
- fat_io_free(fs->fs_buffer);
+ fat_io_free(fs->fs_buffer, fs->fs_hwsectorsize);
fs->fs_buffer = 0;
errout:
fs->fs_mounted = false;