Merge tag 'drm-misc-fixes-2021-07-13' of git://anongit.freedesktop.org/drm/drm-misc...
[linux-2.6-microblaze.git] / drivers / watchdog / meson_wdt.c
index 459f3ae..539feaa 100644 (file)
@@ -162,7 +162,6 @@ static int meson_wdt_probe(struct platform_device *pdev)
 {
        struct device *dev = &pdev->dev;
        struct meson_wdt_dev *meson_wdt;
-       const struct of_device_id *of_id;
        int err;
 
        meson_wdt = devm_kzalloc(dev, sizeof(*meson_wdt), GFP_KERNEL);
@@ -173,12 +172,7 @@ static int meson_wdt_probe(struct platform_device *pdev)
        if (IS_ERR(meson_wdt->wdt_base))
                return PTR_ERR(meson_wdt->wdt_base);
 
-       of_id = of_match_device(meson_wdt_dt_ids, dev);
-       if (!of_id) {
-               dev_err(dev, "Unable to initialize WDT data\n");
-               return -ENODEV;
-       }
-       meson_wdt->data = of_id->data;
+       meson_wdt->data = device_get_match_data(dev);
 
        meson_wdt->wdt_dev.parent = dev;
        meson_wdt->wdt_dev.info = &meson_wdt_info;