提交 0d1ad98d 编写于 作者: V Vladimir Zapolskiy 提交者: 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: NVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册