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)
committerChris Ball <cjb@laptop.org>
Wed, 20 Jul 2011 21:20:54 +0000 (17:20 -0400)
commit0a2d4048a22079d7e79d6654bbacbef57bd5728a
tree3de4e928e43786b215271d467e77cf6e20a2e724
parent6e83e10d92e12fa0181766a1fbb00d857bfab779
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.

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