From: Thierry Reding <treding@xxxxxxxxxx> Use the common implementation rather than the I2C-private variant. Signed-off-by: Thierry Reding <treding@xxxxxxxxxx> --- drivers/i2c/i2c-core.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index af11b658984d..f0c7d8a64013 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -1426,18 +1426,13 @@ static void of_i2c_register_devices(struct i2c_adapter *adap) } } -static int of_dev_node_match(struct device *dev, void *data) -{ - return dev->of_node == data; -} - /* must call put_device() when done with returned i2c_client device */ struct i2c_client *of_find_i2c_device_by_node(struct device_node *node) { struct device *dev; struct i2c_client *client; - dev = bus_find_device(&i2c_bus_type, NULL, node, of_dev_node_match); + dev = bus_find_device(&i2c_bus_type, NULL, node, of_device_match); if (!dev) return NULL; @@ -1455,7 +1450,7 @@ struct i2c_adapter *of_find_i2c_adapter_by_node(struct device_node *node) struct device *dev; struct i2c_adapter *adapter; - dev = bus_find_device(&i2c_bus_type, NULL, node, of_dev_node_match); + dev = bus_find_device(&i2c_bus_type, NULL, node, of_device_match); if (!dev) return NULL; -- 2.8.3 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html