{
struct platform_device *pdev = to_platform_device(dev);
struct drm_device *drm = dev_get_drvdata(master);
+ const struct vc4_crtc_data *pv_data;
struct vc4_crtc *vc4_crtc;
struct drm_crtc *crtc;
struct drm_plane *primary_plane, *destroy_plane, *temp;
- const struct of_device_id *match;
int ret, i;
vc4_crtc = devm_kzalloc(dev, sizeof(*vc4_crtc), GFP_KERNEL);
return -ENOMEM;
crtc = &vc4_crtc->base;
- match = of_match_device(vc4_crtc_dt_match, dev);
- if (!match)
+ pv_data = of_device_get_match_data(dev);
+ if (!pv_data)
return -ENODEV;
- vc4_crtc->data = match->data;
+ vc4_crtc->data = pv_data;
vc4_crtc->pdev = pdev;
vc4_crtc->regs = vc4_ioremap_regs(pdev, 0);
platform_set_drvdata(pdev, vc4_crtc);
- vc4_debugfs_add_regset32(drm, vc4_crtc->data->debugfs_name,
+ vc4_debugfs_add_regset32(drm, pv_data->debugfs_name,
&vc4_crtc->regset);
return 0;