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
*/
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);