[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <aa66614da3733b42350593d290d433fa8b0eb449.1446021555.git.jslaby@suse.cz>
Date: Wed, 28 Oct 2015 14:53:27 +0100
From: Jiri Slaby <jslaby@...e.cz>
To: stable@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Wolfram Sang <wsa@...-dreams.de>, Jiri Slaby <jslaby@...e.cz>
Subject: [PATCH 3.12 096/123] i2c: rcar: enable RuntimePM before registering to the core
From: Wolfram Sang <wsa+renesas@...g-engineering.com>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 4f7effddf4549d57114289f273710f077c4c330a upstream.
The core may register clients attached to this master which may use
funtionality from the master. So, RuntimePM must be enabled before, otherwise
this will fail. While here, move drvdata, too.
Reported-by: Geert Uytterhoeven <geert+renesas@...der.be>
Signed-off-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
Signed-off-by: Wolfram Sang <wsa@...-dreams.de>
Signed-off-by: Jiri Slaby <jslaby@...e.cz>
---
drivers/i2c/busses/i2c-rcar.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
index c8a42602205b..622b6fce149b 100644
--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -690,15 +690,16 @@ static int rcar_i2c_probe(struct platform_device *pdev)
return ret;
}
+ pm_runtime_enable(dev);
+ platform_set_drvdata(pdev, priv);
+
ret = i2c_add_numbered_adapter(adap);
if (ret < 0) {
dev_err(dev, "reg adap failed: %d\n", ret);
+ pm_runtime_disable(dev);
return ret;
}
- pm_runtime_enable(dev);
- platform_set_drvdata(pdev, priv);
-
dev_info(dev, "probed\n");
return 0;
--
2.6.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists