From patchwork Wed Feb 12 12:59:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 24543 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f198.google.com (mail-ie0-f198.google.com [209.85.223.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C411920143 for ; Wed, 12 Feb 2014 12:59:47 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id ar20sf31096161iec.5 for ; Wed, 12 Feb 2014 04:59:47 -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: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=r6eH/BoseeuCv28tPo88Y5SueGzsFPkQeANkARwCgpM=; b=BiZUbf0c2/8uVULGdYXrbvumrdCg53OfwWh8L3B/037vcrL6oViVjLS+qNeUr8XyhO AIoUN6oZl16xXEiO0MlyRnncmfN6zjeZXrcd19hMoESRjyGwIFeTK28GHHj4ROOk96H7 Cn5+AUKPYU0kQCQ5dhpLStvw4kjcFxi4TZLI0PG6E86b1IxjJiXdlUuT6CbXkZF3lhBA s8LQBRgWUWKYolfq7ARo3SMiKCZu+53Q6Bec1x/PQrMHxGCTWNi2cPgkHCtoK/BUCflg 0V5W5pZQEV+SUOJuVH/C9gu2xM5o9VoljFlK78GoD2ZHmao8z0q8AZMNsZz7eWUHzrmP BFSA== X-Gm-Message-State: ALoCoQnkbZP2VGa+vAcnupRES4iPwa4NtxcXEOgIUyrdAIVzSip8X+kRy2NavkBXBPprfOwLGkDd X-Received: by 10.50.33.47 with SMTP id o15mr1591489igi.0.1392209986995; Wed, 12 Feb 2014 04:59:46 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.27.239 with SMTP id 102ls2883856qgx.23.gmail; Wed, 12 Feb 2014 04:59:46 -0800 (PST) X-Received: by 10.52.248.138 with SMTP id ym10mr27805141vdc.18.1392209986851; Wed, 12 Feb 2014 04:59:46 -0800 (PST) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id ja16si7272176vec.12.2014.02.12.04.59.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Feb 2014 04:59:46 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id ld13so6871509vcb.4 for ; Wed, 12 Feb 2014 04:59:46 -0800 (PST) X-Received: by 10.52.227.193 with SMTP id sc1mr27127024vdc.1.1392209986773; Wed, 12 Feb 2014 04:59:46 -0800 (PST) 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 u4csp34443vcz; Wed, 12 Feb 2014 04:59:46 -0800 (PST) X-Received: by 10.180.149.206 with SMTP id uc14mr1824265wib.44.1392209984987; Wed, 12 Feb 2014 04:59:44 -0800 (PST) Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by mx.google.com with ESMTPS id hi2si11198699wjc.149.2014.02.12.04.59.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Feb 2014 04:59:44 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.175 is neither permitted nor denied by best guess record for domain of ulf.hansson@linaro.org) client-ip=209.85.212.175; Received: by mail-wi0-f175.google.com with SMTP id hm4so6878710wib.8 for ; Wed, 12 Feb 2014 04:59:44 -0800 (PST) X-Received: by 10.194.82.105 with SMTP id h9mr728043wjy.52.1392209984160; Wed, 12 Feb 2014 04:59:44 -0800 (PST) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id ea4sm5531838wib.7.2014.02.12.04.59.42 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Feb 2014 04:59:43 -0800 (PST) From: Ulf Hansson To: linux-arm-kernel@lists.infradead.org, Linus Walleij Cc: Ulf Hansson Subject: [PATCH 2/2] pinctrl: nomadik: Convert to modern pm_ops Date: Wed, 12 Feb 2014 13:59:39 +0100 Message-Id: <1392209979-31636-2-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1392209979-31636-1-git-send-email-ulf.hansson@linaro.org> References: <1392209979-31636-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.220.173 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 the SIMPLE_DEV_PM_OPS macro and convert to the modern pm ops. Signed-off-by: Ulf Hansson --- drivers/pinctrl/pinctrl-nomadik.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c index b6c5793..cec7762 100644 --- a/drivers/pinctrl/pinctrl-nomadik.c +++ b/drivers/pinctrl/pinctrl-nomadik.c @@ -2036,22 +2036,22 @@ static const struct of_device_id nmk_pinctrl_match[] = { }; #ifdef CONFIG_PM_SLEEP -static int nmk_pinctrl_suspend(struct platform_device *pdev, pm_message_t state) +static int nmk_pinctrl_suspend(struct device *dev) { struct nmk_pinctrl *npct; - npct = platform_get_drvdata(pdev); + npct = dev_get_drvdata(dev); if (!npct) return -EINVAL; return pinctrl_force_sleep(npct->pctl); } -static int nmk_pinctrl_resume(struct platform_device *pdev) +static int nmk_pinctrl_resume(struct device *dev) { struct nmk_pinctrl *npct; - npct = platform_get_drvdata(pdev); + npct = dev_get_drvdata(dev); if (!npct) return -EINVAL; @@ -2146,17 +2146,18 @@ static struct platform_driver nmk_gpio_driver = { .probe = nmk_gpio_probe, }; +static SIMPLE_DEV_PM_OPS(nmk_pinctrl_pm_ops, + nmk_pinctrl_suspend, + nmk_pinctrl_resume); + static struct platform_driver nmk_pinctrl_driver = { .driver = { .owner = THIS_MODULE, .name = "pinctrl-nomadik", .of_match_table = nmk_pinctrl_match, + .pm = &nmk_pinctrl_pm_ops, }, .probe = nmk_pinctrl_probe, -#ifdef CONFIG_PM_SLEEP - .suspend = nmk_pinctrl_suspend, - .resume = nmk_pinctrl_resume, -#endif }; static int __init nmk_gpio_init(void)