Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+15 -17
+2 -2
drivers/media/platform/coda/coda-common.c
··· 1980 1980 1981 1981 /* 1982 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 1984 * enabled or whether the device is associated with a PM domain. 1985 1985 */ 1986 1986 pm_runtime_get_noresume(&pdev->dev); ··· 2013 2013 return 0; 2014 2014 } 2015 2015 2016 - #ifdef CONFIG_PM_RUNTIME 2016 + #ifdef CONFIG_PM 2017 2017 static int coda_runtime_resume(struct device *dev) 2018 2018 { 2019 2019 struct coda_dev *cdev = dev_get_drvdata(dev);
+3 -3
drivers/media/platform/exynos4-is/fimc-core.c
··· 832 832 return -ENXIO; 833 833 } 834 834 835 - #if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) 835 + #ifdef CONFIG_PM 836 836 static int fimc_m2m_suspend(struct fimc_dev *fimc) 837 837 { 838 838 unsigned long flags; ··· 871 871 872 872 return 0; 873 873 } 874 - #endif /* CONFIG_PM_RUNTIME || CONFIG_PM_SLEEP */ 874 + #endif /* CONFIG_PM */ 875 875 876 876 static const struct of_device_id fimc_of_match[]; 877 877 ··· 1039 1039 return ret; 1040 1040 } 1041 1041 1042 - #ifdef CONFIG_PM_RUNTIME 1042 + #ifdef CONFIG_PM 1043 1043 static int fimc_runtime_resume(struct device *dev) 1044 1044 { 1045 1045 struct fimc_dev *fimc = dev_get_drvdata(dev);
+1 -1
drivers/media/platform/exynos4-is/fimc-is-i2c.c
··· 81 81 return 0; 82 82 } 83 83 84 - #if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) 84 + #ifdef CONFIG_PM 85 85 static int fimc_is_i2c_runtime_suspend(struct device *dev) 86 86 { 87 87 struct fimc_is_i2c *isp_i2c = dev_get_drvdata(dev);
+1 -1
drivers/media/platform/exynos4-is/fimc-lite.c
··· 1588 1588 return ret; 1589 1589 } 1590 1590 1591 - #ifdef CONFIG_PM_RUNTIME 1591 + #ifdef CONFIG_PM 1592 1592 static int fimc_lite_runtime_resume(struct device *dev) 1593 1593 { 1594 1594 struct fimc_lite *fimc = dev_get_drvdata(dev);
+1 -1
drivers/media/platform/exynos4-is/mipi-csis.c
··· 978 978 } 979 979 #endif 980 980 981 - #ifdef CONFIG_PM_RUNTIME 981 + #ifdef CONFIG_PM 982 982 static int s5pcsis_runtime_suspend(struct device *dev) 983 983 { 984 984 return s5pcsis_pm_suspend(dev, true);
+2 -2
drivers/media/platform/s5p-jpeg/jpeg-core.c
··· 2632 2632 return 0; 2633 2633 } 2634 2634 2635 - #if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) 2635 + #ifdef CONFIG_PM 2636 2636 static int s5p_jpeg_runtime_suspend(struct device *dev) 2637 2637 { 2638 2638 struct s5p_jpeg *jpeg = dev_get_drvdata(dev); ··· 2682 2682 2683 2683 return 0; 2684 2684 } 2685 - #endif /* CONFIG_PM_RUNTIME || CONFIG_PM_SLEEP */ 2685 + #endif /* CONFIG_PM */ 2686 2686 2687 2687 #ifdef CONFIG_PM_SLEEP 2688 2688 static int s5p_jpeg_suspend(struct device *dev)
+1 -1
drivers/media/platform/s5p-mfc/s5p_mfc.c
··· 1302 1302 } 1303 1303 #endif 1304 1304 1305 - #ifdef CONFIG_PM_RUNTIME 1305 + #ifdef CONFIG_PM 1306 1306 static int s5p_mfc_runtime_suspend(struct device *dev) 1307 1307 { 1308 1308 struct platform_device *pdev = to_platform_device(dev);
+4 -6
drivers/media/platform/s5p-mfc/s5p_mfc_pm.c
··· 13 13 #include <linux/clk.h> 14 14 #include <linux/err.h> 15 15 #include <linux/platform_device.h> 16 - #ifdef CONFIG_PM_RUNTIME 17 16 #include <linux/pm_runtime.h> 18 - #endif 19 17 #include "s5p_mfc_common.h" 20 18 #include "s5p_mfc_debug.h" 21 19 #include "s5p_mfc_pm.h" ··· 65 67 } 66 68 67 69 atomic_set(&pm->power, 0); 68 - #ifdef CONFIG_PM_RUNTIME 70 + #ifdef CONFIG_PM 69 71 pm->device = &dev->plat_dev->dev; 70 72 pm_runtime_enable(pm->device); 71 73 #endif ··· 91 93 } 92 94 clk_unprepare(pm->clock_gate); 93 95 clk_put(pm->clock_gate); 94 - #ifdef CONFIG_PM_RUNTIME 96 + #ifdef CONFIG_PM 95 97 pm_runtime_disable(pm->device); 96 98 #endif 97 99 } ··· 118 120 119 121 int s5p_mfc_power_on(void) 120 122 { 121 - #ifdef CONFIG_PM_RUNTIME 123 + #ifdef CONFIG_PM 122 124 return pm_runtime_get_sync(pm->device); 123 125 #else 124 126 atomic_set(&pm->power, 1); ··· 128 130 129 131 int s5p_mfc_power_off(void) 130 132 { 131 - #ifdef CONFIG_PM_RUNTIME 133 + #ifdef CONFIG_PM 132 134 return pm_runtime_put_sync(pm->device); 133 135 #else 134 136 atomic_set(&pm->power, 0);