From patchwork Fri Mar 21 10:15:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Dooks X-Patchwork-Id: 332526 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 7CDF92C00B3 for ; Fri, 21 Mar 2014 21:15:27 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933689AbaCUKPV (ORCPT ); Fri, 21 Mar 2014 06:15:21 -0400 Received: from access.ducie-dc1.codethink.co.uk ([185.25.241.217]:54383 "EHLO rt.codethink.co.uk" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1760487AbaCUKPR (ORCPT ); Fri, 21 Mar 2014 06:15:17 -0400 Received: from rainbowdash.ducie.codethink.co.uk (localhost [127.0.0.1]) by rt.codethink.co.uk (Postfix) with ESMTPS id 3BBC31A0BDC; Fri, 21 Mar 2014 10:15:16 +0000 (GMT) Received: from ben by rainbowdash.ducie.codethink.co.uk with local (Exim 4.82) (envelope-from ) id 1WQwTr-0006LN-2B; Fri, 21 Mar 2014 11:15:15 +0100 From: Ben Dooks To: linux-kernel@lists.codethink.co.uk, netdev@vger.kernel.org Cc: linux-sh@vger.kernel.org, davem@davemloft.net, Ben Dooks Subject: [PATCH] sh_eth: pm_runtime should not need null operations Date: Fri, 21 Mar 2014 11:15:13 +0100 Message-Id: <1395396913-24354-1-git-send-email-ben.dooks@codethink.co.uk> X-Mailer: git-send-email 1.9.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The driver has a no-op for the pm_runtime callbacks but the pm_runtime core should correctly ignore drivers without any pm_rumtime callback ops. Signed-off-by: Ben Dooks --- drivers/net/ethernet/renesas/sh_eth.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index b908507..bb93333e 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c @@ -2998,28 +2998,6 @@ static int sh_eth_drv_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM -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 = { - .runtime_suspend = sh_eth_runtime_nop, - .runtime_resume = sh_eth_runtime_nop, -}; -#define SH_ETH_PM_OPS (&sh_eth_dev_pm_ops) -#else -#define SH_ETH_PM_OPS NULL -#endif - static struct platform_device_id sh_eth_id_table[] = { { "sh7619-ether", (kernel_ulong_t)&sh7619_data }, { "sh771x-ether", (kernel_ulong_t)&sh771x_data }, @@ -3043,7 +3021,6 @@ static struct platform_driver sh_eth_driver = { .id_table = sh_eth_id_table, .driver = { .name = CARDNAME, - .pm = SH_ETH_PM_OPS, .of_match_table = of_match_ptr(sh_eth_match_table), }, };