summaryrefslogtreecommitdiffstats
path: root/firmware/storage.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2013-08-17 12:18:22 -0400
committerMichael Sevakis <jethead71@rockbox.org>2013-08-17 12:18:22 -0400
commita56f1ca1ed63b93eb61fd5319f47347b3eb1e364 (patch)
tree62a253ba44b23c1867cef59fee40b40092719ee1 /firmware/storage.c
parentc13f21a4d5c27c638c9f0dedf6d7b1f9bbb4d682 (diff)
downloadrockbox-a56f1ca1ed63b93eb61fd5319f47347b3eb1e364.tar.gz
rockbox-a56f1ca1ed63b93eb61fd5319f47347b3eb1e364.tar.bz2
rockbox-a56f1ca1ed63b93eb61fd5319f47347b3eb1e364.zip
Cleanup MV/MD macros a little.
When using variadic macros there's no need for IF_MD2/IF_MV2 to deal with function parameters. IF_MD/IF_MV are enough. Throw in IF_MD_DRV/ID_MV_VOL that return the parameter if MD/MV, or 0 if not. Change-Id: I7605e6039f3be19cb47110c84dcb3c5516f2c3eb
Diffstat (limited to 'firmware/storage.c')
-rw-r--r--firmware/storage.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/firmware/storage.c b/firmware/storage.c
index 0f78712784..8740e4ebd2 100644
--- a/firmware/storage.c
+++ b/firmware/storage.c
@@ -83,7 +83,7 @@ static void storage_wait_turn(IF_MD_NONVOID(int drive))
}
#endif
-int storage_read_sectors(IF_MD2(int drive,) unsigned long start, int count,
+int storage_read_sectors(IF_MD(int drive,) unsigned long start, int count,
void* buf)
{
#ifdef HAVE_IO_PRIORITY
@@ -98,38 +98,38 @@ int storage_read_sectors(IF_MD2(int drive,) unsigned long start, int count,
{
#if (CONFIG_STORAGE & STORAGE_ATA)
case STORAGE_ATA:
- return ata_read_sectors(IF_MD2(ldrive,) start,count,buf);
+ return ata_read_sectors(IF_MD(ldrive,) start,count,buf);
#endif
#if (CONFIG_STORAGE & STORAGE_MMC)
case STORAGE_MMC:
- return mmc_read_sectors(IF_MD2(ldrive,) start,count,buf);
+ return mmc_read_sectors(IF_MD(ldrive,) start,count,buf);
#endif
#if (CONFIG_STORAGE & STORAGE_SD)
case STORAGE_SD:
- return sd_read_sectors(IF_MD2(ldrive,) start,count,buf);
+ return sd_read_sectors(IF_MD(ldrive,) start,count,buf);
#endif
#if (CONFIG_STORAGE & STORAGE_NAND)
case STORAGE_NAND:
- return nand_read_sectors(IF_MD2(ldrive,) start,count,buf);
+ return nand_read_sectors(IF_MD(ldrive,) start,count,buf);
#endif
#if (CONFIG_STORAGE & STORAGE_RAMDISK)
case STORAGE_RAMDISK:
- return ramdisk_read_sectors(IF_MD2(ldrive,) start,count,buf);
+ return ramdisk_read_sectors(IF_MD(ldrive,) start,count,buf);
#endif
}
return -1;
#else /* CONFIG_STORAGE_MULTI */
- return STORAGE_FUNCTION(read_sectors)(IF_MD2(drive,)start,count,buf);
+ return STORAGE_FUNCTION(read_sectors)(IF_MD(drive,)start,count,buf);
#endif /* CONFIG_STORAGE_MULTI */
}
-int storage_write_sectors(IF_MD2(int drive,) unsigned long start, int count,
+int storage_write_sectors(IF_MD(int drive,) unsigned long start, int count,
const void* buf)
{
#ifdef HAVE_IO_PRIORITY
@@ -144,33 +144,33 @@ int storage_write_sectors(IF_MD2(int drive,) unsigned long start, int count,
{
#if (CONFIG_STORAGE & STORAGE_ATA)
case STORAGE_ATA:
- return ata_write_sectors(IF_MD2(ldrive,)start,count,buf);
+ return ata_write_sectors(IF_MD(ldrive,)start,count,buf);
#endif
#if (CONFIG_STORAGE & STORAGE_MMC)
case STORAGE_MMC:
- return mmc_write_sectors(IF_MD2(ldrive,)start,count,buf);
+ return mmc_write_sectors(IF_MD(ldrive,)start,count,buf);
#endif
#if (CONFIG_STORAGE & STORAGE_SD)
case STORAGE_SD:
- return sd_write_sectors(IF_MD2(ldrive,)start,count,buf);
+ return sd_write_sectors(IF_MD(ldrive,)start,count,buf);
#endif
#if (CONFIG_STORAGE & STORAGE_NAND)
case STORAGE_NAND:
- return nand_write_sectors(IF_MD2(ldrive,)start,count,buf);
+ return nand_write_sectors(IF_MD(ldrive,)start,count,buf);
#endif
#if (CONFIG_STORAGE & STORAGE_RAMDISK)
case STORAGE_RAMDISK:
- return ramdisk_write_sectors(IF_MD2(ldrive,)start,count,buf);
+ return ramdisk_write_sectors(IF_MD(ldrive,)start,count,buf);
#endif
}
return -1;
#else /* CONFIG_STORAGE_MULTI */
- return STORAGE_FUNCTION(write_sectors)(IF_MD2(drive,)start,count,buf);
+ return STORAGE_FUNCTION(write_sectors)(IF_MD(drive,)start,count,buf);
#endif /* CONFIG_STORAGE_MULTI */
}