From patchwork Fri Mar 1 12:01:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 15193 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 1FD1323E24 for ; Fri, 1 Mar 2013 12:02:12 +0000 (UTC) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by fiordland.canonical.com (Postfix) with ESMTP id A1225A18E69 for ; Fri, 1 Mar 2013 12:02:11 +0000 (UTC) Received: by mail-vc0-f172.google.com with SMTP id l6so1901730vcl.17 for ; Fri, 01 Mar 2013 04:02:11 -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=whmtPKopoFuQJKagkmERpLa5C8uYI7/imGub5+JHAL4=; b=dsAtbNnvwoZ/5nRqAzQHrgdWbh6PM0OKfGKTqEYqe8eudmUeOnrqxWabk3dQa4zLVn skXTCOKmTWN11je0t6KMFn6yHT2600UkNZy+BAZOAG1WgqeUwOkYJz/ruq0brDQTcjlA UC0ACmtFWmViS/YmWG4XE7l+9/g8fnK0fBCPcbnkxnFmRbn33YwTFZCFw6c2MsgQ1rce JCr1VOWSTE4EYPiH2XE/TOEtyj9pC8Ns7Kp7gjaDorKPke1o30mVPyH4P/JtXxTuaekk WUk9tjGDqebl8KF7cBaF6Msx7A/4S/MEUN37dpwWkuo3xoh7xN6jVBeomfv6y8/s3bMH nhCA== X-Received: by 10.220.242.73 with SMTP id lh9mr3833671vcb.49.1362139331096; Fri, 01 Mar 2013 04:02:11 -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 st5csp27956veb; Fri, 1 Mar 2013 04:02:10 -0800 (PST) X-Received: by 10.14.204.195 with SMTP id h43mr18187302eeo.14.1362139329925; Fri, 01 Mar 2013 04:02:09 -0800 (PST) Received: from eu1sys200aog119.obsmtp.com (eu1sys200aog119.obsmtp.com [207.126.144.147]) by mx.google.com with SMTP id w41si18084223eel.205.2013.03.01.04.02.05 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 01 Mar 2013 04:02:09 -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 DSNKUTCYvGkLoCiyi5FA3RMs4lWiDCkSqiMu@postini.com; Fri, 01 Mar 2013 12:02:09 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 1E20E92; Fri, 1 Mar 2013 12:01:01 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id C762755; Fri, 1 Mar 2013 05:50:36 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id B96CBA8072; Fri, 1 Mar 2013 13:01:45 +0100 (CET) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.83.0; Fri, 1 Mar 2013 13:01:50 +0100 From: Linus Walleij To: Grant Likely , Cc: Anmar Oueja , Gabriel Fernandez , , Linus Walleij Subject: [PATCH] gpio: stmpe: pass DT node to irqdomain Date: Fri, 1 Mar 2013 13:01:42 +0100 Message-ID: <1362139302-23048-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: ALoCoQl3Pehxs1nnhKxCyU4is5bNnkyUBn1JT23hWPQr62Pf8rmFmstc13Uwbenl+lP9o/vmwnTr From: Gabriel Fernandez The irq domain was implemented but the device tree node was not transmitted to irq_domain_add_simple(). Cc: stable@vger.kernel.org Signed-off-by: Gabriel Fernandez Signed-off-by: Linus Walleij --- drivers/gpio/gpio-stmpe.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-stmpe.c b/drivers/gpio/gpio-stmpe.c index 770476a..73b691c 100644 --- a/drivers/gpio/gpio-stmpe.c +++ b/drivers/gpio/gpio-stmpe.c @@ -309,9 +309,11 @@ static const struct irq_domain_ops stmpe_gpio_irq_simple_ops = { static int stmpe_gpio_irq_init(struct stmpe_gpio *stmpe_gpio) { - int base = stmpe_gpio->irq_base; + int base = 0; + if (!stmpe_gpio->chip.of_node) + base = stmpe_gpio->irq_base; - stmpe_gpio->domain = irq_domain_add_simple(NULL, + stmpe_gpio->domain = irq_domain_add_simple(stmpe_gpio->chip.of_node, stmpe_gpio->chip.ngpio, base, &stmpe_gpio_irq_simple_ops, stmpe_gpio); if (!stmpe_gpio->domain) { @@ -346,6 +348,7 @@ static int stmpe_gpio_probe(struct platform_device *pdev) stmpe_gpio->chip = template_chip; stmpe_gpio->chip.ngpio = stmpe->num_gpios; stmpe_gpio->chip.dev = &pdev->dev; + stmpe_gpio->chip.of_node = np; stmpe_gpio->chip.base = pdata ? pdata->gpio_base : -1; if (pdata)