diff mbox

[09/13] drm/shmob: Drop drm_vblank_cleanup

Message ID 20170621082850.13224-10-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Vetter June 21, 2017, 8:28 a.m. UTC
It doesn't do anything in the driver load error paths that the drm
core doesn't also do.

Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/shmobile/shmob_drm_drv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Laurent Pinchart June 21, 2017, 9:12 a.m. UTC | #1
Hi Daniel,

Thank you for the patch.

On Wednesday 21 Jun 2017 10:28:46 Daniel Vetter wrote:
> It doesn't do anything in the driver load error paths that the drm
> core doesn't also do.

If I understand the code correctly, this patch is fine because drm_dev_fini(), 
called ultimately from drm_dev_release(), calls drm_vblank_cleanup(). The 
commit message could be a bit more explicit. Apart from that,

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  drivers/gpu/drm/shmobile/shmob_drm_drv.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> b/drivers/gpu/drm/shmobile/shmob_drm_drv.c index 800d1d2c435d..c2ca07357aac
> 100644
> --- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> +++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> @@ -277,7 +277,7 @@ static int shmob_drm_probe(struct platform_device *pdev)
> ret = drm_irq_install(ddev, platform_get_irq(pdev, 0));
>  	if (ret < 0) {
>  		dev_err(&pdev->dev, "failed to install IRQ handler\n");
> -		goto err_vblank_cleanup;
> +		goto err_modeset_cleanup;
>  	}
> 
>  	/*
> @@ -292,8 +292,6 @@ static int shmob_drm_probe(struct platform_device *pdev)
> 
>  err_irq_uninstall:
>  	drm_irq_uninstall(ddev);
> -err_vblank_cleanup:
> -	drm_vblank_cleanup(ddev);
>  err_modeset_cleanup:
>  	drm_kms_helper_poll_fini(ddev);
>  	drm_mode_config_cleanup(ddev);
Daniel Vetter June 22, 2017, 6:40 a.m. UTC | #2
On Wed, Jun 21, 2017 at 12:12:02PM +0300, Laurent Pinchart wrote:
> Hi Daniel,
> 
> Thank you for the patch.
> 
> On Wednesday 21 Jun 2017 10:28:46 Daniel Vetter wrote:
> > It doesn't do anything in the driver load error paths that the drm
> > core doesn't also do.
> 
> If I understand the code correctly, this patch is fine because drm_dev_fini(), 
> called ultimately from drm_dev_release(), calls drm_vblank_cleanup(). The 
> commit message could be a bit more explicit. Apart from that,

Added a small note and merged, but yeah after the 20th instance of the
same cargo-cult (this series here is just the leftovers) I got bored
typing longer commit messages. The kernel doc and core patches explain the
full story.
> 
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Thanks, Daniel

> 
> > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > ---
> >  drivers/gpu/drm/shmobile/shmob_drm_drv.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> > b/drivers/gpu/drm/shmobile/shmob_drm_drv.c index 800d1d2c435d..c2ca07357aac
> > 100644
> > --- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> > +++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> > @@ -277,7 +277,7 @@ static int shmob_drm_probe(struct platform_device *pdev)
> > ret = drm_irq_install(ddev, platform_get_irq(pdev, 0));
> >  	if (ret < 0) {
> >  		dev_err(&pdev->dev, "failed to install IRQ handler\n");
> > -		goto err_vblank_cleanup;
> > +		goto err_modeset_cleanup;
> >  	}
> > 
> >  	/*
> > @@ -292,8 +292,6 @@ static int shmob_drm_probe(struct platform_device *pdev)
> > 
> >  err_irq_uninstall:
> >  	drm_irq_uninstall(ddev);
> > -err_vblank_cleanup:
> > -	drm_vblank_cleanup(ddev);
> >  err_modeset_cleanup:
> >  	drm_kms_helper_poll_fini(ddev);
> >  	drm_mode_config_cleanup(ddev);
> 
> -- 
> Regards,
> 
> Laurent Pinchart
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
index 800d1d2c435d..c2ca07357aac 100644
--- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c
+++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
@@ -277,7 +277,7 @@  static int shmob_drm_probe(struct platform_device *pdev)
 	ret = drm_irq_install(ddev, platform_get_irq(pdev, 0));
 	if (ret < 0) {
 		dev_err(&pdev->dev, "failed to install IRQ handler\n");
-		goto err_vblank_cleanup;
+		goto err_modeset_cleanup;
 	}
 
 	/*
@@ -292,8 +292,6 @@  static int shmob_drm_probe(struct platform_device *pdev)
 
 err_irq_uninstall:
 	drm_irq_uninstall(ddev);
-err_vblank_cleanup:
-	drm_vblank_cleanup(ddev);
 err_modeset_cleanup:
 	drm_kms_helper_poll_fini(ddev);
 	drm_mode_config_cleanup(ddev);