diff options
| author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2012-05-09 01:33:26 -0400 |
|---|---|---|
| committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-05-13 09:08:22 -0400 |
| commit | 3bfc9b835a8729f8a44de56930c1652293cfbf57 (patch) | |
| tree | 9fd3f29b7d1395f7f3d2dc5e87259641cb790eb1 | |
| parent | c932b2731116f99a660817e8fa718c9da0798a9c (diff) | |
video: exynos mipi dsi: Do not use deprecated suspend/resume callbacks
Use proper PM ops from struct dev_pm_ops rather than the deprecated ones.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
| -rw-r--r-- | drivers/video/exynos/exynos_mipi_dsi.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c index dfc728fc7b1a..ed0bacc435e3 100644 --- a/drivers/video/exynos/exynos_mipi_dsi.c +++ b/drivers/video/exynos/exynos_mipi_dsi.c | |||
| @@ -517,10 +517,10 @@ static int __devexit exynos_mipi_dsi_remove(struct platform_device *pdev) | |||
| 517 | return 0; | 517 | return 0; |
| 518 | } | 518 | } |
| 519 | 519 | ||
| 520 | #ifdef CONFIG_PM | 520 | #ifdef CONFIG_PM_SLEEP |
| 521 | static int exynos_mipi_dsi_suspend(struct platform_device *pdev, | 521 | static int exynos_mipi_dsi_suspend(struct device *dev) |
| 522 | pm_message_t state) | ||
| 523 | { | 522 | { |
| 523 | struct platform_device *pdev = to_platform_device(dev); | ||
| 524 | struct mipi_dsim_device *dsim = platform_get_drvdata(pdev); | 524 | struct mipi_dsim_device *dsim = platform_get_drvdata(pdev); |
| 525 | struct mipi_dsim_lcd_driver *client_drv = dsim->dsim_lcd_drv; | 525 | struct mipi_dsim_lcd_driver *client_drv = dsim->dsim_lcd_drv; |
| 526 | struct mipi_dsim_lcd_device *client_dev = dsim->dsim_lcd_dev; | 526 | struct mipi_dsim_lcd_device *client_dev = dsim->dsim_lcd_dev; |
| @@ -546,8 +546,9 @@ static int exynos_mipi_dsi_suspend(struct platform_device *pdev, | |||
| 546 | return 0; | 546 | return 0; |
| 547 | } | 547 | } |
| 548 | 548 | ||
| 549 | static int exynos_mipi_dsi_resume(struct platform_device *pdev) | 549 | static int exynos_mipi_dsi_resume(struct device *dev) |
| 550 | { | 550 | { |
| 551 | struct platform_device *pdev = to_platform_device(dev); | ||
| 551 | struct mipi_dsim_device *dsim = platform_get_drvdata(pdev); | 552 | struct mipi_dsim_device *dsim = platform_get_drvdata(pdev); |
| 552 | struct mipi_dsim_lcd_driver *client_drv = dsim->dsim_lcd_drv; | 553 | struct mipi_dsim_lcd_driver *client_drv = dsim->dsim_lcd_drv; |
| 553 | struct mipi_dsim_lcd_device *client_dev = dsim->dsim_lcd_dev; | 554 | struct mipi_dsim_lcd_device *client_dev = dsim->dsim_lcd_dev; |
| @@ -579,19 +580,19 @@ static int exynos_mipi_dsi_resume(struct platform_device *pdev) | |||
| 579 | 580 | ||
| 580 | return 0; | 581 | return 0; |
| 581 | } | 582 | } |
| 582 | #else | ||
| 583 | #define exynos_mipi_dsi_suspend NULL | ||
| 584 | #define exynos_mipi_dsi_resume NULL | ||
| 585 | #endif | 583 | #endif |
| 586 | 584 | ||
| 585 | static const struct dev_pm_ops exynos_mipi_dsi_pm_ops = { | ||
| 586 | SET_SYSTEM_SLEEP_PM_OPS(exynos_mipi_dsi_suspend, exynos_mipi_dsi_resume) | ||
| 587 | }; | ||
| 588 | |||
| 587 | static struct platform_driver exynos_mipi_dsi_driver = { | 589 | static struct platform_driver exynos_mipi_dsi_driver = { |
| 588 | .probe = exynos_mipi_dsi_probe, | 590 | .probe = exynos_mipi_dsi_probe, |
| 589 | .remove = __devexit_p(exynos_mipi_dsi_remove), | 591 | .remove = __devexit_p(exynos_mipi_dsi_remove), |
| 590 | .suspend = exynos_mipi_dsi_suspend, | ||
| 591 | .resume = exynos_mipi_dsi_resume, | ||
| 592 | .driver = { | 592 | .driver = { |
| 593 | .name = "exynos-mipi-dsim", | 593 | .name = "exynos-mipi-dsim", |
| 594 | .owner = THIS_MODULE, | 594 | .owner = THIS_MODULE, |
| 595 | .pm = &exynos_mipi_dsi_pm_ops, | ||
| 595 | }, | 596 | }, |
| 596 | }; | 597 | }; |
| 597 | 598 | ||
