Commit 650cf77d authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-31-rc3/i2c-fixes' of git://git.fluff.org/bjdooks/linux

* 'for-31-rc3/i2c-fixes' of git://git.fluff.org/bjdooks/linux:
  i2c-nomadik: fix kerneldoc warning
  Revert "i2c-omap: fix static suspend vs. runtime suspend"
  i2c-nomadik: Do not use _interruptible_ variant call
parents a53e77fa c8d47631
...@@ -146,6 +146,7 @@ struct i2c_nmk_client { ...@@ -146,6 +146,7 @@ struct i2c_nmk_client {
* @stop: stop condition * @stop: stop condition
* @xfer_complete: acknowledge completion for a I2C message * @xfer_complete: acknowledge completion for a I2C message
* @result: controller propogated result * @result: controller propogated result
* @regulator: pointer to i2c regulator
* @busy: Busy doing transfer * @busy: Busy doing transfer
*/ */
struct nmk_i2c_dev { struct nmk_i2c_dev {
...@@ -417,12 +418,12 @@ static int read_i2c(struct nmk_i2c_dev *dev) ...@@ -417,12 +418,12 @@ static int read_i2c(struct nmk_i2c_dev *dev)
writel(readl(dev->virtbase + I2C_IMSCR) | irq_mask, writel(readl(dev->virtbase + I2C_IMSCR) | irq_mask,
dev->virtbase + I2C_IMSCR); dev->virtbase + I2C_IMSCR);
timeout = wait_for_completion_interruptible_timeout( timeout = wait_for_completion_timeout(
&dev->xfer_complete, dev->adap.timeout); &dev->xfer_complete, dev->adap.timeout);
if (timeout < 0) { if (timeout < 0) {
dev_err(&dev->pdev->dev, dev_err(&dev->pdev->dev,
"wait_for_completion_interruptible_timeout" "wait_for_completion_timeout"
"returned %d waiting for event\n", timeout); "returned %d waiting for event\n", timeout);
status = timeout; status = timeout;
} }
...@@ -504,12 +505,12 @@ static int write_i2c(struct nmk_i2c_dev *dev) ...@@ -504,12 +505,12 @@ static int write_i2c(struct nmk_i2c_dev *dev)
writel(readl(dev->virtbase + I2C_IMSCR) | irq_mask, writel(readl(dev->virtbase + I2C_IMSCR) | irq_mask,
dev->virtbase + I2C_IMSCR); dev->virtbase + I2C_IMSCR);
timeout = wait_for_completion_interruptible_timeout( timeout = wait_for_completion_timeout(
&dev->xfer_complete, dev->adap.timeout); &dev->xfer_complete, dev->adap.timeout);
if (timeout < 0) { if (timeout < 0) {
dev_err(&dev->pdev->dev, dev_err(&dev->pdev->dev,
"wait_for_completion_interruptible_timeout" "wait_for_completion_timeout "
"returned %d waiting for event\n", timeout); "returned %d waiting for event\n", timeout);
status = timeout; status = timeout;
} }
......
...@@ -1139,41 +1139,12 @@ omap_i2c_remove(struct platform_device *pdev) ...@@ -1139,41 +1139,12 @@ omap_i2c_remove(struct platform_device *pdev)
return 0; return 0;
} }
#ifdef CONFIG_SUSPEND
static int omap_i2c_suspend(struct device *dev)
{
if (!pm_runtime_suspended(dev))
if (dev->bus && dev->bus->pm && dev->bus->pm->runtime_suspend)
dev->bus->pm->runtime_suspend(dev);
return 0;
}
static int omap_i2c_resume(struct device *dev)
{
if (!pm_runtime_suspended(dev))
if (dev->bus && dev->bus->pm && dev->bus->pm->runtime_resume)
dev->bus->pm->runtime_resume(dev);
return 0;
}
static struct dev_pm_ops omap_i2c_pm_ops = {
.suspend = omap_i2c_suspend,
.resume = omap_i2c_resume,
};
#define OMAP_I2C_PM_OPS (&omap_i2c_pm_ops)
#else
#define OMAP_I2C_PM_OPS NULL
#endif
static struct platform_driver omap_i2c_driver = { static struct platform_driver omap_i2c_driver = {
.probe = omap_i2c_probe, .probe = omap_i2c_probe,
.remove = omap_i2c_remove, .remove = omap_i2c_remove,
.driver = { .driver = {
.name = "omap_i2c", .name = "omap_i2c",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pm = OMAP_I2C_PM_OPS,
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment