drm/bridge: display-connector: Use dev_err_probe()
Subsystems (3)
PATCH 1/1 drm/bridge: display-connector: Use dev_err_probe()
From: Ye Xingchen <[email protected]>
Replace the open-code with dev_err_probe() to simplify the code.
Signed-off-by Ye Xingchen <[email protected]>
--- drivers/gpu/drm/bridge/display-connector.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/gpu/drm/bridge/display-connector.c +3 -6
@@ -271,12 +271,9 @@ static int display_connector_probe(struct platform_device *pdev) type == DRM_MODE_CONNECTOR_DisplayPort) { conn->hpd_gpio =devm_gpiod_get_optional (&pdev->dev,"hpd" ,GPIOD_IN ); -if (IS_ERR (conn->hpd_gpio)) { -if (PTR_ERR (conn->hpd_gpio) != -EPROBE_DEFER ) -dev_err (&pdev->dev, -"Unable to retrieve HPD GPIO\n" ); -return PTR_ERR (conn->hpd_gpio); - } +if (IS_ERR (conn->hpd_gpio)) +return dev_err_probe (&pdev->dev,PTR_ERR (conn->hpd_gpio), +"Unable to retrieve HPD GPIO\n" ); conn->hpd_irq =gpiod_to_irq (conn->hpd_gpio); } else {
Signature · 1 line
2.25.1
Hi Ye,
Thank you for the patch.
Quoted 5 lines · On Wed, Mar 22, 2023 at 04:21:33PM +0800, [email protected] wrote:
From: Ye Xingchen <[email protected]>
Replace the open-code with
dev_err_probe()to simplify the code.Signed-off-by Ye Xingchen <[email protected]>
Reviewed-by Laurent Pinchart <[email protected]>
Quoted 24 lines
--- drivers/gpu/drm/bridge/display-connector.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)drivers/gpu/drm/bridge/display-connector.c +3
-6@@ -271,12 +271,9 @@ static int display_connector_probe(struct platform_device *pdev) type == DRM_MODE_CONNECTOR_DisplayPort) { conn->hpd_gpio =devm_gpiod_get_optional (&pdev->dev,"hpd" ,GPIOD_IN ); -if (IS_ERR (conn->hpd_gpio)) { -if (PTR_ERR (conn->hpd_gpio) != -EPROBE_DEFER ) -dev_err (&pdev->dev, -"Unable to retrieve HPD GPIO\n" ); -return PTR_ERR (conn->hpd_gpio); - } +if (IS_ERR (conn->hpd_gpio)) +return dev_err_probe (&pdev->dev,PTR_ERR (conn->hpd_gpio), +"Unable to retrieve HPD GPIO\n" ); conn->hpd_irq =gpiod_to_irq (conn->hpd_gpio); } else {
Signature · 3 lines
Regards, Laurent Pinchart
Hi,
Quoted 3 lines · On Wed, 22 Mar 2023 16:21:33 +0800, [email protected] wrote:
Replace the open-code with
dev_err_probe()to simplify the code.
Thanks, Applied to https://anongit.freedesktop.org/git/drm/drm-misc.git (drm-misc-next)
[1/1] drm/bridge: display-connector: Use dev_err_probe()
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=ed8f4e1002781c47813e4e2b37ad15b927fd8b67
Signature · 1 line
Neil