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: 3637961 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 81763BF13A for ; Wed, 12 Feb 2014 13:00:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 95B702018E for ; Wed, 12 Feb 2014 13:00:23 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7CB7220145 for ; Wed, 12 Feb 2014 13:00:22 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WDZQH-0007VQ-QI; Wed, 12 Feb 2014 13:00:17 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WDZQF-00024z-8t; Wed, 12 Feb 2014 13:00:15 +0000 Received: from mail-we0-f172.google.com ([74.125.82.172]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WDZQB-0001z4-GX for linux-arm-kernel@lists.infradead.org; Wed, 12 Feb 2014 13:00:12 +0000 Received: by mail-we0-f172.google.com with SMTP id p61so5985996wes.17 for ; Wed, 12 Feb 2014 04:59:45 -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:in-reply-to :references; bh=r6eH/BoseeuCv28tPo88Y5SueGzsFPkQeANkARwCgpM=; b=GYUi5NOZ3cCKiGaOe8QzK6rL8Vue/7gdVFoLRzSTfyoNSZT623/voGZfzqL+4vhlqu v5qaWnb/LJLYljdGxzpFY+p7RRNALAZ5X2bx3dLr3aTVst0HgSVYCUgcmzo5fQdTjw4o atuFG4cEtt/lRdQSTkT5I2+hR+nBwr0ODl8oT1qNMbKravmZuch7TFQGAp63C2oep3Xp kfTaBL5CAPKFoOE4v0Y+qaqWoMzGrOb7604wEZ52B5EuvORVtc1HAPqprTkjorxQbKcQ NZpKObgbZDhnlcLZO36Go6fzyMEQrL81UgutP5wgCTr5um4WUfBXD6vO7LajF+eDcYrz uIGw== X-Gm-Message-State: ALoCoQnZ99iFI4MClKGzik+Rzn1XwH4LL93ANe/JsuvPpxyn30jUkcoysD+CtJ3/AH08VGO/z94m 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 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140212_080011_690260_469915A6 X-CRM114-Status: GOOD ( 12.32 ) X-Spam-Score: -2.6 (--) Cc: Ulf Hansson X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 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)