[01/19] drm/rcar: call drm_put_dev directly in the ->remove hook
diff mbox

Message ID 1383485485-8210-2-git-send-email-daniel.vetter@ffwll.ch
State New, archived
Headers show

Commit Message

Daniel Vetter Nov. 3, 2013, 1:31 p.m. UTC
The magic dance drm_platform_exit does is actually a remnant of the
old legacy shadow attach support for platform devices. Modern modesetting
drm drivers shouldn't do this any more (and usb/pci devices actually don't
do this).

Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/rcar-du/rcar_du_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Laurent Pinchart Nov. 3, 2013, 1:47 p.m. UTC | #1
Hi Daniel,

Thank you for the patch.

On Sunday 03 November 2013 14:31:07 Daniel Vetter wrote:
> The magic dance drm_platform_exit does is actually a remnant of the
> old legacy shadow attach support for platform devices. Modern modesetting
> drm drivers shouldn't do this any more (and usb/pci devices actually don't
> do this).
> 
> Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

For 01/19 and 06/19,

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

> ---
>  drivers/gpu/drm/rcar-du/rcar_du_drv.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> b/drivers/gpu/drm/rcar-du/rcar_du_drv.c index 0023f9719cf1..4ec6272a1c11
> 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> @@ -224,7 +224,9 @@ static int rcar_du_probe(struct platform_device *pdev)
> 
>  static int rcar_du_remove(struct platform_device *pdev)
>  {
> -	drm_platform_exit(&rcar_du_driver, pdev);
> +	struct rcar_du_device *rcdu = platform_get_drvdata(pdev);
> +
> +	drm_put_dev(rcdu->ddev);
> 
>  	return 0;
>  }

Patch
diff mbox

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
index 0023f9719cf1..4ec6272a1c11 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
@@ -224,7 +224,9 @@  static int rcar_du_probe(struct platform_device *pdev)
 
 static int rcar_du_remove(struct platform_device *pdev)
 {
-	drm_platform_exit(&rcar_du_driver, pdev);
+	struct rcar_du_device *rcdu = platform_get_drvdata(pdev);
+
+	drm_put_dev(rcdu->ddev);
 
 	return 0;
 }