mmc: block: allow get_card_status() to return error status
authorRussell King - ARM Linux <linux@arm.linux.org.uk>
Mon, 20 Jun 2011 19:10:08 +0000 (20:10 +0100)
committerKen Sumrall <ksumrall@android.com>
Thu, 27 Oct 2011 00:11:38 +0000 (17:11 -0700)
commit6be918e0b229a7eeb81c1c09d5009a78aa88bc4a
treed5679be03931b33b6ec0723f7b19aba740439f02
parentd5b9284a583a7bb073633dbddb4cbb25d1fc0c67
mmc: block: allow get_card_status() to return error status

If the MMC_SEND_STATUS command is not successful, we should not return
a zero status word, but instead allow the caller to know positively
that an error occurred.

Convert the open-coded get_card_status() to use the helper function,
and provide definitions for the card state field.

Change-Id: Icfd6258af78a89c21abac386c556153fa3fac364
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/card/block.c
include/linux/mmc/mmc.h