diff options
author | Chen-Yu Tsai <wens@csie.org> | 2017-11-27 11:46:32 +0300 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2017-11-30 18:46:05 +0300 |
commit | ff71c2cf5eb255b7dd03da5de4dd414394d9e346 (patch) | |
tree | 5095b4e4d427637d89f1cfc27dfc96b459744d5b /drivers/gpu/drm/sun4i/sun4i_drv.c | |
parent | 2f51be0945b9e0b9baafe47289c802be6d4c7980 (diff) | |
download | linux-ff71c2cf5eb255b7dd03da5de4dd414394d9e346.tar.xz |
drm/sun4i: use sun4i_tcon_of_table to check if a device node is a TCON
The sun4i DRM driver maintains a list of compatible strings it uses to
check if a device node within the display component graph is a TCON.
The TCON driver also has this list, used to bind the TCON driver to
the device. These two lists are identical.
Instead of maintaining two identical lists, export the list from the
TCON driver for the DRM driver to use.
Suggested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171127084632.25511-1-wens@csie.org
Diffstat (limited to 'drivers/gpu/drm/sun4i/sun4i_drv.c')
-rw-r--r-- | drivers/gpu/drm/sun4i/sun4i_drv.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c index 75c76cdd82bc..49215d91c853 100644 --- a/drivers/gpu/drm/sun4i/sun4i_drv.c +++ b/drivers/gpu/drm/sun4i/sun4i_drv.c @@ -187,13 +187,7 @@ static bool sun4i_drv_node_is_frontend(struct device_node *node) static bool sun4i_drv_node_is_tcon(struct device_node *node) { - return of_device_is_compatible(node, "allwinner,sun4i-a10-tcon") || - of_device_is_compatible(node, "allwinner,sun5i-a13-tcon") || - of_device_is_compatible(node, "allwinner,sun6i-a31-tcon") || - of_device_is_compatible(node, "allwinner,sun6i-a31s-tcon") || - of_device_is_compatible(node, "allwinner,sun7i-a20-tcon") || - of_device_is_compatible(node, "allwinner,sun8i-a33-tcon") || - of_device_is_compatible(node, "allwinner,sun8i-v3s-tcon"); + return !!of_match_node(sun4i_tcon_of_table, node); } static int compare_of(struct device *dev, void *data) |