drm/vc4: Use of_device_get_match_data()
Subsystems (3)
PATCH 1/1 drm/vc4: Use of_device_get_match_data()
From: "Minghao Chi (CGEL ZTE)" <[email protected]>
Use of_device_get_match_data() to simplify the code.
Reported-by Zeal Robot <[email protected]>
Signed-off-by Minghao Chi (CGEL ZTE) <[email protected]>
--- drivers/gpu/drm/vc4/vc4_dsi.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/gpu/drm/vc4/vc4_dsi.c +1 -6
@@ -1493,15 +1493,10 @@ static int vc4_dsi_bind(struct device *dev, struct device *master, void *data)struct drm_device *drm =dev_get_drvdata (master);struct vc4_dsi *dsi =dev_get_drvdata (dev);struct vc4_dsi_encoder *vc4_dsi_encoder; -const struct of_device_id *match;dma_cap_mask_t dma_mask;int ret; - match =of_match_device (vc4_dsi_dt_match, dev); -if (!match) -return -ENODEV ; - - dsi->variant = match->data; + dsi->variant =of_device_get_match_data (dev); vc4_dsi_encoder =devm_kzalloc (dev,sizeof (*vc4_dsi_encoder),GFP_KERNEL );
Signature · 1 line
2.25.1
Maxime Ripard
AppliedRe: (subset) [PATCH] drm/vc4: Use of_device_get_match_data()
Quoted 5 lines · On Mon, 14 Feb 2022 02:05:30 +0000, [email protected] wrote:
From: "Minghao Chi (CGEL ZTE)" <[email protected]>
Use
of_device_get_match_data()to simplify the code.
Applied to drm/drm-misc (drm-misc-next).
Thanks!
Maxime