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: 5900081 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4E83B9F38E for ; Fri, 27 Feb 2015 11:19:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 83C98202BE for ; Fri, 27 Feb 2015 11:19:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9BE3E20260 for ; Fri, 27 Feb 2015 11:19:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752178AbbB0LTy (ORCPT ); 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-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=wPb9HtHdVl2q36IldNKrlFQnRuVQptj7wlJCnZtriA0=; b=eFvhIIUqnreKHCFwkUb54NdYyuNLA3X9kL6bwOGKgtFLnQo+o3e6o20TIoponCYast tECL54gaw+7RF5RVWV+TblJd3yVdFiGu9lJyAS3OKh2Mc46GJztq7EXYoPh8XsNnx9PZ UkaKCHtFwLGPXBSfAFMblBdhaSy8+7enfiStwYgzWk8nxqesumNeCU4M2n13p7qY4MWL DF6b8mLKKfe9jNbPMbTICoL0EW4RWAugqbsB9R5a5jKGdKE8ZqNFtAfR6llIdL6J5Lo6 8u2hxdPIg7B70jfoU9okNlp0JwZCoRQwC4U8HtdkKEz3DeUjUod665bMTgMvCNSGKSnu 4+sQ== X-Gm-Message-State: ALoCoQkFiFs9TKRuONZK6WEGEIeBbExlKPr9ceW88y0F/FUH06nc31xCkdU/6hfDSzXk0z4bYjZL 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: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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)