diff options
| author | Damon Ding <damon.ding@rock-chips.com> | 2026-06-01 14:50:58 +0800 |
|---|---|---|
| committer | Heiko Stuebner <heiko@sntech.de> | 2026-06-02 22:09:02 +0200 |
| commit | 709445fb6fc57aa96d48c8492e84ed4b2a9a4b5e (patch) | |
| tree | 133d657443598a64936c4de991634cabc0867bf4 /include | |
| parent | 473e50b27b0020ade5fd97ca04d941e448c5659a (diff) | |
drm/bridge: analogix_dp: Rename and simplify is_rockchip()
Rename inline helper is_rockchip() to analogix_dp_is_rockchip()
to follow driver namespace convention consistently across code.
Replace chained equality comparisons with switch-case layout
to improve readability and simplify adding new SoC entries later.
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Suggested-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20260601065100.1103873-10-damon.ding@rock-chips.com
Diffstat (limited to 'include')
| -rw-r--r-- | include/drm/bridge/analogix_dp.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/drm/bridge/analogix_dp.h b/include/drm/bridge/analogix_dp.h index 854af692229b..7b670dd769e9 100644 --- a/include/drm/bridge/analogix_dp.h +++ b/include/drm/bridge/analogix_dp.h @@ -19,9 +19,16 @@ enum analogix_dp_devtype { RK3588_EDP, }; -static inline bool is_rockchip(enum analogix_dp_devtype type) +static inline bool analogix_dp_is_rockchip(enum analogix_dp_devtype type) { - return type == RK3288_DP || type == RK3399_EDP || type == RK3588_EDP; + switch (type) { + case RK3288_DP: + case RK3399_EDP: + case RK3588_EDP: + return true; + default: + return false; + } } struct analogix_dp_plat_data { |
