From: Will Sowerbutts Date: Sun, 25 Jan 2015 22:16:07 +0000 (+0000) Subject: devsd: Remove unused memory, fix return without releasing CS X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=5ee7cddcc5ce534fe0fffb9592158777007b307c;p=FUZIX.git devsd: Remove unused memory, fix return without releasing CS --- diff --git a/Kernel/dev/devsd.c b/Kernel/dev/devsd.c index b4dff17d..939e37a1 100644 --- a/Kernel/dev/devsd.c +++ b/Kernel/dev/devsd.c @@ -18,8 +18,6 @@ #include #include -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