From patchwork Wed Dec 3 02:13:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 27273 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1Xvz7c-0001aP-E6; Wed, 03 Dec 2014 02:52:52 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.72/mailfrontend-6) with esmtp id 1Xvz7a-000379-3H; Wed, 03 Dec 2014 02:52:52 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750963AbaLCBwd (ORCPT + 1 other); Tue, 2 Dec 2014 20:52:33 -0500 Received: from v094114.home.net.pl ([79.96.170.134]:62570 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1750730AbaLCBwc (ORCPT ); Tue, 2 Dec 2014 20:52:32 -0500 Received: from afer195.neoplus.adsl.tpnet.pl (95.49.121.195) (HELO vostro.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer v0.80) id 814b8c7097f5d5d5; Wed, 3 Dec 2014 02:52:30 +0100 From: "Rafael J. Wysocki" To: linux-media@vger.kernel.org Cc: Kyungmin Park , Sylwester Nawrocki , Mauro Carvalho Chehab , Kukjin Kim , linux-samsung-soc@vger.kernel.org, Kamil Debski , Philipp Zabel , Linux PM list , Linux Kernel Mailing List Subject: [PATCH] media / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM Date: Wed, 03 Dec 2014 03:13:55 +0100 Message-ID: <4139875.fkJ48z9AaU@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/3.16.0-rc5+; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2014.12.3.14527 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, MSGID_ADDED_BY_MTA 0.05, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS , __USER_AGENT 0' From: Rafael J. Wysocki 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/. Signed-off-by: Rafael J. Wysocki Acked-by: Sylwester Nawrocki Acked-by: Philipp Zabel Acked-by: Kamil Debski Acked-by: Mauro Carvalho Chehab --- Note: This depends on commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) which is only in linux-next at the moment (via the linux-pm tree). Please let me know if it is OK to take this one into linux-pm. --- drivers/media/platform/coda/coda-common.c | 4 ++-- drivers/media/platform/exynos4-is/fimc-core.c | 6 +++--- drivers/media/platform/exynos4-is/fimc-is-i2c.c | 2 +- drivers/media/platform/exynos4-is/fimc-lite.c | 2 +- drivers/media/platform/exynos4-is/mipi-csis.c | 2 +- drivers/media/platform/s5p-jpeg/jpeg-core.c | 4 ++-- drivers/media/platform/s5p-mfc/s5p_mfc.c | 2 +- drivers/media/platform/s5p-mfc/s5p_mfc_pm.c | 10 ++++------ 8 files changed, 15 insertions(+), 17 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-pm/drivers/media/platform/s5p-jpeg/jpeg-core.c =================================================================== --- linux-pm.orig/drivers/media/platform/s5p-jpeg/jpeg-core.c +++ linux-pm/drivers/media/platform/s5p-jpeg/jpeg-core.c @@ -2632,7 +2632,7 @@ static int s5p_jpeg_remove(struct platfo return 0; } -#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) +#ifdef CONFIG_PM static int s5p_jpeg_runtime_suspend(struct device *dev) { struct s5p_jpeg *jpeg = dev_get_drvdata(dev); @@ -2682,7 +2682,7 @@ static int s5p_jpeg_runtime_resume(struc return 0; } -#endif /* CONFIG_PM_RUNTIME || CONFIG_PM_SLEEP */ +#endif /* CONFIG_PM */ #ifdef CONFIG_PM_SLEEP static int s5p_jpeg_suspend(struct device *dev) Index: linux-pm/drivers/media/platform/s5p-mfc/s5p_mfc.c =================================================================== --- linux-pm.orig/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ linux-pm/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -1302,7 +1302,7 @@ static int s5p_mfc_resume(struct device } #endif -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM static int s5p_mfc_runtime_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); Index: linux-pm/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c =================================================================== --- linux-pm.orig/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c +++ linux-pm/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c @@ -13,9 +13,7 @@ #include #include #include -#ifdef CONFIG_PM_RUNTIME #include -#endif #include "s5p_mfc_common.h" #include "s5p_mfc_debug.h" #include "s5p_mfc_pm.h" @@ -67,7 +65,7 @@ int s5p_mfc_init_pm(struct s5p_mfc_dev * } atomic_set(&pm->power, 0); -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM pm->device = &dev->plat_dev->dev; pm_runtime_enable(pm->device); #endif @@ -93,7 +91,7 @@ void s5p_mfc_final_pm(struct s5p_mfc_dev } clk_unprepare(pm->clock_gate); clk_put(pm->clock_gate); -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM pm_runtime_disable(pm->device); #endif } @@ -120,7 +118,7 @@ void s5p_mfc_clock_off(void) int s5p_mfc_power_on(void) { -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM return pm_runtime_get_sync(pm->device); #else atomic_set(&pm->power, 1); @@ -130,7 +128,7 @@ int s5p_mfc_power_on(void) int s5p_mfc_power_off(void) { -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM return pm_runtime_put_sync(pm->device); #else atomic_set(&pm->power, 0); Index: linux-pm/drivers/media/platform/exynos4-is/fimc-is-i2c.c =================================================================== --- linux-pm.orig/drivers/media/platform/exynos4-is/fimc-is-i2c.c +++ linux-pm/drivers/media/platform/exynos4-is/fimc-is-i2c.c @@ -81,7 +81,7 @@ static int fimc_is_i2c_remove(struct pla return 0; } -#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) +#ifdef CONFIG_PM static int fimc_is_i2c_runtime_suspend(struct device *dev) { struct fimc_is_i2c *isp_i2c = dev_get_drvdata(dev); Index: linux-pm/drivers/media/platform/exynos4-is/fimc-lite.c =================================================================== --- linux-pm.orig/drivers/media/platform/exynos4-is/fimc-lite.c +++ linux-pm/drivers/media/platform/exynos4-is/fimc-lite.c @@ -1588,7 +1588,7 @@ err_clk_put: return ret; } -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM static int fimc_lite_runtime_resume(struct device *dev) { struct fimc_lite *fimc = dev_get_drvdata(dev); Index: linux-pm/drivers/media/platform/exynos4-is/mipi-csis.c =================================================================== --- linux-pm.orig/drivers/media/platform/exynos4-is/mipi-csis.c +++ linux-pm/drivers/media/platform/exynos4-is/mipi-csis.c @@ -978,7 +978,7 @@ static int s5pcsis_resume(struct device } #endif -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM static int s5pcsis_runtime_suspend(struct device *dev) { return s5pcsis_pm_suspend(dev, true); Index: linux-pm/drivers/media/platform/exynos4-is/fimc-core.c =================================================================== --- linux-pm.orig/drivers/media/platform/exynos4-is/fimc-core.c +++ linux-pm/drivers/media/platform/exynos4-is/fimc-core.c @@ -832,7 +832,7 @@ err: return -ENXIO; } -#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) +#ifdef CONFIG_PM static int fimc_m2m_suspend(struct fimc_dev *fimc) { unsigned long flags; @@ -871,7 +871,7 @@ static int fimc_m2m_resume(struct fimc_d return 0; } -#endif /* CONFIG_PM_RUNTIME || CONFIG_PM_SLEEP */ +#endif /* CONFIG_PM */ static const struct of_device_id fimc_of_match[]; @@ -1039,7 +1039,7 @@ err_sclk: return ret; } -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM static int fimc_runtime_resume(struct device *dev) { struct fimc_dev *fimc = dev_get_drvdata(dev); Index: linux-pm/drivers/media/platform/coda/coda-common.c =================================================================== --- linux-pm.orig/drivers/media/platform/coda/coda-common.c +++ linux-pm/drivers/media/platform/coda/coda-common.c @@ -1980,7 +1980,7 @@ static int coda_probe(struct platform_de /* * Start activated so we can directly call coda_hw_init in - * coda_fw_callback regardless of whether CONFIG_PM_RUNTIME is + * coda_fw_callback regardless of whether CONFIG_PM is * enabled or whether the device is associated with a PM domain. */ pm_runtime_get_noresume(&pdev->dev); @@ -2013,7 +2013,7 @@ static int coda_remove(struct platform_d return 0; } -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM static int coda_runtime_resume(struct device *dev) { struct coda_dev *cdev = dev_get_drvdata(dev);