From: Gabriel Somlo Date: Sun, 14 Jun 2020 01:34:11 +0000 (-0400) Subject: liblitesdcard/spisdcard: streamline initialization (cosmetic). X-Git-Tag: 24jan2021_ls180~176^2~1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c05d0f196649c4e399d2c9f7a21606fccfb5a7e4;p=litex.git liblitesdcard/spisdcard: streamline initialization (cosmetic). --- diff --git a/litex/soc/software/liblitesdcard/spisdcard.c b/litex/soc/software/liblitesdcard/spisdcard.c index 19cbaf7a..510c34fe 100644 --- a/litex/soc/software/liblitesdcard/spisdcard.c +++ b/litex/soc/software/liblitesdcard/spisdcard.c @@ -276,14 +276,9 @@ DSTATUS disk_status(uint8_t drv) { } DSTATUS disk_initialize(uint8_t drv) { - uint8_t r; - - if (drv) return RES_NOTRDY; - - r = spisdcard_init(); + if (drv) return STA_NOINIT; + spisdcardstatus = spisdcard_init() ? 0 : STA_NOINIT; spisdcard_deselect(); - - spisdcardstatus = r ? 0 : STA_NOINIT; return spisdcardstatus; }