From patchwork Fri Oct 11 17:36:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 20980 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f70.google.com (mail-pa0-f70.google.com [209.85.220.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B1FFB25EA1 for ; Fri, 11 Oct 2013 17:36:08 +0000 (UTC) Received: by mail-pa0-f70.google.com with SMTP id fb1sf8824510pad.9 for ; Fri, 11 Oct 2013 10:36:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=VpJCfqxDvffOV2OmCbk92VAQX62A3OpfOjvp70N+l+I=; b=QlwerSeUe0iM6cQ874OsyvoVakxl2ct5PEt/kxibxoiNYAaJYYyHzEnlyGH7QY/43q IXitWj1Nfna1BUB6wQbv0EMyrBuNu2S4GysTlVgcxrA25X66Z8Qx4QfcWtqltop0vlBF BjG0tSd1R1xBN+Au7avX4cY7O6qsDMj6auF0NZhmzmba0/a259wr4gOJkQgSM9Xzkhl/ /pDahNXrd9/X997zU1bDxV3wsCmrhCo0QMgdSwfQvFdoRgB+x86EpuRD59AapkYCk4F0 wlIUK6lTFl5kXTQ7bwFUSV9iNSgA1E7LxL7dKhYYo46vML4irR9z8ZRjVYH9GksCjdE0 9cAA== X-Received: by 10.66.144.41 with SMTP id sj9mr7858580pab.23.1381512967997; Fri, 11 Oct 2013 10:36:07 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.109.226 with SMTP id hv2ls1569629qeb.22.gmail; Fri, 11 Oct 2013 10:36:07 -0700 (PDT) X-Received: by 10.52.166.200 with SMTP id zi8mr1743889vdb.38.1381512967838; Fri, 11 Oct 2013 10:36:07 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id gq10si17041794vdc.108.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Oct 2013 10:36:07 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id ia6so2024246vcb.6 for ; Fri, 11 Oct 2013 10:36:07 -0700 (PDT) X-Gm-Message-State: ALoCoQnuVEVcugDP5AuVmqVJGm8j+3r+ALoBi7I5w4wmRoTeGqeJn50JOth7M5eBFVA0y258KBK0 X-Received: by 10.52.163.165 with SMTP id yj5mr1070624vdb.42.1381512967753; Fri, 11 Oct 2013 10:36:07 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp57596vcz; Fri, 11 Oct 2013 10:36:07 -0700 (PDT) X-Received: by 10.180.185.145 with SMTP id fc17mr2373848wic.60.1381512966621; Fri, 11 Oct 2013 10:36:06 -0700 (PDT) Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) by mx.google.com with ESMTPS id dn5si21153061wjb.119.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Oct 2013 10:36:06 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.47 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=74.125.82.47; Received: by mail-wg0-f47.google.com with SMTP id f12so4487271wgh.26 for ; Fri, 11 Oct 2013 10:36:06 -0700 (PDT) X-Received: by 10.180.104.34 with SMTP id gb2mr4197108wib.3.1381512966101; Fri, 11 Oct 2013 10:36:06 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id b7sm7639929wiz.8.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 11 Oct 2013 10:36:05 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Alexandre Courbot , Linus Walleij , Mathias Nyman , Mika Westerberg Subject: [PATCH v2] gpio: lynxpoint: drop references to "virtual" IRQ Date: Fri, 11 Oct 2013 19:36:00 +0200 Message-Id: <1381512960-7356-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.3.1 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Rename the argument "virq" to just "irq", this IRQ isn't any more "virtual" than any other Linux IRQ number, we use "hwirq" for the actual hw-numbers, "virq" is just bogus. Take this opportunity to sink a variable into a loop. Cc: Mathias Nyman Cc: Mika Westerberg Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Actually fix all occurences. --- drivers/gpio/gpio-lynxpoint.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/gpio/gpio-lynxpoint.c b/drivers/gpio/gpio-lynxpoint.c index 2d9ca60..21603e6 100644 --- a/drivers/gpio/gpio-lynxpoint.c +++ b/drivers/gpio/gpio-lynxpoint.c @@ -242,26 +242,27 @@ static int lp_gpio_to_irq(struct gpio_chip *chip, unsigned offset) return irq_create_mapping(lg->domain, offset); } -static void lp_gpio_irq_handler(unsigned irq, struct irq_desc *desc) +static void lp_gpio_irq_handler(unsigned hwirq, struct irq_desc *desc) { struct irq_data *data = irq_desc_get_irq_data(desc); struct lp_gpio *lg = irq_data_get_irq_handler_data(data); struct irq_chip *chip = irq_data_get_irq_chip(data); u32 base, pin, mask; unsigned long reg, pending; - unsigned virq; /* check from GPIO controller which pin triggered the interrupt */ for (base = 0; base < lg->chip.ngpio; base += 32) { reg = lp_gpio_reg(&lg->chip, base, LP_INT_STAT); while ((pending = inl(reg))) { + unsigned irq; + pin = __ffs(pending); mask = BIT(pin); /* Clear before handling so we don't lose an edge */ outl(mask, reg); - virq = irq_find_mapping(lg->domain, base + pin); - generic_handle_irq(virq); + irq = irq_find_mapping(lg->domain, base + pin); + generic_handle_irq(irq); } } chip->irq_eoi(data); @@ -324,15 +325,15 @@ static void lp_gpio_irq_init_hw(struct lp_gpio *lg) } } -static int lp_gpio_irq_map(struct irq_domain *d, unsigned int virq, - irq_hw_number_t hw) +static int lp_gpio_irq_map(struct irq_domain *d, unsigned int irq, + irq_hw_number_t hwirq) { struct lp_gpio *lg = d->host_data; - irq_set_chip_and_handler_name(virq, &lp_irqchip, handle_simple_irq, + irq_set_chip_and_handler_name(irq, &lp_irqchip, handle_simple_irq, "demux"); - irq_set_chip_data(virq, lg); - irq_set_irq_type(virq, IRQ_TYPE_NONE); + irq_set_chip_data(irq, lg); + irq_set_irq_type(irq, IRQ_TYPE_NONE); return 0; }