diff options
author | Hyun Kwon <hyun.kwon@xilinx.com> | 2017-04-04 15:12:36 -0700 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2017-04-05 12:49:55 +0200 |
commit | ccbef8b0415b9ad3dedaddfe0002941560513fe4 (patch) | |
tree | 086c4b9652d2a3ca121b52eab213639cd2984eb1 | |
parent | 8d1bbf14eb0695bc41daddabb0a98212bb63e7c4 (diff) | |
download | linux-ccbef8b0415b9ad3dedaddfe0002941560513fe4.tar.gz |
drm: xilinx: drv: Add shutdown callback
Shut down the device explicitly when the system shuts down.
The callback will unbind the device.
Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
-rw-r--r-- | drivers/gpu/drm/xilinx/xilinx_drm_drv.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xilinx/xilinx_drm_drv.c b/drivers/gpu/drm/xilinx/xilinx_drm_drv.c index 33f1cacd397fd2..39463b5ea084de 100644 --- a/drivers/gpu/drm/xilinx/xilinx_drm_drv.c +++ b/drivers/gpu/drm/xilinx/xilinx_drm_drv.c @@ -591,6 +591,13 @@ static int xilinx_drm_platform_remove(struct platform_device *pdev) return 0; } +static void xilinx_drm_platform_shutdown(struct platform_device *pdev) +{ + struct xilinx_drm_private *private = platform_get_drvdata(pdev); + + drm_put_dev(private->drm); +} + static const struct of_device_id xilinx_drm_of_match[] = { { .compatible = "xlnx,drm", }, { /* end of table */ }, @@ -600,6 +607,7 @@ MODULE_DEVICE_TABLE(of, xilinx_drm_of_match); static struct platform_driver xilinx_drm_private_driver = { .probe = xilinx_drm_platform_probe, .remove = xilinx_drm_platform_remove, + .shutdown = xilinx_drm_platform_shutdown, .driver = { .name = "xilinx-drm", .pm = &xilinx_drm_pm_ops, |