greybus: sdio: fix card removable detection
authorRui Miguel Silva <rui.silva@linaro.org>
Thu, 8 Oct 2015 11:10:52 +0000 (12:10 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 9 Oct 2015 21:02:06 +0000 (14:02 -0700)
commit6cac7dc3aaaef8161ac80c5980cec10427996abf
tree9f2b76acd4cda66b1c4e76bf0b3a27349da39a8e
parente0f875c336f792d4c2b0d09436426724ae14713e
greybus: sdio: fix card removable detection

In kernel versions bellow 3.15, the mmc_card_is_removable helper
function has an extra check used for a suspend/resume hack. This made
the gd_sdio_process_event to behave badly handling the module card
insert event in that versions.

So, just test bit the flag that we need, instead of using the helper
function. This way will work in all kernel versions.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/sdio.c