diff options
author | Frank Gevaerts <frank@gevaerts.be> | 2011-09-18 12:51:54 +0000 |
---|---|---|
committer | Frank Gevaerts <frank@gevaerts.be> | 2011-09-18 12:51:54 +0000 |
commit | 85ad768b6e0933bec1f05775dd48574710e96d08 (patch) | |
tree | 093d514eb6718d21b3ca73d8ff0d2fb133b82e85 | |
parent | 28d5f2aa57e8963a82849b2009274e8272094c86 (diff) | |
download | rockbox-85ad768b6e0933bec1f05775dd48574710e96d08.tar.gz rockbox-85ad768b6e0933bec1f05775dd48574710e96d08.zip |
Don't use NUM_VOLUMES as array size in sd card drivers. NUM_DRIVES is also wrong (the total number of drives in the system is not really related to the number of sd devices), but at least it's less wrong than NUM_VOLUMES and it matches the (wrong) assumptions the rest of the drivers make
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30569 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/target/arm/as3525/sd-as3525.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/s3c2440/sd-s3c2440.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/firmware/target/arm/as3525/sd-as3525.c b/firmware/target/arm/as3525/sd-as3525.c index b36c326cb6..6a8606af6a 100644 --- a/firmware/target/arm/as3525/sd-as3525.c +++ b/firmware/target/arm/as3525/sd-as3525.c | |||
@@ -137,7 +137,7 @@ static bool hs_card = false; | |||
137 | #endif | 137 | #endif |
138 | 138 | ||
139 | static struct semaphore transfer_completion_signal; | 139 | static struct semaphore transfer_completion_signal; |
140 | static volatile unsigned int transfer_error[NUM_VOLUMES]; | 140 | static volatile unsigned int transfer_error[NUM_DRIVES]; |
141 | #define PL180_MAX_TRANSFER_ERRORS 10 | 141 | #define PL180_MAX_TRANSFER_ERRORS 10 |
142 | 142 | ||
143 | #define UNALIGNED_NUM_SECTORS 10 | 143 | #define UNALIGNED_NUM_SECTORS 10 |
diff --git a/firmware/target/arm/s3c2440/sd-s3c2440.c b/firmware/target/arm/s3c2440/sd-s3c2440.c index 0dcd900d11..2269e6f6d0 100644 --- a/firmware/target/arm/s3c2440/sd-s3c2440.c +++ b/firmware/target/arm/s3c2440/sd-s3c2440.c | |||
@@ -120,7 +120,7 @@ static const char sd_thread_name[] = "sd"; | |||
120 | static struct mutex sd_mtx SHAREDBSS_ATTR; | 120 | static struct mutex sd_mtx SHAREDBSS_ATTR; |
121 | static struct event_queue sd_queue; | 121 | static struct event_queue sd_queue; |
122 | static struct semaphore transfer_completion_signal; | 122 | static struct semaphore transfer_completion_signal; |
123 | static volatile unsigned int transfer_error[NUM_VOLUMES]; | 123 | static volatile unsigned int transfer_error[NUM_DRIVES]; |
124 | /* align on cache line size */ | 124 | /* align on cache line size */ |
125 | static unsigned char aligned_buffer[UNALIGNED_NUM_SECTORS * SD_BLOCK_SIZE] | 125 | static unsigned char aligned_buffer[UNALIGNED_NUM_SECTORS * SD_BLOCK_SIZE] |
126 | __attribute__((aligned(32))); | 126 | __attribute__((aligned(32))); |