drm/rockchip: rgb: don't count non-existent devices when

A patch from »drm/rockchip: rgb: don't count non-existent devices when« in state Mainline for linux-kernel

From: Heiko Stuebner <heiko.stuebner@...> Date: Thu, 9 Jan 2020 21:44:49 +0100

Commit-Message

rockchip_drm_endpoint_is_subdriver() may also return error codes. For example if the target-node is in the disabled state, so no platform-device is getting created for it. In that case current code would count that as external rgb device, which in turn would make probing the rockchip-drm device fail. So only count the target as rgb device if the function actually returns 0. Signed-off-by: Heiko Stuebner <heiko.stuebner@...>

Patch-Comment

drivers/gpu/drm/rockchip/rockchip_rgb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

Statistics

  • 2 lines added
  • 1 lines removed

Changes

------------------- drivers/gpu/drm/rockchip/rockchip_rgb.c --------------------
index ae730275a34f..79a7e60633e0 100644
@@ -98,7 +98,8 @@ struct rockchip_rgb *rockchip_rgb_init(struct device *dev,
if (of_property_read_u32(endpoint, "reg", &endpoint_id))
endpoint_id = 0;
- if (rockchip_drm_endpoint_is_subdriver(endpoint) > 0)
+ /* if subdriver (> 0) or error case (< 0), ignore entry */
+ if (rockchip_drm_endpoint_is_subdriver(endpoint) != 0)
continue;
child_count++;
 
 

Recent Patches

About Us

Sed lacus. Donec lectus. Nullam pretium nibh ut turpis. Nam bibendum. In nulla tortor, elementum vel, tempor at, varius non, purus. Mauris vitae nisl nec metus placerat consectetuer.

Read More...