-@@ -113,13 +140,15 @@ static int w1_gpio_probe_dt(struct platf
- static int w1_gpio_probe(struct platform_device *pdev)
- {
- struct w1_bus_master *master;
-- struct w1_gpio_platform_data *pdata;
-+ struct w1_gpio_platform_data *pdata = pdev->dev.platform_data;
- int err;
-
-- if (of_have_populated_dt()) {
-- err = w1_gpio_probe_dt(pdev);
-- if (err < 0)
-- return err;
-+ if(pdata == NULL) {
-+ if (of_have_populated_dt()) {
-+ err = w1_gpio_probe_dt(pdev);
-+ if (err < 0)
-+ return err;
-+ }
- }
-
- pdata = dev_get_platdata(&pdev->dev);
-@@ -136,6 +165,22 @@ static int w1_gpio_probe(struct platform