drm: omapdrm: Move shutdown() handler from core to dss
In preparation for removal of the core module, move the shutdown() handler from core to dss. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
parent
11765d163c
commit
74592ee796
@ -50,19 +50,6 @@ EXPORT_SYMBOL(omapdss_get_version);
|
|||||||
|
|
||||||
/* PLATFORM DEVICE */
|
/* PLATFORM DEVICE */
|
||||||
|
|
||||||
static void dss_disable_all_devices(void)
|
|
||||||
{
|
|
||||||
struct omap_dss_device *dssdev = NULL;
|
|
||||||
|
|
||||||
for_each_dss_dev(dssdev) {
|
|
||||||
if (!dssdev->driver)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
|
|
||||||
dssdev->driver->disable(dssdev);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static int __init omap_dss_probe(struct platform_device *pdev)
|
static int __init omap_dss_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
core.pdev = pdev;
|
core.pdev = pdev;
|
||||||
@ -77,15 +64,8 @@ static int omap_dss_remove(struct platform_device *pdev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void omap_dss_shutdown(struct platform_device *pdev)
|
|
||||||
{
|
|
||||||
DSSDBG("shutdown\n");
|
|
||||||
dss_disable_all_devices();
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct platform_driver omap_dss_driver = {
|
static struct platform_driver omap_dss_driver = {
|
||||||
.remove = omap_dss_remove,
|
.remove = omap_dss_remove,
|
||||||
.shutdown = omap_dss_shutdown,
|
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "omapdss",
|
.name = "omapdss",
|
||||||
},
|
},
|
||||||
|
@ -1380,6 +1380,21 @@ static int dss_remove(struct platform_device *pdev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void dss_shutdown(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
struct omap_dss_device *dssdev = NULL;
|
||||||
|
|
||||||
|
DSSDBG("shutdown\n");
|
||||||
|
|
||||||
|
for_each_dss_dev(dssdev) {
|
||||||
|
if (!dssdev->driver)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
|
||||||
|
dssdev->driver->disable(dssdev);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int dss_runtime_suspend(struct device *dev)
|
static int dss_runtime_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
dss_save_context();
|
dss_save_context();
|
||||||
@ -1419,6 +1434,7 @@ static const struct dev_pm_ops dss_pm_ops = {
|
|||||||
static struct platform_driver omap_dsshw_driver = {
|
static struct platform_driver omap_dsshw_driver = {
|
||||||
.probe = dss_probe,
|
.probe = dss_probe,
|
||||||
.remove = dss_remove,
|
.remove = dss_remove,
|
||||||
|
.shutdown = dss_shutdown,
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "omapdss_dss",
|
.name = "omapdss_dss",
|
||||||
.pm = &dss_pm_ops,
|
.pm = &dss_pm_ops,
|
||||||
|
Loading…
Reference in New Issue
Block a user