Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -146,6 +146,7 @@ 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 {
@@ -417,12 +418,12 @@ static int read_i2c(struct nmk_i2c_dev *dev)
	writel(readl(dev->virtbase + I2C_IMSCR) | irq_mask,
			dev->virtbase + I2C_IMSCR);

	timeout = wait_for_completion_interruptible_timeout(
	timeout = wait_for_completion_timeout(
		&dev->xfer_complete, dev->adap.timeout);

	if (timeout < 0) {
		dev_err(&dev->pdev->dev,
			"wait_for_completion_interruptible_timeout"
			"wait_for_completion_timeout"
			"returned %d waiting for event\n", timeout);
		status = timeout;
	}
@@ -504,12 +505,12 @@ static int write_i2c(struct nmk_i2c_dev *dev)
	writel(readl(dev->virtbase + I2C_IMSCR) | irq_mask,
			dev->virtbase + I2C_IMSCR);

	timeout = wait_for_completion_interruptible_timeout(
	timeout = wait_for_completion_timeout(
		&dev->xfer_complete, dev->adap.timeout);

	if (timeout < 0) {
		dev_err(&dev->pdev->dev,
			"wait_for_completion_interruptible_timeout"
			"wait_for_completion_timeout "
			"returned %d waiting for event\n", timeout);
		status = timeout;
	}
+0 −29
Original line number Diff line number Diff line
@@ -1139,41 +1139,12 @@ omap_i2c_remove(struct platform_device *pdev)
	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 = {
	.probe		= omap_i2c_probe,
	.remove		= omap_i2c_remove,
	.driver		= {
		.name	= "omap_i2c",
		.owner	= THIS_MODULE,
		.pm	= OMAP_I2C_PM_OPS,
	},
};