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: 10654667 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D482817E2 for ; Wed, 24 Oct 2018 13:51:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C546E2A91D for ; Wed, 24 Oct 2018 13:51:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B90C82A8F6; Wed, 24 Oct 2018 13:51:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 57F1B2A92C for ; Wed, 24 Oct 2018 13:51:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726894AbeJXWTw (ORCPT ); Wed, 24 Oct 2018 18:19:52 -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-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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: 10654675 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F040314BD for ; Wed, 24 Oct 2018 13:51:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DCEF32A8F6 for ; Wed, 24 Oct 2018 13:51:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC0AF2A90A; Wed, 24 Oct 2018 13:51:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BE572A8AA for ; Wed, 24 Oct 2018 13:51:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727000AbeJXWTz (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-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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: 10654681 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9480B13BF for ; Wed, 24 Oct 2018 13:51:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 854DF2A90A for ; Wed, 24 Oct 2018 13:51:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 78A582A927; Wed, 24 Oct 2018 13:51:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 320482A90A for ; Wed, 24 Oct 2018 13:51:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727073AbeJXWT6 (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-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 = {