From patchwork Tue Oct 22 14:07:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 21211 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C15CE244B2 for ; Tue, 22 Oct 2013 14:07:40 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id gq1sf12825943obb.6 for ; Tue, 22 Oct 2013 07:07:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=JjjLgYq6aGcCgk4AsnQ9NFdJCVPIlvIGdykSwuyz/bM=; b=F4j+0zKWXCMt2sSdka+knYUItwvdjsm4dYzJa8fjIDedjMf7dIiWWn4bosK7QNShVg J9JofuxKyWEFKXuQZ/mMB2T8VV4lct4RVCD9Q1KrxTcavhW3nrZXWlwlfE6V+iHsqulg ohenokd17eVX9EIMLGRuPreD6kFsVE0bj9Z9UeInuGNY2RK9X3b5xKnrPQE4xB+8cvT+ 0GLN8qlTGk+8aD7cl5W/PL3AV0jegq6YgJxQ4zUuCJSWtRdvI+e7qe7zkX2ZpjQBBAv6 aNGuJ/B975vNmssES4fchCAcQW6D+DGwjTkl5fTYgcgcywFUi35qjEaH5KpDWRRmt7+l OuSA== X-Received: by 10.182.53.165 with SMTP id c5mr8606410obp.0.1382450860404; Tue, 22 Oct 2013 07:07:40 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.107.69 with SMTP id ha5ls99405qeb.87.gmail; Tue, 22 Oct 2013 07:07:40 -0700 (PDT) X-Received: by 10.52.230.202 with SMTP id ta10mr72221vdc.41.1382450860273; Tue, 22 Oct 2013 07:07:40 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id ks3si2703600vec.127.2013.10.22.07.07.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Oct 2013 07:07:40 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id jz11so5287760veb.35 for ; Tue, 22 Oct 2013 07:07:40 -0700 (PDT) X-Gm-Message-State: ALoCoQkUlNS3HSWrIkmhH+0ZxeUyoe/wLxFC4h1ljCwYIi4e9MflhZPHE9XYjsyRG7PZTCXpsvkr X-Received: by 10.52.157.232 with SMTP id wp8mr12819842vdb.4.1382450860196; Tue, 22 Oct 2013 07:07:40 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp233647vcz; Tue, 22 Oct 2013 07:07:39 -0700 (PDT) X-Received: by 10.152.37.130 with SMTP id y2mr16007710laj.24.1382450859033; Tue, 22 Oct 2013 07:07:39 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com [209.85.215.48]) by mx.google.com with ESMTPS id oz4si9512409lbb.76.2013.10.22.07.07.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Oct 2013 07:07:38 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.215.48 is neither permitted nor denied by best guess record for domain of ulf.hansson@linaro.org) client-ip=209.85.215.48; Received: by mail-la0-f48.google.com with SMTP id ev20so1002402lab.21 for ; Tue, 22 Oct 2013 07:07:38 -0700 (PDT) X-Received: by 10.152.29.103 with SMTP id j7mr17764051lah.7.1382450858403; Tue, 22 Oct 2013 07:07:38 -0700 (PDT) Received: from linaro-ulf.lan (90-231-160-185-no158.tbcn.telia.com. [90.231.160.185]) by mx.google.com with ESMTPSA id ur6sm15932916lbc.5.2013.10.22.07.07.36 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Oct 2013 07:07:37 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Chris Ball Cc: Ulf Hansson , Guennadi Liakhovetski Subject: [PATCH v2 2/7] mmc: sh_mmcif: Convert to PM macros when defining dev_pm_ops Date: Tue, 22 Oct 2013 16:07:21 +0200 Message-Id: <1382450846-17144-3-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1382450846-17144-1-git-send-email-ulf.hansson@linaro.org> References: <1382450846-17144-1-git-send-email-ulf.hansson@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ulf.hansson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Use SET_SYSTEM_SLEEP_PM_OPS to simplify code. Cc: Guennadi Liakhovetski Signed-off-by: Ulf Hansson --- drivers/mmc/host/sh_mmcif.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index 6bffebe..32bc412 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c @@ -1538,7 +1538,7 @@ static int sh_mmcif_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static int sh_mmcif_suspend(struct device *dev) { struct sh_mmcif_host *host = dev_get_drvdata(dev); @@ -1552,10 +1552,7 @@ static int sh_mmcif_resume(struct device *dev) { return 0; } -#else -#define sh_mmcif_suspend NULL -#define sh_mmcif_resume NULL -#endif /* CONFIG_PM */ +#endif static const struct of_device_id mmcif_of_match[] = { { .compatible = "renesas,sh-mmcif" }, @@ -1564,8 +1561,7 @@ static const struct of_device_id mmcif_of_match[] = { MODULE_DEVICE_TABLE(of, mmcif_of_match); static const struct dev_pm_ops sh_mmcif_dev_pm_ops = { - .suspend = sh_mmcif_suspend, - .resume = sh_mmcif_resume, + SET_SYSTEM_SLEEP_PM_OPS(sh_mmcif_suspend, sh_mmcif_resume) }; static struct platform_driver sh_mmcif_driver = {