public
/
FUZIX.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3fbcb29
)
devsd: Remove unused memory, fix return without releasing CS
author
Will Sowerbutts
<will@sowerbutts.com>
Sun, 25 Jan 2015 22:16:07 +0000
(22:16 +0000)
committer
Will Sowerbutts
<will@sowerbutts.com>
Sun, 25 Jan 2015 22:16:07 +0000
(22:16 +0000)
Kernel/dev/devsd.c
patch
|
blob
|
history
diff --git
a/Kernel/dev/devsd.c
b/Kernel/dev/devsd.c
index
b4dff17
..
939e37a
100644
(file)
--- a/
Kernel/dev/devsd.c
+++ b/
Kernel/dev/devsd.c
@@
-18,8
+18,6
@@
#include <stdbool.h>
#include <blkdev.h>
-static uint8_t sd_card_type[SD_DRIVE_COUNT];
-
/* internal functions */
static void sd_init_drive(uint8_t drive);
static int sd_spi_init(uint8_t drive);
@@
-52,9
+50,7
@@
static uint8_t devsd_transfer_sector(void)
sd_spi_transmit_byte(drive, 0xFF); /* dummy CRC */
sd_spi_transmit_byte(drive, 0xFF);
reply = sd_spi_receive_byte(drive);
- if((reply & 0x1f) != 0x05)
- return false; /* failed */
- return true; /* hooray! */
+ success = ((reply & 0x1f) == 0x05);
}
}
}else