From patchwork Fri Jan 11 20:46:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 14004 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 704E523E2A for ; Fri, 11 Jan 2013 20:46:37 +0000 (UTC) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by fiordland.canonical.com (Postfix) with ESMTP id 090DEA194FF for ; Fri, 11 Jan 2013 20:46:36 +0000 (UTC) Received: by mail-vc0-f181.google.com with SMTP id gb30so1833107vcb.40 for ; Fri, 11 Jan 2013 12:46:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :mime-version:content-type:x-gm-message-state; bh=l/QzSe+ikWmDd4yC6TugcJT/SzCWZHhapy7qjJgcUKU=; b=T2e5HBmpMxjU6lioOTefc2idHrfUwlLZ7BzogNUNpBDjVu5UiW/740BdCR4IcdXdmq i2qZ9RNr3wBUZHu+W4swsLhPDj1ceBMZ94C00edfe6SJk75ImEwMT0XIDfWl2w8HWUA9 6pPwQTlOhYPYLJSrxQwp2RzRs5lVpMPXL6Fr7vZg36nn3Mu4Twt4SStVx0eq++9gZH5M 4+flEnjEoKUXk872YzD5TOwbuA24LlMQ+kIctsBNX5EhHhHR7Tmby23hqJvuQg3qKa1c coEsmbIl+jKyloTYK+Mgs2Nj07eb6ySSv2KTYCPDhdVrn638NQ+vYo4LgS3WffR0ZVBu fP6w== X-Received: by 10.58.247.132 with SMTP id ye4mr98785723vec.9.1357937196394; Fri, 11 Jan 2013 12:46:36 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp131224veb; Fri, 11 Jan 2013 12:46:35 -0800 (PST) X-Received: by 10.14.194.4 with SMTP id l4mr204359780een.42.1357937195223; Fri, 11 Jan 2013 12:46:35 -0800 (PST) Received: from eu1sys200aog119.obsmtp.com (eu1sys200aog119.obsmtp.com [207.126.144.147]) by mx.google.com with SMTP id q6si15277794eep.24.2013.01.11.12.46.24 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 11 Jan 2013 12:46:34 -0800 (PST) Received-SPF: neutral (google.com: 207.126.144.147 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.147; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.147 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-us.st.com ([167.4.1.35]) (using TLSv1) by eu1sys200aob119.postini.com ([207.126.147.11]) with SMTP ID DSNKUPB6H6TS7T3rT3GaZzEprEXPxqnRzpRB@postini.com; Fri, 11 Jan 2013 20:46:34 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.16.71]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id 292F53B; Fri, 11 Jan 2013 20:45:37 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id 52C5457; Fri, 11 Jan 2013 15:12:47 +0000 (GMT) Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id A581D24C07D; Fri, 11 Jan 2013 21:46:08 +0100 (CET) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.3.83.0; Fri, 11 Jan 2013 21:46:17 +0100 From: Linus Walleij To: , Cc: Stephen Warren , Anmar Oueja , Linus Walleij , Laurent Pinchart Subject: [PATCH] pinctrl: do not defer device tree hogs Date: Fri, 11 Jan 2013 21:46:13 +0100 Message-ID: <1357937173-4634-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.11.3 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQmTM6MG5FQYq5W9VN1khbHl44HaDa4AoYgSp6F19CJ7esbQa1GEOM84mqOB2hMqm5ErB9BD From: Linus Walleij commit af1024e0f7cde9023ddd0f3116db03911d5914c0 "pinctrl: skip deferral of hogs" Attempts to avoid probe deferral on hogged pins, but we forgot the device tree case. This patch fixes this. Cc: Laurent Pinchart Reported-by: Stephen Warren Signed-off-by: Linus Walleij --- drivers/pinctrl/devicetree.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c index fe2d1af..fd40a11 100644 --- a/drivers/pinctrl/devicetree.c +++ b/drivers/pinctrl/devicetree.c @@ -141,6 +141,11 @@ static int dt_to_map_one_config(struct pinctrl *p, const char *statename, pctldev = find_pinctrl_by_of_node(np_pctldev); if (pctldev) break; + /* Do not defer probing of hogs (circular loop) */ + if (np_pctldev == p->dev->of_node) { + of_node_put(np_pctldev); + return -ENODEV; + } } of_node_put(np_pctldev);