aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-12-03 19:10:10 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-12-04 20:55:12 -0500
commite243c7c1a41476d505ee77481c08ff32470edbeb (patch)
tree591c82f7f9f5c3d87c5a9174795b7e12192eed89
parentdc5686e45dd9e0bba765bf8b5ef5250e1b4112d8 (diff)
media / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks depending on CONFIG_PM_RUNTIME may now be changed to depend on CONFIG_PM. The alternative of CONFIG_PM_SLEEP and CONFIG_PM_RUNTIME may be replaced with CONFIG_PM too. Make these changes everywhere under drivers/media/. Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Kamil Debski <k.debski@samsung.com> Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/media/platform/coda/coda-common.c4
-rw-r--r--drivers/media/platform/exynos4-is/fimc-core.c6
-rw-r--r--drivers/media/platform/exynos4-is/fimc-is-i2c.c2
-rw-r--r--drivers/media/platform/exynos4-is/fimc-lite.c2
-rw-r--r--drivers/media/platform/exynos4-is/mipi-csis.c2
-rw-r--r--drivers/media/platform/s5p-jpeg/jpeg-core.c4
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc.c2
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc_pm.c10
8 files changed, 15 insertions, 17 deletions
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index ced47609f5ef..5f0cd5cafea2 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -1980,7 +1980,7 @@ static int coda_probe(struct platform_device *pdev)
1980 1980
1981 /* 1981 /*
1982 * Start activated so we can directly call coda_hw_init in 1982 * Start activated so we can directly call coda_hw_init in
1983 * coda_fw_callback regardless of whether CONFIG_PM_RUNTIME is 1983 * coda_fw_callback regardless of whether CONFIG_PM is
1984 * enabled or whether the device is associated with a PM domain. 1984 * enabled or whether the device is associated with a PM domain.
1985 */ 1985 */
1986 pm_runtime_get_noresume(&pdev->dev); 1986 pm_runtime_get_noresume(&pdev->dev);
@@ -2013,7 +2013,7 @@ static int coda_remove(struct platform_device *pdev)
2013 return 0; 2013 return 0;
2014} 2014}
2015 2015
2016#ifdef CONFIG_PM_RUNTIME 2016#ifdef CONFIG_PM
2017static int coda_runtime_resume(struct device *dev) 2017static int coda_runtime_resume(struct device *dev)
2018{ 2018{
2019 struct coda_dev *cdev = dev_get_drvdata(dev); 2019 struct coda_dev *cdev = dev_get_drvdata(dev);
diff --git a/drivers/media/platform/exynos4-is/fimc-core.c b/drivers/media/platform/exynos4-is/fimc-core.c
index aee92d908e49..f5d85520caf3 100644
--- a/drivers/media/platform/exynos4-is/fimc-core.c
+++ b/drivers/media/platform/exynos4-is/fimc-core.c
@@ -832,7 +832,7 @@ err:
832 return -ENXIO; 832 return -ENXIO;
833} 833}
834 834
835#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) 835#ifdef CONFIG_PM
836static int fimc_m2m_suspend(struct fimc_dev *fimc) 836static int fimc_m2m_suspend(struct fimc_dev *fimc)
837{ 837{
838 unsigned long flags; 838 unsigned long flags;
@@ -871,7 +871,7 @@ static int fimc_m2m_resume(struct fimc_dev *fimc)
871 871
872 return 0; 872 return 0;
873} 873}
874#endif /* CONFIG_PM_RUNTIME || CONFIG_PM_SLEEP */ 874#endif /* CONFIG_PM */
875 875
876static const struct of_device_id fimc_of_match[]; 876static const struct of_device_id fimc_of_match[];
877 877
@@ -1039,7 +1039,7 @@ err_sclk:
1039 return ret; 1039 return ret;
1040} 1040}
1041 1041
1042#ifdef CONFIG_PM_RUNTIME 1042#ifdef CONFIG_PM
1043static int fimc_runtime_resume(struct device *dev) 1043static int fimc_runtime_resume(struct device *dev)
1044{ 1044{
1045 struct fimc_dev *fimc = dev_get_drvdata(dev); 1045 struct fimc_dev *fimc = dev_get_drvdata(dev);
diff --git a/drivers/media/platform/exynos4-is/fimc-is-i2c.c b/drivers/media/platform/exynos4-is/fimc-is-i2c.c
index 371cad4fcce9..d83033170789 100644
--- a/drivers/media/platform/exynos4-is/fimc-is-i2c.c
+++ b/drivers/media/platform/exynos4-is/fimc-is-i2c.c
@@ -81,7 +81,7 @@ static int fimc_is_i2c_remove(struct platform_device *pdev)
81 return 0; 81 return 0;
82} 82}
83 83
84#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) 84#ifdef CONFIG_PM
85static int fimc_is_i2c_runtime_suspend(struct device *dev) 85static int fimc_is_i2c_runtime_suspend(struct device *dev)
86{ 86{
87 struct fimc_is_i2c *isp_i2c = dev_get_drvdata(dev); 87 struct fimc_is_i2c *isp_i2c = dev_get_drvdata(dev);
diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c
index a97d2352f1d7..6c1eb308f7b5 100644
--- a/drivers/media/platform/exynos4-is/fimc-lite.c
+++ b/drivers/media/platform/exynos4-is/fimc-lite.c
@@ -1588,7 +1588,7 @@ err_clk_put:
1588 return ret; 1588 return ret;
1589} 1589}
1590 1590
1591#ifdef CONFIG_PM_RUNTIME 1591#ifdef CONFIG_PM
1592static int fimc_lite_runtime_resume(struct device *dev) 1592static int fimc_lite_runtime_resume(struct device *dev)
1593{ 1593{
1594 struct fimc_lite *fimc = dev_get_drvdata(dev); 1594 struct fimc_lite *fimc = dev_get_drvdata(dev);
diff --git a/drivers/media/platform/exynos4-is/mipi-csis.c b/drivers/media/platform/exynos4-is/mipi-csis.c
index db6fd14d1936..be5d6fc895cb 100644
--- a/drivers/media/platform/exynos4-is/mipi-csis.c
+++ b/drivers/media/platform/exynos4-is/mipi-csis.c
@@ -978,7 +978,7 @@ static int s5pcsis_resume(struct device *dev)
978} 978}
979#endif 979#endif
980 980
981#ifdef CONFIG_PM_RUNTIME 981#ifdef CONFIG_PM
982static int s5pcsis_runtime_suspend(struct device *dev) 982static int s5pcsis_runtime_suspend(struct device *dev)
983{ 983{
984 return s5pcsis_pm_suspend(dev, true); 984 return s5pcsis_pm_suspend(dev, true);
diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c
index 6fcc7f072ace..fe2727413f3a 100644
--- a/drivers/media/platform/s5p-jpeg/jpeg-core.c
+++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
@@ -2632,7 +2632,7 @@ static int s5p_jpeg_remove(struct platform_device *pdev)
2632 return 0; 2632 return 0;
2633} 2633}
2634 2634
2635#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) 2635#ifdef CONFIG_PM
2636static int s5p_jpeg_runtime_suspend(struct device *dev) 2636static int s5p_jpeg_runtime_suspend(struct device *dev)
2637{ 2637{
2638 struct s5p_jpeg *jpeg = dev_get_drvdata(dev); 2638 struct s5p_jpeg *jpeg = dev_get_drvdata(dev);
@@ -2682,7 +2682,7 @@ static int s5p_jpeg_runtime_resume(struct device *dev)
2682 2682
2683 return 0; 2683 return 0;
2684} 2684}
2685#endif /* CONFIG_PM_RUNTIME || CONFIG_PM_SLEEP */ 2685#endif /* CONFIG_PM */
2686 2686
2687#ifdef CONFIG_PM_SLEEP 2687#ifdef CONFIG_PM_SLEEP
2688static int s5p_jpeg_suspend(struct device *dev) 2688static int s5p_jpeg_suspend(struct device *dev)
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index 165bc86c5962..363fd8c0a699 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -1302,7 +1302,7 @@ static int s5p_mfc_resume(struct device *dev)
1302} 1302}
1303#endif 1303#endif
1304 1304
1305#ifdef CONFIG_PM_RUNTIME 1305#ifdef CONFIG_PM
1306static int s5p_mfc_runtime_suspend(struct device *dev) 1306static int s5p_mfc_runtime_suspend(struct device *dev)
1307{ 1307{
1308 struct platform_device *pdev = to_platform_device(dev); 1308 struct platform_device *pdev = to_platform_device(dev);
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c b/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c
index 826c48945bf5..5f97a3398c11 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c
@@ -13,9 +13,7 @@
13#include <linux/clk.h> 13#include <linux/clk.h>
14#include <linux/err.h> 14#include <linux/err.h>
15#include <linux/platform_device.h> 15#include <linux/platform_device.h>
16#ifdef CONFIG_PM_RUNTIME
17#include <linux/pm_runtime.h> 16#include <linux/pm_runtime.h>
18#endif
19#include "s5p_mfc_common.h" 17#include "s5p_mfc_common.h"
20#include "s5p_mfc_debug.h" 18#include "s5p_mfc_debug.h"
21#include "s5p_mfc_pm.h" 19#include "s5p_mfc_pm.h"
@@ -67,7 +65,7 @@ int s5p_mfc_init_pm(struct s5p_mfc_dev *dev)
67 } 65 }
68 66
69 atomic_set(&pm->power, 0); 67 atomic_set(&pm->power, 0);
70#ifdef CONFIG_PM_RUNTIME 68#ifdef CONFIG_PM
71 pm->device = &dev->plat_dev->dev; 69 pm->device = &dev->plat_dev->dev;
72 pm_runtime_enable(pm->device); 70 pm_runtime_enable(pm->device);
73#endif 71#endif
@@ -93,7 +91,7 @@ void s5p_mfc_final_pm(struct s5p_mfc_dev *dev)
93 } 91 }
94 clk_unprepare(pm->clock_gate); 92 clk_unprepare(pm->clock_gate);
95 clk_put(pm->clock_gate); 93 clk_put(pm->clock_gate);
96#ifdef CONFIG_PM_RUNTIME 94#ifdef CONFIG_PM
97 pm_runtime_disable(pm->device); 95 pm_runtime_disable(pm->device);
98#endif 96#endif
99} 97}
@@ -120,7 +118,7 @@ void s5p_mfc_clock_off(void)
120 118
121int s5p_mfc_power_on(void) 119int s5p_mfc_power_on(void)
122{ 120{
123#ifdef CONFIG_PM_RUNTIME 121#ifdef CONFIG_PM
124 return pm_runtime_get_sync(pm->device); 122 return pm_runtime_get_sync(pm->device);
125#else 123#else
126 atomic_set(&pm->power, 1); 124 atomic_set(&pm->power, 1);
@@ -130,7 +128,7 @@ int s5p_mfc_power_on(void)
130 128
131int s5p_mfc_power_off(void) 129int s5p_mfc_power_off(void)
132{ 130{
133#ifdef CONFIG_PM_RUNTIME 131#ifdef CONFIG_PM
134 return pm_runtime_put_sync(pm->device); 132 return pm_runtime_put_sync(pm->device);
135#else 133#else
136 atomic_set(&pm->power, 0); 134 atomic_set(&pm->power, 0);