From patchwork Thu Nov 14 18:51:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 3184571 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 3FDE79F3A0 for ; Thu, 14 Nov 2013 18:52:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 422F12091B for ; Thu, 14 Nov 2013 18:52:05 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 14BB420918 for ; Thu, 14 Nov 2013 18:52:04 +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 1Vh21I-00018s-5D; Thu, 14 Nov 2013 18:52:00 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vh21F-0000yX-Nz; Thu, 14 Nov 2013 18:51:57 +0000 Received: from mail-la0-f45.google.com ([209.85.215.45]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vh21C-0000wo-84 for linux-arm-kernel@lists.infradead.org; Thu, 14 Nov 2013 18:51:55 +0000 Received: by mail-la0-f45.google.com with SMTP id eh20so1935293lab.4 for ; Thu, 14 Nov 2013 10:51:29 -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; bh=Gc4IkN8lYnpBZfwCU30QPL2+eD5M4QhhI4sMJlPVP1U=; b=Vj2qaiM0B9WyYH5cwgcJVTVO4bJ468+FlWdtFpYYJ5kMeWxzzvr8l3uStvhJCZD0Cv IiAhedCUSNd1za1qOOYF9UFZcLmCUqEIrO6/LEG1jVFEglN4CXmMDJ4w0AIYvpMzBqmv Kr9NUlqnUsR6EX++UmTnCbSXPOsnMFO88dm1QeRBR98g4LycSzUwiWwVclWWjuGny9Fs zYGZhQsCV1vh4ZRMsOcWhyA+8JAsGZ+J67dFpT1eVfjoUARWCMlnCsIsjnn7N5m8V16g Jb8mbOK3maizl9lZOArhaXrd+wdTqGWsW42RtCGERYfRorx433sH4iV5lCvsK9PL+O/P ck6w== X-Gm-Message-State: ALoCoQmkFT8/jXtDkfNNyXz8opQJRNR60MF7/UBtp9fZxACTAM3ZqPVo1PNnix4hcukJaNQ0iPnt X-Received: by 10.152.225.129 with SMTP id rk1mr579630lac.74.1384455088940; Thu, 14 Nov 2013 10:51:28 -0800 (PST) Received: from localhost.localdomain (c83-254-159-13.bredband.comhem.se. [83.254.159.13]) by mx.google.com with ESMTPSA id xf2sm23386327lbb.4.2013.11.14.10.51.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Nov 2013 10:51:27 -0800 (PST) From: Linus Walleij To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] pinctrl: nomadik: always display IRQ in debugfs Date: Thu, 14 Nov 2013 19:51:18 +0100 Message-Id: <1384455078-21233-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.3.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131114_135154_448424_7029E5AB X-CRM114-Status: GOOD ( 11.28 ) X-Spam-Score: -2.6 (--) Cc: Linus Walleij , Stephen Warren 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.2 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 As we now grab IRQs also without first reserving the GPIO line, let's print the mapped IRQ unconditionally in the debugfs file as well. Signed-off-by: Linus Walleij --- drivers/pinctrl/pinctrl-nomadik.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c index 7111c3b59130..cea951f5fa49 100644 --- a/drivers/pinctrl/pinctrl-nomadik.c +++ b/drivers/pinctrl/pinctrl-nomadik.c @@ -846,14 +846,14 @@ static void nmk_gpio_dbg_show_one(struct seq_file *s, (mode < 0) ? "unknown" : modes[mode], pull ? "pull" : "none"); - if (label && !is_out) { - int irq = gpio_to_irq(gpio); + if (!is_out) { + int irq = gpio_to_irq(gpio); struct irq_desc *desc = irq_to_desc(irq); /* This races with request_irq(), set_irq_type(), * and set_irq_wake() ... but those are "rare". */ - if (irq >= 0 && desc->action) { + if (irq > 0 && desc && desc->action) { char *trigger; u32 bitmask = nmk_gpio_get_bitmask(gpio);