Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140480
b: refs/heads/master
c: e1a55f5
h: refs/heads/master
v: v3
  • Loading branch information
Adrian Hunter authored and Pierre Ossman committed Mar 24, 2009
1 parent 91a9e13 commit aba83db
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: 731530104afa6310660455ad86353dbe9e226740
refs/heads/master: e1a55f5eeae90de3f1113dea8cd40d54e1562abf
11 changes: 7 additions & 4 deletions trunk/drivers/mmc/host/omap_hsmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,10 @@ static void mmc_omap_detect(struct work_struct *work)
mmc_carddetect_work);
struct omap_mmc_slot_data *slot = &mmc_slot(host);

host->carddetect = slot->card_detect(slot->card_detect_irq);
if (mmc_slot(host).card_detect)
host->carddetect = slot->card_detect(slot->card_detect_irq);
else
host->carddetect = -ENOSYS;

sysfs_notify(&host->mmc->class_dev.kobj, NULL, "cover_switch");
if (host->carddetect) {
Expand Down Expand Up @@ -1089,7 +1092,7 @@ static int __init omap_mmc_probe(struct platform_device *pdev)
}

/* Request IRQ for card detect */
if ((mmc_slot(host).card_detect_irq) && (mmc_slot(host).card_detect)) {
if ((mmc_slot(host).card_detect_irq)) {
ret = request_irq(mmc_slot(host).card_detect_irq,
omap_mmc_cd_handler,
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING
Expand All @@ -1112,8 +1115,8 @@ static int __init omap_mmc_probe(struct platform_device *pdev)
if (ret < 0)
goto err_slot_name;
}
if (mmc_slot(host).card_detect_irq && mmc_slot(host).card_detect &&
host->pdata->slots[host->slot_id].get_cover_state) {
if (mmc_slot(host).card_detect_irq &&
host->pdata->slots[host->slot_id].get_cover_state) {
ret = device_create_file(&mmc->class_dev,
&dev_attr_cover_switch);
if (ret < 0)
Expand Down

0 comments on commit aba83db

Please sign in to comment.