From patchwork Tue Jan 28 00:39:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Hesselbarth X-Patchwork-Id: 3544451 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 643679F2E9 for ; Tue, 28 Jan 2014 00:42:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8331C200F2 for ; Tue, 28 Jan 2014 00:42:21 +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 82C8A200E9 for ; Tue, 28 Jan 2014 00:42:20 +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 1W7wjt-0000M4-3v; Tue, 28 Jan 2014 00:41: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 1W7wje-0006GF-3B; Tue, 28 Jan 2014 00:41:02 +0000 Received: from mail-ee0-x232.google.com ([2a00:1450:4013:c00::232]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W7wik-00069D-Oy for linux-arm-kernel@lists.infradead.org; Tue, 28 Jan 2014 00:40:09 +0000 Received: by mail-ee0-f50.google.com with SMTP id d17so2557044eek.23 for ; Mon, 27 Jan 2014 16:39:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qhmhRIhKDMRcvgfT33uBQ1Lam118ZcJgsP9C5BwY/cQ=; b=y/QOJMb66mhsVCdajtLEXX6F6u72/95tFw+I5dkRYtYomscv/9PxzyIMJpnLioXFxY wL90avjVUXeu2fBmnqFXhzb0MaUSAsAO57zp8BJPPoD2Fy+ZNRdqNOHEtvOEOboGqysm Q4C8atgTLvbAaVqjmxGqyHvphbPMXXyMdxOk7fGxwerVf5SBnqRw7wh0j1ci0WdH5nsE hNEnCT0bkHFdNPKeEtsUQ49+vMyxVrEAtQnSuEnfrIgZtSjgcvutnStdnGGkoNsY0FNL jc36y8Gb6m5B5M8AA4USfjWVYJ1PjsL2pa0cE0itKhtNBZNgjX99c36Sp47OiMYpiGC+ 9UCw== X-Received: by 10.14.220.193 with SMTP id o41mr6174104eep.22.1390869584713; Mon, 27 Jan 2014 16:39:44 -0800 (PST) Received: from topkick.lan (dslc-082-083-251-183.pools.arcor-ip.net. [82.83.251.183]) by mx.google.com with ESMTPSA id v7sm48801856eel.2.2014.01.27.16.39.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Jan 2014 16:39:43 -0800 (PST) From: Sebastian Hesselbarth To: Sebastian Hesselbarth Subject: [PATCH v2 08/21] pinctrl: mvebu: remove checks for mpp_get/set Date: Tue, 28 Jan 2014 01:39:20 +0100 Message-Id: <1390869573-27624-9-git-send-email-sebastian.hesselbarth@gmail.com> In-Reply-To: <1390869573-27624-1-git-send-email-sebastian.hesselbarth@gmail.com> References: <1390674856-4993-1-git-send-email-sebastian.hesselbarth@gmail.com> <1390869573-27624-1-git-send-email-sebastian.hesselbarth@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140127_194006_957817_24D90A50 X-CRM114-Status: GOOD ( 10.94 ) X-Spam-Score: -2.0 (--) Cc: Thomas Petazzoni , Andrew Lunn , Jason Cooper , Linus Walleij , linux-kernel@vger.kernel.org, Gregory Clement , linux-arm-kernel@lists.infradead.org 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.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Now, that name generation has been moved, we can identify generic mpp ranges by NULL name. To allow further redesign, remove checks for SoC specific callbacks mpp_get/set and use NULL name instead. Signed-off-by: Sebastian Hesselbarth --- Cc: Jason Cooper Cc: Andrew Lunn Cc: Gregory Clement Cc: Thomas Petazzoni Cc: Linus Walleij Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- drivers/pinctrl/mvebu/pinctrl-mvebu.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.c b/drivers/pinctrl/mvebu/pinctrl-mvebu.c index 375666b0abc3..2bec4ef30b48 100644 --- a/drivers/pinctrl/mvebu/pinctrl-mvebu.c +++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.c @@ -637,18 +637,11 @@ int mvebu_pinctrl_probe(struct platform_device *pdev, void __iomem *base) for (k = 0; k < ctrl->npins; k++) ctrl->pins[k] = ctrl->pid + k; - /* special soc specific control */ - if (ctrl->mpp_get || ctrl->mpp_set) { - if (!ctrl->name || !ctrl->mpp_get || !ctrl->mpp_set) { - dev_err(&pdev->dev, "wrong soc control info\n"); - return -EINVAL; - } + /* generic mvebu register groups have no name passed */ + if (!ctrl->name) + pctl->num_groups += ctrl->npins; + else pctl->num_groups += 1; - continue; - } - - /* generic mvebu register control */ - pctl->num_groups += ctrl->npins; } pdesc = devm_kzalloc(&pdev->dev, pctl->desc.npins *