Commit 0d1ad98d authored by Vladimir Zapolskiy's avatar Vladimir Zapolskiy Committed by Wolfram Sang

i2c: arb-gpio-challenge: use of_get_i2c_adapter_by_node interface

This change is needed to properly lock I2C parent bus driver.

Prior to this change i2c_put_adapter() is misused, which may lead
to an overflow over zero of I2C bus driver user counter.
Signed-off-by: default avatarVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 48e9743d
......@@ -196,7 +196,7 @@ static int i2c_arbitrator_probe(struct platform_device *pdev)
dev_err(dev, "Cannot parse i2c-parent\n");
return -EINVAL;
}
arb->parent = of_find_i2c_adapter_by_node(parent_np);
arb->parent = of_get_i2c_adapter_by_node(parent_np);
if (!arb->parent) {
dev_err(dev, "Cannot find parent bus\n");
return -EPROBE_DEFER;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment