From patchwork Fri Feb 27 11:19:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Grygorii.Strashko@linaro.org" X-Patchwork-Id: 45216 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E9143204BC for ; Fri, 27 Feb 2015 11:20:01 +0000 (UTC) Received: by wggy19 with SMTP id y19sf13511211wgg.1 for ; Fri, 27 Feb 2015 03:20:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=LsndtOke9BEsHYr3UM9MfGBe4tfoVlAyHTlQ5FuJIdo=; b=GJG6RLYfKkcLSMbXZUntj8qAIavjHGEJLn5E0pXsnMOM/Kx+w0/GNTMlw5C0rSarud kX7YZNRzdWCKaH6vu541DAOY29eeAtXzpamUTwHQYhfDhjyQp925oxcGlEj1FaJ/robm UHvGkNWRP72avB5QsmcpCw4AL7vrkw1mkPn5uShCZNdOtH7EFns1n1EyzQV7L/M5RgQ4 hfPkAEBYsu3kda6okfDsxQwHzEPj4HWOpi85pYprdEQ4rW40ouCQ7DKQHhK4bjMi83tm 1X2OY53X1dK4d14+frwKRpvRKKPpgbZoFBSUSyJyAZ56UEvHYQrQ/W00A/8mmDyPziGq sZbQ== X-Gm-Message-State: ALoCoQnRNxwugpk9lJ0YzYMY8hpDXhJhSqnjq5XEMVqqoOsJwOF7ef8g4K2DfbTIJWErennaLoXG X-Received: by 10.181.13.236 with SMTP id fb12mr387929wid.1.1425036001083; Fri, 27 Feb 2015 03:20:01 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.206.104 with SMTP id ln8ls138862lac.94.gmail; Fri, 27 Feb 2015 03:20:00 -0800 (PST) X-Received: by 10.152.120.8 with SMTP id ky8mr11512785lab.118.1425036000898; Fri, 27 Feb 2015 03:20:00 -0800 (PST) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id s4si2716595lbo.42.2015.02.27.03.20.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Feb 2015 03:20:00 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by lbjb6 with SMTP id b6so16563721lbj.12 for ; Fri, 27 Feb 2015 03:20:00 -0800 (PST) X-Received: by 10.152.197.34 with SMTP id ir2mr11980753lac.36.1425036000761; Fri, 27 Feb 2015 03:20:00 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp3868533lbj; Fri, 27 Feb 2015 03:19:59 -0800 (PST) X-Received: by 10.70.55.42 with SMTP id o10mr22742138pdp.21.1425035997626; Fri, 27 Feb 2015 03:19:57 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id mj2si5139187pdb.81.2015.02.27.03.19.56; Fri, 27 Feb 2015 03:19:57 -0800 (PST) Received-SPF: none (google.com: linux-omap-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752178AbbB0LTy (ORCPT + 5 others); Fri, 27 Feb 2015 06:19:54 -0500 Received: from mail-la0-f52.google.com ([209.85.215.52]:38260 "EHLO mail-la0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752241AbbB0LTx (ORCPT ); Fri, 27 Feb 2015 06:19:53 -0500 Received: by lamq1 with SMTP id q1so16848206lam.5 for ; Fri, 27 Feb 2015 03:19:52 -0800 (PST) X-Received: by 10.152.179.135 with SMTP id dg7mr12243278lac.58.1425035991894; Fri, 27 Feb 2015 03:19:51 -0800 (PST) Received: from localhost ([195.238.92.128]) by mx.google.com with ESMTPSA id qw1sm430239lbb.21.2015.02.27.03.19.51 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 27 Feb 2015 03:19:51 -0800 (PST) From: To: "David S. Miller" , Felipe Balbi Cc: , , Mugunthan V N , netdev@vger.kernel.org, , Grygorii Strashko Subject: [PATCH 1/2] net: davinci_mdio: add hibernation callbacks Date: Fri, 27 Feb 2015 13:19:44 +0200 Message-Id: <1425035985-8875-1-git-send-email-grygorii.strashko@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: grygorii.strashko@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Grygorii Strashko Setting a dev_pm_ops suspend_late/resume_early pair but not a set of hibernation functions means those pm functions will not be called upon hibernation. Fix this by using SET_LATE_SYSTEM_SLEEP_PM_OPS, which appropriately assigns the suspend and hibernation handlers and move davinci_mdio_x callbacks under CONFIG_PM_SLEEP to avoid build warnings. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/davinci_mdio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c index e58f0a7..25871dc 100644 --- a/drivers/net/ethernet/ti/davinci_mdio.c +++ b/drivers/net/ethernet/ti/davinci_mdio.c @@ -438,6 +438,7 @@ static int davinci_mdio_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_PM_SLEEP static int davinci_mdio_suspend(struct device *dev) { struct davinci_mdio_data *data = dev_get_drvdata(dev); @@ -479,10 +480,10 @@ static int davinci_mdio_resume(struct device *dev) return 0; } +#endif static const struct dev_pm_ops davinci_mdio_pm_ops = { - .suspend_late = davinci_mdio_suspend, - .resume_early = davinci_mdio_resume, + SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume) }; #if IS_ENABLED(CONFIG_OF)