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)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 20:25:25 +0000 (12:25 -0800)
commit1e2c5303d3c370e87e0bb8f8bcb5b31c3168bfe9
tree85f29a4dc8305b7a3dffbb40dfc028b2f198351b
parent6ac6ac3e93e4ad24df864ff906159d0c47fdfe3f
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