Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308329
b: refs/heads/master
c: 31b0ff5
h: refs/heads/master
i:
  308327: 74b0fe5
v: v3
  • Loading branch information
Shawn Guo committed May 13, 2012
1 parent 6445967 commit a80c050
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b60188c820347040087bfe329f77b286dfd50a7e
refs/heads/master: 31b0ff5e7390a955f0d7279ab922e4b41469729d
11 changes: 4 additions & 7 deletions trunk/drivers/mmc/host/mxs-mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,21 +160,17 @@ struct mxs_mmc_host {
unsigned char bus_width;
spinlock_t lock;
int sdio_irq_en;
int wp_gpio;
};

static int mxs_mmc_get_ro(struct mmc_host *mmc)
{
struct mxs_mmc_host *host = mmc_priv(mmc);
struct mxs_mmc_platform_data *pdata =
mmc_dev(host->mmc)->platform_data;

if (!pdata)
return -EFAULT;

if (!gpio_is_valid(pdata->wp_gpio))
if (!gpio_is_valid(host->wp_gpio))
return -EINVAL;

return gpio_get_value(pdata->wp_gpio);
return gpio_get_value(host->wp_gpio);
}

static int mxs_mmc_get_cd(struct mmc_host *mmc)
Expand Down Expand Up @@ -758,6 +754,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA;
if (pdata->flags & SLOTF_4_BIT_CAPABLE)
mmc->caps |= MMC_CAP_4_BIT_DATA;
host->wp_gpio = pdata->wp_gpio;
}

mmc->f_min = 400000;
Expand Down

0 comments on commit a80c050

Please sign in to comment.