From patchwork Wed Oct 24 13:51:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 988660 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-i2c-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.intel.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42gBWK0S5bz9s9h for ; Thu, 25 Oct 2018 00:51:41 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726449AbeJXWTv (ORCPT ); Wed, 24 Oct 2018 18:19:51 -0400 Received: from mga11.intel.com ([192.55.52.93]:24935 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726285AbeJXWTv (ORCPT ); Wed, 24 Oct 2018 18:19:51 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Oct 2018 06:51:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,420,1534834800"; d="scan'208";a="243974666" Received: from mylly.fi.intel.com (HELO mylly.fi.intel.com.) ([10.237.72.182]) by orsmga004.jf.intel.com with ESMTP; 24 Oct 2018 06:51:35 -0700 From: Jarkko Nikula To: linux-pm@vger.kernel.org Cc: linux-i2c@vger.kernel.org, Wolfram Sang , netdev@vger.kernel.org, "David S . Miller" , Sergei Shtylyov , linux-renesas-soc@vger.kernel.org, linux-usb@vger.kernel.org, Yoshihiro Shimoda , Jarkko Nikula Subject: [PATCH 1/3] i2c: sh_mobile: Remove dummy runtime PM callbacks Date: Wed, 24 Oct 2018 16:51:32 +0300 Message-Id: <20181024135134.28456-2-jarkko.nikula@linux.intel.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181024135134.28456-1-jarkko.nikula@linux.intel.com> References: <20181024135134.28456-1-jarkko.nikula@linux.intel.com> MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Platform drivers don't need dummy runtime PM callbacks that just return success and non-NULL pm pointer in their struct device_driver in order to have runtime PM happening. This has changed since following commits: 05aa55dddb9e ("PM / Runtime: Lenient generic runtime pm callbacks") 543f2503a956 ("PM / platform_bus: Allow runtime PM by default") 8b313a38ecff ("PM / Platform: Use generic runtime PM callbacks directly") Signed-off-by: Jarkko Nikula --- Only build tested. --- drivers/i2c/busses/i2c-sh_mobile.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c index 818cab14e87c..a7a7a9c3bc7c 100644 --- a/drivers/i2c/busses/i2c-sh_mobile.c +++ b/drivers/i2c/busses/i2c-sh_mobile.c @@ -947,27 +947,9 @@ static int sh_mobile_i2c_remove(struct platform_device *dev) return 0; } -static int sh_mobile_i2c_runtime_nop(struct device *dev) -{ - /* Runtime PM callback shared between ->runtime_suspend() - * and ->runtime_resume(). Simply returns success. - * - * This driver re-initializes all registers after - * pm_runtime_get_sync() anyway so there is no need - * to save and restore registers here. - */ - return 0; -} - -static const struct dev_pm_ops sh_mobile_i2c_dev_pm_ops = { - .runtime_suspend = sh_mobile_i2c_runtime_nop, - .runtime_resume = sh_mobile_i2c_runtime_nop, -}; - static struct platform_driver sh_mobile_i2c_driver = { .driver = { .name = "i2c-sh_mobile", - .pm = &sh_mobile_i2c_dev_pm_ops, .of_match_table = sh_mobile_i2c_dt_ids, }, .probe = sh_mobile_i2c_probe, From patchwork Wed Oct 24 13:51:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 988665 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-i2c-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.intel.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42gBWW16t5z9sB7 for ; Thu, 25 Oct 2018 00:51:51 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726964AbeJXWTz (ORCPT ); Wed, 24 Oct 2018 18:19:55 -0400 Received: from mga11.intel.com ([192.55.52.93]:24935 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726285AbeJXWTy (ORCPT ); Wed, 24 Oct 2018 18:19:54 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Oct 2018 06:51:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,420,1534834800"; d="scan'208";a="243974681" Received: from mylly.fi.intel.com (HELO mylly.fi.intel.com.) ([10.237.72.182]) by orsmga004.jf.intel.com with ESMTP; 24 Oct 2018 06:51:38 -0700 From: Jarkko Nikula To: linux-pm@vger.kernel.org Cc: linux-i2c@vger.kernel.org, Wolfram Sang , netdev@vger.kernel.org, "David S . Miller" , Sergei Shtylyov , linux-renesas-soc@vger.kernel.org, linux-usb@vger.kernel.org, Yoshihiro Shimoda , Jarkko Nikula Subject: [PATCH 2/3] net: ethernet: Remove dummy runtime PM callbacks from Renesas drivers Date: Wed, 24 Oct 2018 16:51:33 +0300 Message-Id: <20181024135134.28456-3-jarkko.nikula@linux.intel.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181024135134.28456-1-jarkko.nikula@linux.intel.com> References: <20181024135134.28456-1-jarkko.nikula@linux.intel.com> MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Platform drivers don't need dummy runtime PM callbacks that just return success in order to have runtime PM happening. This has changed since following commits: 05aa55dddb9e ("PM / Runtime: Lenient generic runtime pm callbacks") 543f2503a956 ("PM / platform_bus: Allow runtime PM by default") 8b313a38ecff ("PM / Platform: Use generic runtime PM callbacks directly") Signed-off-by: Jarkko Nikula Reviewed-by: Sergei Shtylyov Acked-by: Wolfram Sang --- Only build tested. --- drivers/net/ethernet/renesas/ravb_main.c | 13 ------------- drivers/net/ethernet/renesas/sh_eth.c | 13 ------------- 2 files changed, 26 deletions(-) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index defed0d0c51d..9498f9d67501 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -2335,21 +2335,8 @@ static int __maybe_unused ravb_resume(struct device *dev) return ret; } -static int __maybe_unused ravb_runtime_nop(struct device *dev) -{ - /* Runtime PM callback shared between ->runtime_suspend() - * and ->runtime_resume(). Simply returns success. - * - * This driver re-initializes all registers after - * pm_runtime_get_sync() anyway so there is no need - * to save and restore registers here. - */ - return 0; -} - static const struct dev_pm_ops ravb_dev_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(ravb_suspend, ravb_resume) - SET_RUNTIME_PM_OPS(ravb_runtime_nop, ravb_runtime_nop, NULL) }; static struct platform_driver ravb_driver = { diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index f27a0dc8c563..980310686d45 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c @@ -3447,21 +3447,8 @@ static int sh_eth_resume(struct device *dev) } #endif -static int sh_eth_runtime_nop(struct device *dev) -{ - /* Runtime PM callback shared between ->runtime_suspend() - * and ->runtime_resume(). Simply returns success. - * - * This driver re-initializes all registers after - * pm_runtime_get_sync() anyway so there is no need - * to save and restore registers here. - */ - return 0; -} - static const struct dev_pm_ops sh_eth_dev_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(sh_eth_suspend, sh_eth_resume) - SET_RUNTIME_PM_OPS(sh_eth_runtime_nop, sh_eth_runtime_nop, NULL) }; #define SH_ETH_PM_OPS (&sh_eth_dev_pm_ops) #else From patchwork Wed Oct 24 13:51:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 988664 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-i2c-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.intel.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42gBWV3FVQz9sB5 for ; Thu, 25 Oct 2018 00:51:50 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727050AbeJXWT6 (ORCPT ); Wed, 24 Oct 2018 18:19:58 -0400 Received: from mga11.intel.com ([192.55.52.93]:24935 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726285AbeJXWT6 (ORCPT ); Wed, 24 Oct 2018 18:19:58 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Oct 2018 06:51:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,420,1534834800"; d="scan'208";a="243974697" Received: from mylly.fi.intel.com (HELO mylly.fi.intel.com.) ([10.237.72.182]) by orsmga004.jf.intel.com with ESMTP; 24 Oct 2018 06:51:41 -0700 From: Jarkko Nikula To: linux-pm@vger.kernel.org Cc: linux-i2c@vger.kernel.org, Wolfram Sang , netdev@vger.kernel.org, "David S . Miller" , Sergei Shtylyov , linux-renesas-soc@vger.kernel.org, linux-usb@vger.kernel.org, Yoshihiro Shimoda , Jarkko Nikula Subject: [PATCH 3/3] usb: renesas_usbhs: Remove dummy runtime PM callbacks Date: Wed, 24 Oct 2018 16:51:34 +0300 Message-Id: <20181024135134.28456-4-jarkko.nikula@linux.intel.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181024135134.28456-1-jarkko.nikula@linux.intel.com> References: <20181024135134.28456-1-jarkko.nikula@linux.intel.com> MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Platform drivers don't need dummy runtime PM callbacks that just return success in order to have runtime PM happening. This has changed since following commits: 05aa55dddb9e ("PM / Runtime: Lenient generic runtime pm callbacks") 543f2503a956 ("PM / platform_bus: Allow runtime PM by default") 8b313a38ecff ("PM / Platform: Use generic runtime PM callbacks directly") Signed-off-by: Jarkko Nikula Reviewed-by: Yoshihiro Shimoda Acked-by: Wolfram Sang --- Only build tested. --- drivers/usb/renesas_usbhs/common.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c index a3e1290d682d..0e760f228dd8 100644 --- a/drivers/usb/renesas_usbhs/common.c +++ b/drivers/usb/renesas_usbhs/common.c @@ -874,23 +874,9 @@ static int usbhsc_resume(struct device *dev) return 0; } -static int usbhsc_runtime_nop(struct device *dev) -{ - /* Runtime PM callback shared between ->runtime_suspend() - * and ->runtime_resume(). Simply returns success. - * - * This driver re-initializes all registers after - * pm_runtime_get_sync() anyway so there is no need - * to save and restore registers here. - */ - return 0; -} - static const struct dev_pm_ops usbhsc_pm_ops = { .suspend = usbhsc_suspend, .resume = usbhsc_resume, - .runtime_suspend = usbhsc_runtime_nop, - .runtime_resume = usbhsc_runtime_nop, }; static struct platform_driver renesas_usbhs_driver = {