--- zzzz-none-000/linux-3.10.107/drivers/i2c/muxes/i2c-arb-gpio-challenge.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/i2c/muxes/i2c-arb-gpio-challenge.c 2021-02-04 17:41:59.000000000 +0000 @@ -19,9 +19,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -131,7 +129,7 @@ dev_err(dev, "Cannot find device tree node\n"); return -ENODEV; } - if (dev->platform_data) { + if (dev_get_platdata(dev)) { dev_err(dev, "Platform data is not supported\n"); return -EINVAL; } @@ -198,10 +196,11 @@ 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); + of_node_put(parent_np); if (!arb->parent) { dev_err(dev, "Cannot find parent bus\n"); - return -EINVAL; + return -EPROBE_DEFER; } /* Actually add the mux adapter */ @@ -237,9 +236,8 @@ .probe = i2c_arbitrator_probe, .remove = i2c_arbitrator_remove, .driver = { - .owner = THIS_MODULE, .name = "i2c-arb-gpio-challenge", - .of_match_table = of_match_ptr(i2c_arbitrator_of_match), + .of_match_table = i2c_arbitrator_of_match, }, };