-----Original Message----- From: Sachin Kamat [mailto:sachin.kamat@linaro.org] Sent: Friday, November 23, 2012 12:42 PM To: dri-devel@lists.freedesktop.org Cc: inki.dae@samsung.com; jy0922.shim@samsung.com; airlied@linux.ie; sachin.kamat@linaro.org; patches@linaro.org Subject: [PATCH 2/5] drm/exynos: Use devm_gpio_request in exynos_hdmi.c
devm_gpio_request is device managed and makes error handling and exit code simpler.
Signed-off-by: Sachin Kamat sachin.kamat@linaro.org
drivers/gpu/drm/exynos/exynos_hdmi.c | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 59839cc..3fe2d61 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -2428,7 +2428,7 @@ static int __devinit hdmi_probe(struct platform_device *pdev) goto err_resource; }
- ret = gpio_request(hdata->hpd_gpio, "HPD");
- ret = devm_gpio_request(&pdev->dev, hdata->hpd_gpio, "HPD"); if (ret) { DRM_ERROR("failed to request HPD gpio\n"); goto err_resource;
@@ -2438,7 +2438,7 @@ static int __devinit hdmi_probe(struct platform_device *pdev) if (i2c_add_driver(&ddc_driver)) { DRM_ERROR("failed to register ddc i2c driver\n"); ret = -ENOENT;
goto err_gpio;
goto err_resource;
}
hdata->ddc_port = hdmi_ddc;
@@ -2501,8 +2501,6 @@ err_hdmiphy: i2c_del_driver(&hdmiphy_driver); err_ddc: i2c_del_driver(&ddc_driver); -err_gpio:
- gpio_free(hdata->hpd_gpio);
err_resource: hdmi_resources_cleanup(hdata);
With cleanup to hdmi_resources_init, we can remove hdmi_resource_cleanup function. So could you please re-send updated patches?
You've been submitting patches into too small pieces. Because they are trivial enough and in the same context, please merge this kind of patches as long as they are related with the same class or topics. I think you can combine them. :)
Thanks, Inki Dae
err_data: @@ -2522,8 +2520,6 @@ static int __devexit hdmi_remove(struct platform_device *pdev) free_irq(hdata->internal_irq, hdata); free_irq(hdata->external_irq, hdata);
gpio_free(hdata->hpd_gpio);
hdmi_resources_cleanup(hdata);
/* hdmiphy i2c driver */
-- 1.7.4.1