diff options
author | Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> | 2015-07-27 16:30:51 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2015-08-10 08:37:36 +0200 |
commit | 0d1ad98dd837c069572d16faf77fa7f50748c7d5 (patch) | |
tree | 4c3e6fb57ce3d4182fb0bb2a48828139c6c9a994 /drivers/i2c/muxes | |
parent | i2c: core: add and export of_get_i2c_adapter_by_node() interface (diff) | |
download | linux-0d1ad98dd837c069572d16faf77fa7f50748c7d5.tar.xz linux-0d1ad98dd837c069572d16faf77fa7f50748c7d5.zip |
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: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/muxes')
-rw-r--r-- | drivers/i2c/muxes/i2c-arb-gpio-challenge.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c index 5cf1b60b69e2..71aac0911bf7 100644 --- a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c +++ b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c @@ -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; |