#include <linux/mfd/syscon.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
+#include <linux/property.h>
 #include <linux/pwm.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
        u64 val;
        unsigned long clk_rate;
        struct img_pwm_chip *imgchip;
-       const struct of_device_id *of_dev_id;
 
        imgchip = devm_kzalloc(&pdev->dev, sizeof(*imgchip), GFP_KERNEL);
        if (!imgchip)
        if (IS_ERR(imgchip->base))
                return PTR_ERR(imgchip->base);
 
-       of_dev_id = of_match_device(img_pwm_of_match, &pdev->dev);
-       if (!of_dev_id)
-               return -ENODEV;
-       imgchip->data = of_dev_id->data;
+       imgchip->data = device_get_match_data(&pdev->dev);
 
        imgchip->periph_regs = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
                                                               "img,cr-periph");
 
 #include <linux/io.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
+#include <linux/property.h>
 #include <linux/pwm.h>
 #include <linux/time.h>
 
 
 static int rockchip_pwm_probe(struct platform_device *pdev)
 {
-       const struct of_device_id *id;
        struct rockchip_pwm_chip *pc;
        u32 enable_conf, ctrl;
        bool enabled;
        int ret, count;
 
-       id = of_match_device(rockchip_pwm_dt_ids, &pdev->dev);
-       if (!id)
-               return -EINVAL;
-
        pc = devm_kzalloc(&pdev->dev, sizeof(*pc), GFP_KERNEL);
        if (!pc)
                return -ENOMEM;
 
        platform_set_drvdata(pdev, pc);
 
-       pc->data = id->data;
+       pc->data = device_get_match_data(&pdev->dev);
        pc->chip.dev = &pdev->dev;
        pc->chip.ops = &rockchip_pwm_ops;
        pc->chip.npwm = 1;