mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
staging: mt7621-mmc: Fix different caps for different devices
Current code saves the need for polling in a global variable, that leeds to problems, when the driver should handle multiple devices with different capabilities. By looking up the capability in the mmc_host capabilities, they now have per device scope. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c13b45c555
commit
5e5c114d54
1 changed files with 2 additions and 4 deletions
|
|
@ -153,7 +153,6 @@
|
|||
static struct msdc_regs *msdc_reg[HOST_MAX_NUM];
|
||||
#endif
|
||||
|
||||
static int mtk_sw_poll;
|
||||
|
||||
static int cd_active_low = 1;
|
||||
|
||||
|
|
@ -2361,7 +2360,7 @@ static irqreturn_t msdc_irq(int irq, void *dev_id)
|
|||
|
||||
/* card change interrupt */
|
||||
if (intsts & MSDC_INT_CDSC) {
|
||||
if (mtk_sw_poll)
|
||||
if (host->mmc->caps & MMC_CAP_NEEDS_POLL)
|
||||
return IRQ_HANDLED;
|
||||
IRQ_MSG("MSDC_INT_CDSC irq<0x%.8x>", intsts);
|
||||
#if 0 /* ---/+++ by chhung: fix slot mechanical bounce issue */
|
||||
|
|
@ -2739,9 +2738,8 @@ static int msdc_drv_probe(struct platform_device *pdev)
|
|||
mmc->caps |= MMC_CAP_SDIO_IRQ; /* yes for sdio */
|
||||
|
||||
cd_active_low = !of_property_read_bool(pdev->dev.of_node, "mediatek,cd-high");
|
||||
mtk_sw_poll = of_property_read_bool(pdev->dev.of_node, "mediatek,cd-poll");
|
||||
|
||||
if (mtk_sw_poll)
|
||||
if (of_property_read_bool(pdev->dev.of_node, "mediatek,cd-poll"))
|
||||
mmc->caps |= MMC_CAP_NEEDS_POLL;
|
||||
|
||||
/* MMC core transfer sizes tunable parameters */
|
||||
|
|
|
|||
Loading…
Reference in a new issue