Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359875
b: refs/heads/master
c: 0e8752f
h: refs/heads/master
i:
  359873: eec4a21
  359871: 81b8454
v: v3
  • Loading branch information
Shinya Kuribayashi authored and Chris Ball committed Jan 28, 2013
1 parent 1e82ac3 commit c519244
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 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: 85033ef29f5ca3c362dcf79356c9ba8759b6d8ac
refs/heads/master: 0e8752f3a5c60e1b753bb320643145b3dfd4359c
25 changes: 16 additions & 9 deletions trunk/drivers/mmc/host/sh_mmcif.c
Original file line number Diff line number Diff line change
Expand Up @@ -1307,10 +1307,11 @@ static int sh_mmcif_probe(struct platform_device *pdev)
struct sh_mmcif_plat_data *pd = pdev->dev.platform_data;
struct resource *res;
void __iomem *reg;
const char *name;

irq[0] = platform_get_irq(pdev, 0);
irq[1] = platform_get_irq(pdev, 1);
if (irq[0] < 0 || irq[1] < 0) {
if (irq[0] < 0) {
dev_err(&pdev->dev, "Get irq error\n");
return -ENXIO;
}
Expand Down Expand Up @@ -1375,15 +1376,19 @@ static int sh_mmcif_probe(struct platform_device *pdev)
sh_mmcif_sync_reset(host);
sh_mmcif_writel(host->addr, MMCIF_CE_INT_MASK, MASK_ALL);

ret = request_threaded_irq(irq[0], sh_mmcif_intr, sh_mmcif_irqt, 0, "sh_mmc:error", host);
name = irq[1] < 0 ? dev_name(&pdev->dev) : "sh_mmc:error";
ret = request_threaded_irq(irq[0], sh_mmcif_intr, sh_mmcif_irqt, 0, name, host);
if (ret) {
dev_err(&pdev->dev, "request_irq error (sh_mmc:error)\n");
dev_err(&pdev->dev, "request_irq error (%s)\n", name);
goto ereqirq0;
}
ret = request_threaded_irq(irq[1], sh_mmcif_intr, sh_mmcif_irqt, 0, "sh_mmc:int", host);
if (ret) {
dev_err(&pdev->dev, "request_irq error (sh_mmc:int)\n");
goto ereqirq1;
if (irq[1] >= 0) {
ret = request_threaded_irq(irq[1], sh_mmcif_intr, sh_mmcif_irqt,
0, "sh_mmc:int", host);
if (ret) {
dev_err(&pdev->dev, "request_irq error (sh_mmc:int)\n");
goto ereqirq1;
}
}

if (pd && pd->use_cd_gpio) {
Expand All @@ -1406,7 +1411,8 @@ static int sh_mmcif_probe(struct platform_device *pdev)

emmcaddh:
erqcd:
free_irq(irq[1], host);
if (irq[1] >= 0)
free_irq(irq[1], host);
ereqirq1:
free_irq(irq[0], host);
ereqirq0:
Expand Down Expand Up @@ -1451,7 +1457,8 @@ static int sh_mmcif_remove(struct platform_device *pdev)
irq[1] = platform_get_irq(pdev, 1);

free_irq(irq[0], host);
free_irq(irq[1], host);
if (irq[1] >= 0)
free_irq(irq[1], host);

platform_set_drvdata(pdev, NULL);

Expand Down

0 comments on commit c519244

Please sign in to comment.