Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319140
b: refs/heads/master
c: 3b0fb97
h: refs/heads/master
v: v3
  • Loading branch information
Shubhrajyoti D authored and Wolfram Sang committed Jul 8, 2012
1 parent 85499a5 commit a30a0ca
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 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: 0861f430893e0b6fe980a71cdc5fb444b952b8e1
refs/heads/master: 3b0fb97c8dc476935670706873c27a474191ccce
14 changes: 11 additions & 3 deletions trunk/drivers/i2c/busses/i2c-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,9 @@ omap_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
int i;
int r;

pm_runtime_get_sync(dev->dev);
r = pm_runtime_get_sync(dev->dev);
if (IS_ERR_VALUE(r))
return r;

r = omap_i2c_wait_for_bb(dev);
if (r < 0)
Expand Down Expand Up @@ -1011,7 +1013,9 @@ omap_i2c_probe(struct platform_device *pdev)
dev->regs = (u8 *)reg_map_ip_v1;

pm_runtime_enable(dev->dev);
pm_runtime_get_sync(dev->dev);
r = pm_runtime_get_sync(dev->dev);
if (IS_ERR_VALUE(r))
goto err_free_mem;

dev->rev = omap_i2c_read_reg(dev, OMAP_I2C_REV_REG) & 0xff;

Expand Down Expand Up @@ -1103,12 +1107,16 @@ omap_i2c_remove(struct platform_device *pdev)
{
struct omap_i2c_dev *dev = platform_get_drvdata(pdev);
struct resource *mem;
int ret;

platform_set_drvdata(pdev, NULL);

free_irq(dev->irq, dev);
i2c_del_adapter(&dev->adapter);
pm_runtime_get_sync(&pdev->dev);
ret = pm_runtime_get_sync(&pdev->dev);
if (IS_ERR_VALUE(ret))
return ret;

omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0);
pm_runtime_put(&pdev->dev);
pm_runtime_disable(&pdev->dev);
Expand Down

0 comments on commit a30a0ca

Please sign in to comment.