projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ed1935
)
drm/vc4: Use of_device_get_match_data()
author
Minghao Chi (CGEL ZTE)
<chi.minghao@zte.com.cn>
Mon, 14 Feb 2022 02:05:30 +0000
(
02:05
+0000)
committer
Maxime Ripard
<maxime@cerno.tech>
Wed, 16 Feb 2022 09:51:40 +0000
(10:51 +0100)
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
drivers/gpu/drm/vc4/vc4_dsi.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/vc4/vc4_dsi.c
b/drivers/gpu/drm/vc4/vc4_dsi.c
index 9300d3354c512af8aecf8d5ab35ef5885fea0369..752f921735c67c9a3d4a159c07a8ec1acf8a2de6 100644
(file)
--- 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);