Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333365
b: refs/heads/master
c: e89cec7
h: refs/heads/master
i:
  333363: 6bf659a
v: v3
  • Loading branch information
Linus Walleij authored and Wolfram Sang committed Sep 12, 2012
1 parent 70caee0 commit 92504f2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 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: 5c3d8a46ac9778d117ca26f4fec18d7b8c8831ed
refs/heads/master: e89cec7ff86febe51eff001c0bf2c81ce601cfe4
17 changes: 0 additions & 17 deletions trunk/drivers/i2c/busses/i2c-nomadik.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/regulator/consumer.h>
#include <linux/pm_runtime.h>
#include <linux/platform_data/i2c-nomadik.h>

Expand Down Expand Up @@ -146,7 +145,6 @@ struct i2c_nmk_client {
* @stop: stop condition.
* @xfer_complete: acknowledge completion for a I2C message.
* @result: controller propogated result.
* @regulator: pointer to i2c regulator.
* @busy: Busy doing transfer.
*/
struct nmk_i2c_dev {
Expand All @@ -160,7 +158,6 @@ struct nmk_i2c_dev {
int stop;
struct completion xfer_complete;
int result;
struct regulator *regulator;
bool busy;
};

Expand Down Expand Up @@ -643,8 +640,6 @@ static int nmk_i2c_xfer(struct i2c_adapter *i2c_adap,

dev->busy = true;

if (dev->regulator)
regulator_enable(dev->regulator);
pm_runtime_get_sync(&dev->adev->dev);

clk_enable(dev->clk);
Expand Down Expand Up @@ -676,8 +671,6 @@ static int nmk_i2c_xfer(struct i2c_adapter *i2c_adap,
out:
clk_disable(dev->clk);
pm_runtime_put_sync(&dev->adev->dev);
if (dev->regulator)
regulator_disable(dev->regulator);

dev->busy = false;

Expand Down Expand Up @@ -957,12 +950,6 @@ static int nmk_i2c_probe(struct amba_device *adev, const struct amba_id *id)
goto err_irq;
}

dev->regulator = regulator_get(&adev->dev, "v-i2c");
if (IS_ERR(dev->regulator)) {
dev_warn(&adev->dev, "could not get i2c regulator\n");
dev->regulator = NULL;
}

pm_suspend_ignore_children(&adev->dev, true);

dev->clk = clk_get(&adev->dev, NULL);
Expand Down Expand Up @@ -1009,8 +996,6 @@ static int nmk_i2c_probe(struct amba_device *adev, const struct amba_id *id)
err_add_adap:
clk_put(dev->clk);
err_no_clk:
if (dev->regulator)
regulator_put(dev->regulator);
free_irq(dev->irq, dev);
err_irq:
iounmap(dev->virtbase);
Expand Down Expand Up @@ -1038,8 +1023,6 @@ static int nmk_i2c_remove(struct amba_device *adev)
if (res)
release_mem_region(res->start, resource_size(res));
clk_put(dev->clk);
if (dev->regulator)
regulator_put(dev->regulator);
pm_runtime_disable(&adev->dev);
amba_set_drvdata(adev, NULL);
kfree(dev);
Expand Down

0 comments on commit 92504f2

Please sign in to comment.