Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333385
b: refs/heads/master
c: ac79e4b
h: refs/heads/master
i:
  333383: e9c95ac
v: v3
  • Loading branch information
Felipe Balbi authored and Wolfram Sang committed Sep 12, 2012
1 parent 28f68b8 commit 6c4308f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 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: 1d7afc95946487945cc7f5019b41255b72224b70
refs/heads/master: ac79e4b24972c69debef90a5e16b145e59222388
12 changes: 7 additions & 5 deletions trunk/drivers/i2c/busses/i2c-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -993,11 +993,12 @@ omap_i2c_probe(struct platform_device *pdev)
{
struct omap_i2c_dev *dev;
struct i2c_adapter *adap;
struct resource *mem, *irq;
struct resource *mem;
struct omap_i2c_bus_platform_data *pdata = pdev->dev.platform_data;
struct device_node *node = pdev->dev.of_node;
const struct of_device_id *match;
irq_handler_t isr;
int irq;
int r;

/* NOTE: driver uses the static register mapping */
Expand All @@ -1006,10 +1007,11 @@ omap_i2c_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "no mem resource?\n");
return -ENODEV;
}
irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!irq) {

irq = platform_get_irq(pdev, 0);
if (irq < 0) {
dev_err(&pdev->dev, "no irq resource?\n");
return -ENODEV;
return irq;
}

dev = devm_kzalloc(&pdev->dev, sizeof(struct omap_i2c_dev), GFP_KERNEL);
Expand Down Expand Up @@ -1043,7 +1045,7 @@ omap_i2c_probe(struct platform_device *pdev)
}

dev->dev = &pdev->dev;
dev->irq = irq->start;
dev->irq = irq;

platform_set_drvdata(pdev, dev);
init_completion(&dev->cmd_complete);
Expand Down

0 comments on commit 6c4308f

Please sign in to comment.