static int rockchip_saradc_probe(struct platform_device *pdev)
 {
+       const struct rockchip_saradc_data *match_data;
        struct rockchip_saradc *info = NULL;
        struct device_node *np = pdev->dev.of_node;
        struct iio_dev *indio_dev = NULL;
-       const struct of_device_id *match;
        int ret;
        int irq;
 
        }
        info = iio_priv(indio_dev);
 
-       match = of_match_device(rockchip_saradc_match, &pdev->dev);
-       if (!match) {
+       match_data = of_device_get_match_data(&pdev->dev);
+       if (!match_data) {
                dev_err(&pdev->dev, "failed to match device\n");
                return -ENODEV;
        }
 
-       info->data = match->data;
+       info->data = match_data;
 
        /* Sanity check for possible later IP variants with more channels */
        if (info->data->num_channels > SARADC_MAX_CHANNELS) {