aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPantelis Antoniou <pantelis.antoniou@konsulko.com>2015-01-15 20:33:18 +0200
committerMark Brown <broonie@kernel.org>2015-02-21 12:14:29 +0900
commit6f491cafa26fe73636523730bcffb4ee99f5f21c (patch)
tree4fc8a3156efe073dd654d1723ca2a0bdb659575a
parent5722d513b0d502b9d6bb08d16a1bd1da3c1f2fd7 (diff)
downloadlinux-linaro-stable-v3.10/topic/of.tar.gz
i2c: Mark instantiated device nodes with OF_POPULATEv3.10/topic/of
Mark (and unmark) device nodes with the POPULATE flag as appropriate. This is required to avoid multi probing when using I2C and device overlays containing a mux. Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> (cherry picked from commit 6d0a0d9ad09be16e3ca676b245643945b4bff47d) Signed-off-by: Mark Brown <broonie@kernel.org> Conflicts: drivers/i2c/i2c-core.c
-rw-r--r--drivers/i2c/i2c-core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 92588d3..780599c 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -704,8 +704,10 @@ EXPORT_SYMBOL_GPL(i2c_new_device);
*/
void i2c_unregister_device(struct i2c_client *client)
{
+#if IS_ENABLED(CONFIG_OF_DYNAMIC)
if (client->dev.of_node)
of_node_clear_flag(client->dev.of_node, OF_POPULATED);
+#endif
device_unregister(&client->dev);
}
EXPORT_SYMBOL_GPL(i2c_unregister_device);