Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 220589
b: refs/heads/master
c: 19ca750
h: refs/heads/master
i:
  220587: 902b411
v: v3
  • Loading branch information
Arnd Hannemann authored and Samuel Ortiz committed Oct 28, 2010
1 parent 7f49db0 commit adcef9c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9b16c0a43b74393cc18666a7748293812c61af1f
refs/heads/master: 19ca7502c508595edfb963e5dbcf62854a926506
13 changes: 13 additions & 0 deletions trunk/drivers/mmc/host/tmio_mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,10 +756,23 @@ static int tmio_mmc_get_ro(struct mmc_host *mmc)
(sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT)) ? 0 : 1;
}

static int tmio_mmc_get_cd(struct mmc_host *mmc)
{
struct tmio_mmc_host *host = mmc_priv(mmc);
struct mfd_cell *cell = host->pdev->dev.platform_data;
struct tmio_mmc_data *pdata = cell->driver_data;

if (!pdata->get_cd)
return -ENOSYS;
else
return pdata->get_cd(host->pdev);
}

static const struct mmc_host_ops tmio_mmc_ops = {
.request = tmio_mmc_request,
.set_ios = tmio_mmc_set_ios,
.get_ro = tmio_mmc_get_ro,
.get_cd = tmio_mmc_get_cd,
};

#ifdef CONFIG_PM
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/mfd/tmio.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ struct tmio_mmc_data {
struct tmio_mmc_dma *dma;
void (*set_pwr)(struct platform_device *host, int state);
void (*set_clk_div)(struct platform_device *host, int state);
int (*get_cd)(struct platform_device *host);
};

/*
Expand Down

0 comments on commit adcef9c

Please sign in to comment.