--- zzzz-none-000/linux-3.10.107/drivers/i2c/muxes/i2c-mux-pinctrl.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/i2c/muxes/i2c-mux-pinctrl.c 2021-02-04 17:41:59.000000000 +0000 @@ -18,13 +18,12 @@ #include #include -#include #include -#include #include #include #include #include +#include struct i2c_mux_pinctrl { struct device *dev; @@ -112,9 +111,10 @@ return -ENODEV; } adapter = of_find_i2c_adapter_by_node(adapter_np); + of_node_put(adapter_np); if (!adapter) { dev_err(mux->dev, "Cannot find parent bus\n"); - return -ENODEV; + return -EPROBE_DEFER; } mux->pdata->parent_bus_num = i2c_adapter_id(adapter); put_device(&adapter->dev); @@ -145,7 +145,7 @@ mux->dev = &pdev->dev; - mux->pdata = pdev->dev.platform_data; + mux->pdata = dev_get_platdata(&pdev->dev); if (!mux->pdata) { ret = i2c_mux_pinctrl_parse_dt(mux, pdev); if (ret < 0) @@ -212,7 +212,7 @@ if (!mux->parent) { dev_err(&pdev->dev, "Parent adapter (%d) not found\n", mux->pdata->parent_bus_num); - ret = -ENODEV; + ret = -EPROBE_DEFER; goto err; } @@ -265,7 +265,6 @@ static struct platform_driver i2c_mux_pinctrl_driver = { .driver = { .name = "i2c-mux-pinctrl", - .owner = THIS_MODULE, .of_match_table = of_match_ptr(i2c_mux_pinctrl_of_match), }, .probe = i2c_mux_pinctrl_probe,