diff options
author | Thierry Reding <treding@nvidia.com> | 2014-04-29 17:19:57 +0200 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2014-06-05 16:42:19 +0200 |
commit | d16218030f7d5195fcf83a424d8e48b89b013a51 (patch) | |
tree | fd251ee2e4d91cd952560bdf736e3b8327025217 /drivers/gpu/drm/drm_mipi_dsi.c | |
parent | c9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff) |
drm/dsi: Support device shutdown
Hook up the MIPI DSI bus's .shutdown() function to allow drivers to
implement code that should be run when a device is shut down.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/drm_mipi_dsi.c')
-rw-r--r-- | drivers/gpu/drm/drm_mipi_dsi.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c index 09821f46d76..e633df2f68d 100644 --- a/drivers/gpu/drm/drm_mipi_dsi.c +++ b/drivers/gpu/drm/drm_mipi_dsi.c @@ -282,6 +282,14 @@ static int mipi_dsi_drv_remove(struct device *dev) return drv->remove(dsi); } +static void mipi_dsi_drv_shutdown(struct device *dev) +{ + struct mipi_dsi_driver *drv = to_mipi_dsi_driver(dev->driver); + struct mipi_dsi_device *dsi = to_mipi_dsi_device(dev); + + drv->shutdown(dsi); +} + /** * mipi_dsi_driver_register - register a driver for DSI devices * @drv: DSI driver structure @@ -293,6 +301,8 @@ int mipi_dsi_driver_register(struct mipi_dsi_driver *drv) drv->driver.probe = mipi_dsi_drv_probe; if (drv->remove) drv->driver.remove = mipi_dsi_drv_remove; + if (drv->shutdown) + drv->driver.shutdown = mipi_dsi_drv_shutdown; return driver_register(&drv->driver); } |