diff options
author | Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn> | 2022-02-14 05:05:30 +0300 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2022-02-16 12:51:40 +0300 |
commit | 9cbe89ede58294d23af06ec12c20f2ce6acc1892 (patch) | |
tree | 78c24e194ec61e21c5963a158d4b0bf6adcb09ff /drivers/gpu/drm/vc4/vc4_dsi.c | |
parent | 6ed19359d6bd62e993b09a7a565d7a5ce5e114c3 (diff) | |
download | linux-9cbe89ede58294d23af06ec12c20f2ce6acc1892.tar.xz |
drm/vc4: Use of_device_get_match_data()
Use of_device_get_match_data() to simplify the code.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20220214020530.1714631-1-chi.minghao@zte.com.cn
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_dsi.c')
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_dsi.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_dsi.c b/drivers/gpu/drm/vc4/vc4_dsi.c index 9300d3354c51..752f921735c6 100644 --- a/drivers/gpu/drm/vc4/vc4_dsi.c +++ b/drivers/gpu/drm/vc4/vc4_dsi.c @@ -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); |