From patchwork Tue Mar 26 15:12:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kim Kukjin X-Patchwork-Id: 2391871 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id 525563FD8C for ; Thu, 4 Apr 2013 10:49:51 +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 1UNhjq-0006FA-HS for patchwork-linux-arm@patchwork.kernel.org; Thu, 04 Apr 2013 10:49:50 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UNhir-0008Js-Ei; Thu, 04 Apr 2013 10:48:49 +0000 Received: from mail-pb0-f43.google.com ([209.85.160.43]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UNhhi-0007IH-7v for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2013 10:47:39 +0000 Received: by mail-pb0-f43.google.com with SMTP id md4so1380530pbc.16 for ; Thu, 04 Apr 2013 03:47:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=Lo3OWNCXmS+LP9Q4I1sPQy48N4N6rDNeVIUPTpaoe2k=; b=u9N17m2JCF/JMBuc++kRlTXsqquB5PsKyXNm0O/orLlSR7l7hkL3QpegF9tWNVXvmf 2Uo6xQIE7AEX60sfpSlxKzX+2DUONRZS/jPuJtpVCzHtH01bSEy9AKEzrwO1IXyZJZKW pjwuYA8M9WdHxtKKbRrUyoz7q738NGzhcUNnmO7hnGuigSOq1T17brTbWIygYKxBI9j3 p/h7fLILN10yISVvNJNyJ7mRzprB/Od5cNMxV8+154o5DzxrcBemREObKRL7hPhEWHpk ezhjidvvW91HMTouBn0bCU61PcDyS/7eY/g6ka75IQusTZ6GQHAiQSvRAMm5Rdd4LI0g HJOQ== X-Received: by 10.66.19.201 with SMTP id h9mr8572738pae.188.1365072032177; Thu, 04 Apr 2013 03:40:32 -0700 (PDT) Received: from localhost.localdomain ([121.136.168.198]) by mx.google.com with ESMTPS id ef3sm10937823pad.20.2013.04.04.03.40.29 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 04 Apr 2013 03:40:31 -0700 (PDT) From: Kukjin Kim To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] pinctrl: exynos5440: fix probe failure due to missing pin-list in config nodes Date: Wed, 27 Mar 2013 00:12:32 +0900 Message-Id: <1364310754-3692-2-git-send-email-kgene.kim@samsung.com> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1364310754-3692-1-git-send-email-kgene.kim@samsung.com> References: <1364310754-3692-1-git-send-email-kgene.kim@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130404_064738_455951_7AC37CC9 X-CRM114-Status: GOOD ( 12.97 ) X-Spam-Score: 1.6 (+) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (1.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.43 listed in list.dnswl.org] 0.8 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [121.136.168.198 listed in dnsbl.sorbs.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (kgene.kim[at]gmail.com) 3.4 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Kukjin Kim , Linus Walleij , Thomas Abraham 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 From: Thomas Abraham The property 'samsung,exynos5440-pins' is optional in configuration nodes which are included in the Exynos5440 pin-controller device node. Fix the incorrect failure in driver probe if 'samsung,exynos5440-pins' property is not found in the configuration nodes. Signed-off-by: Thomas Abraham Cc: Linus Walleij Signed-off-by: Kukjin Kim --- drivers/pinctrl/pinctrl-exynos5440.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/pinctrl-exynos5440.c b/drivers/pinctrl/pinctrl-exynos5440.c index 1376eb7..96cb1e9 100644 --- a/drivers/pinctrl/pinctrl-exynos5440.c +++ b/drivers/pinctrl/pinctrl-exynos5440.c @@ -670,8 +670,10 @@ static int exynos5440_pinctrl_parse_dt(struct platform_device *pdev, ret = exynos5440_pinctrl_parse_dt_pins(pdev, cfg_np, &pin_list, &npins); - if (ret) - return ret; + if (ret) { + gname = NULL; + goto skip_to_pin_function; + } /* derive pin group name from the node name */ gname = devm_kzalloc(dev, strlen(cfg_np->name) + GSUFFIX_LEN, @@ -687,6 +689,7 @@ static int exynos5440_pinctrl_parse_dt(struct platform_device *pdev, grp->num_pins = npins; grp++; +skip_to_pin_function: ret = of_property_read_u32(cfg_np, "samsung,exynos5440-pin-function", &function); if (ret) @@ -709,7 +712,7 @@ static int exynos5440_pinctrl_parse_dt(struct platform_device *pdev, return -ENOMEM; } func->groups[0] = gname; - func->num_groups = 1; + func->num_groups = gname ? 1 : 0; func->function = function; func++; func_idx++;