Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/msm/hdmi: Simplify with dev_of_node()

Simplify chain of pointer dereferences with dev_of_node() which also
checks if 'dev' argument is non-NULL.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/711167/
Link: https://lore.kernel.org/r/20260311-drm-msm-hdmi-cleanup-v1-1-c5535245f6de@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>

authored by

Krzysztof Kozlowski and committed by
Dmitry Baryshkov
5a9a712b 8c6c93b7

+2 -2
+2 -2
drivers/gpu/drm/msm/hdmi/hdmi.c
··· 91 91 struct platform_device *phy_pdev; 92 92 struct device_node *phy_node; 93 93 94 - phy_node = of_parse_phandle(pdev->dev.of_node, "phys", 0); 94 + phy_node = of_parse_phandle(dev_of_node(&pdev->dev), "phys", 0); 95 95 if (!phy_node) { 96 96 DRM_DEV_ERROR(&pdev->dev, "cannot find phy device\n"); 97 97 return -ENXIO; ··· 287 287 spin_lock_init(&hdmi->reg_lock); 288 288 mutex_init(&hdmi->state_mutex); 289 289 290 - ret = drm_of_find_panel_or_bridge(pdev->dev.of_node, 1, 0, NULL, &hdmi->next_bridge); 290 + ret = drm_of_find_panel_or_bridge(dev_of_node(dev), 1, 0, NULL, &hdmi->next_bridge); 291 291 if (ret && ret != -ENODEV) 292 292 return ret; 293 293