Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297359
b: refs/heads/master
c: 2b1ac5c
h: refs/heads/master
i:
  297357: 9e39b56
  297355: 00b6050
  297351: 8bebfed
  297343: 33b1e8f
v: v3
  • Loading branch information
Guennadi Liakhovetski authored and Chris Ball committed Mar 27, 2012
1 parent 0e732aa commit b449232
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 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: c9b0546a59293cabf54c85e1218da595af3274ff
refs/heads/master: 2b1ac5c2caccbfd43bd616321cbbe21eb33c7879
1 change: 1 addition & 0 deletions trunk/drivers/mmc/host/tmio_mmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ struct tmio_mmc_host {
spinlock_t lock; /* protect host private data */
unsigned long last_req_ts;
struct mutex ios_lock; /* protect set_ios() context */
bool native_hotplug;
};

int tmio_mmc_host_probe(struct tmio_mmc_host **host,
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/mmc/host/tmio_mmc_pio.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,10 @@ int __devinit tmio_mmc_host_probe(struct tmio_mmc_host **host,
else
mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;

_host->native_hotplug = !(pdata->flags & TMIO_MMC_HAS_COLD_CD ||
mmc->caps & MMC_CAP_NEEDS_POLL ||
mmc->caps & MMC_CAP_NONREMOVABLE);

pdata->power = false;
pm_runtime_enable(&pdev->dev);
ret = pm_runtime_resume(&pdev->dev);
Expand All @@ -934,9 +938,7 @@ int __devinit tmio_mmc_host_probe(struct tmio_mmc_host **host,
* additionally ensure that in case 2) the tmio mmc hardware stays
* powered on during runtime for the card detection to work.
*/
if (!(pdata->flags & TMIO_MMC_HAS_COLD_CD
|| mmc->caps & MMC_CAP_NEEDS_POLL
|| mmc->caps & MMC_CAP_NONREMOVABLE))
if (_host->native_hotplug)
pm_runtime_get_noresume(&pdev->dev);

tmio_mmc_clk_stop(_host);
Expand Down Expand Up @@ -996,9 +998,7 @@ void tmio_mmc_host_remove(struct tmio_mmc_host *host)
* the controller, the runtime PM is suspended and pdata->power == false,
* so, our .runtime_resume() will not try to detect a card in the slot.
*/
if (host->pdata->flags & TMIO_MMC_HAS_COLD_CD
|| host->mmc->caps & MMC_CAP_NEEDS_POLL
|| host->mmc->caps & MMC_CAP_NONREMOVABLE)
if (!host->native_hotplug)
pm_runtime_get_sync(&pdev->dev);

dev_pm_qos_hide_latency_limit(&pdev->dev);
Expand Down

0 comments on commit b449232

Please sign in to comment.