From 9c43b2ce17cbc1f88b825ab8a5021575cee46dd7 Mon Sep 17 00:00:00 2001 From: Frank Gevaerts Date: Sun, 6 Jun 2010 13:20:47 +0000 Subject: Remove card_enable_monitoring() and use a mutex instead. The card_enable_monitoring() method actually didn't eliminate the possible race conditions it was meant to fix. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26627 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/disk.h | 3 ++- firmware/export/sd.h | 1 - firmware/export/sdmmc.h | 5 ----- 3 files changed, 2 insertions(+), 7 deletions(-) (limited to 'firmware/export') diff --git a/firmware/export/disk.h b/firmware/export/disk.h index cd937fdf66..d73a2a7f88 100644 --- a/firmware/export/disk.h +++ b/firmware/export/disk.h @@ -35,8 +35,9 @@ struct partinfo { #define PARTITION_TYPE_OS2_HIDDEN_C_DRIVE 0x84 /* returns a pointer to an array of 8 partinfo structs */ -struct partinfo* disk_init(IF_MD_NONVOID(int drive)); struct partinfo* disk_partinfo(int partition); + +void disk_init_subsystem(void); /* Initialises mutexes */ int disk_mount_all(void); /* returns the # of successful mounts */ int disk_mount(int drive); int disk_unmount(int drive); diff --git a/firmware/export/sd.h b/firmware/export/sd.h index 1c61364566..c798f54e9a 100644 --- a/firmware/export/sd.h +++ b/firmware/export/sd.h @@ -48,7 +48,6 @@ void sd_get_info(IF_MD2(int drive,) struct storage_info *info); #ifdef HAVE_HOTSWAP bool sd_removable(IF_MV_NONVOID(int drive)); bool sd_present(IF_MV_NONVOID(int drive)); -void card_enable_monitoring_target(bool on); #endif long sd_last_disk_activity(void); diff --git a/firmware/export/sdmmc.h b/firmware/export/sdmmc.h index 6ac3bd2af5..4351c85c42 100644 --- a/firmware/export/sdmmc.h +++ b/firmware/export/sdmmc.h @@ -57,17 +57,12 @@ typedef struct tCardInfo *card_get_info_target(int card_no); void sd_parse_csd(tCardInfo *card); -#ifdef HAVE_HOTSWAP -#define card_enable_monitoring card_enable_monitoring_target -#endif - #else /* STORAGE_MMC */ #include "ata_mmc.h" #define card_get_info mmc_card_info tCardInfo *mmc_card_info(int card_no); #define card_touched mmc_touched -#define card_enable_monitoring mmc_enable_monitoring #endif -- cgit v1.2.3