From 19eb800f75db9746435868ff6837b7b3b506ac0a Mon Sep 17 00:00:00 2001 From: Frank Gevaerts Date: Sat, 1 Nov 2008 17:33:21 +0000 Subject: conditionalise *_get_info() to get some binsize back git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18965 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/ata.h | 3 +++ firmware/export/config.h | 4 ++++ firmware/export/mmc.h | 2 ++ firmware/export/nand.h | 2 ++ firmware/export/sd.h | 2 ++ firmware/export/storage.h | 4 ++++ 6 files changed, 17 insertions(+) (limited to 'firmware/export') diff --git a/firmware/export/ata.h b/firmware/export/ata.h index f09a4630d3..a5c2f6292a 100644 --- a/firmware/export/ata.h +++ b/firmware/export/ata.h @@ -47,7 +47,10 @@ void ata_spin(void); void ata_set_led_enabled(bool enabled); #endif unsigned short* ata_get_identify(void); + +#ifdef STORAGE_GET_INFO void ata_get_info(IF_MV2(int drive,) struct storage_info *info); +#endif #ifdef HAVE_HOTSWAP bool ata_removable(IF_MV_NONVOID(int drive)); bool ata_present(IF_MV_NONVOID(int drive)); diff --git a/firmware/export/config.h b/firmware/export/config.h index e04397b5bb..22a0bd2244 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h @@ -624,4 +624,8 @@ #endif #endif /* HAVE_HEADPHONE_DETECTION */ +#if defined(HAVE_USBSTACK) || (CONFIG_STORAGE & STORAGE_NAND) +#define STORAGE_GET_INFO +#endif + #endif /* __CONFIG_H__ */ diff --git a/firmware/export/mmc.h b/firmware/export/mmc.h index 2e7fb2441d..271d910763 100644 --- a/firmware/export/mmc.h +++ b/firmware/export/mmc.h @@ -44,7 +44,9 @@ void mmc_spin(void); void mmc_set_led_enabled(bool enabled); #endif +#ifdef STORAGE_GET_INFO void mmc_get_info(IF_MV2(int drive,) struct storage_info *info); +#endif #ifdef HAVE_HOTSWAP bool mmc_removable(IF_MV_NONVOID(int drive)); bool mmc_present(IF_MV_NONVOID(int drive)); diff --git a/firmware/export/nand.h b/firmware/export/nand.h index 3d4d1ce166..25aed46629 100644 --- a/firmware/export/nand.h +++ b/firmware/export/nand.h @@ -43,7 +43,9 @@ void nand_spin(void); void nand_set_led_enabled(bool enabled); #endif +#ifdef STORAGE_GET_INFO void nand_get_info(IF_MV2(int drive,) struct storage_info *info); +#endif long nand_last_disk_activity(void); diff --git a/firmware/export/sd.h b/firmware/export/sd.h index 8e1fa88ceb..fbb66cc9a9 100644 --- a/firmware/export/sd.h +++ b/firmware/export/sd.h @@ -43,7 +43,9 @@ void sd_spin(void); void sd_set_led_enabled(bool enabled); #endif +#ifdef STORAGE_GET_INFO void sd_get_info(IF_MV2(int drive,) struct storage_info *info); +#endif #ifdef HAVE_HOTSWAP bool sd_removable(IF_MV_NONVOID(int drive)); bool sd_present(IF_MV_NONVOID(int drive)); diff --git a/firmware/export/storage.h b/firmware/export/storage.h index 78d3360ba9..52c6f2bed1 100644 --- a/firmware/export/storage.h +++ b/firmware/export/storage.h @@ -197,6 +197,7 @@ static inline int storage_spinup_time(void) #endif } +#ifdef STORAGE_GET_INFO static inline void storage_get_info(IF_MV2(int drive,) struct storage_info *info) { #if (CONFIG_STORAGE & STORAGE_ATA) @@ -211,6 +212,7 @@ static inline void storage_get_info(IF_MV2(int drive,) struct storage_info *info #error No storage driver! #endif } +#endif #ifdef HAVE_HOTSWAP static inline bool storage_removable(IF_MV_NONVOID(int drive)) @@ -310,11 +312,13 @@ static inline int storage_spinup_time(void) return 0; } +#ifdef STORAGE_GET_INFO static inline void storage_get_info(IF_MV2(int drive,) struct storage_info *info) { IF_MV((void)drive;) (void)info; } +#endif #ifdef HAVE_HOTSWAP static inline bool storage_removable(IF_MV_NONVOID(int drive)) -- cgit v1.2.3