Patch "drm/sun4i: Set device driver data at bind time for use in unbind" has been added to the 4.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/sun4i: Set device driver data at bind time for use in unbind

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-sun4i-set-device-driver-data-at-bind-time-for-us.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e33a3c7bf5bbfe7cad52cf0da76f2a5bf5abfcf6
Author: Paul Kocialkowski <paul.kocialkowski@xxxxxxxxxxx>
Date:   Thu Apr 18 15:27:26 2019 +0200

    drm/sun4i: Set device driver data at bind time for use in unbind
    
    [ Upstream commit 02b92adbe33e6dbd15dc6e32540b22f47c4ff0a2 ]
    
    Our sun4i_drv_unbind gets the drm device using dev_get_drvdata.
    However, that driver data is never set in sun4i_drv_bind.
    
    Set it there to avoid getting a NULL pointer at unbind time.
    
    Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support")
    Signed-off-by: Paul Kocialkowski <paul.kocialkowski@xxxxxxxxxxx>
    Signed-off-by: Maxime Ripard <maxime.ripard@xxxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20190418132727.5128-3-paul.kocialkowski@xxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c
index 8d3c8070ed862..e09161cf312f7 100644
--- a/drivers/gpu/drm/sun4i/sun4i_drv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c
@@ -96,6 +96,8 @@ static int sun4i_drv_bind(struct device *dev)
 		ret = -ENOMEM;
 		goto free_drm;
 	}
+
+	dev_set_drvdata(dev, drm);
 	drm->dev_private = drv;
 	INIT_LIST_HEAD(&drv->engine_list);
 	INIT_LIST_HEAD(&drv->tcon_list);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux