From patchwork Fri Oct 11 17:34:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 20979 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f71.google.com (mail-qe0-f71.google.com [209.85.128.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BED0825EA1 for ; Fri, 11 Oct 2013 17:34:30 +0000 (UTC) Received: by mail-qe0-f71.google.com with SMTP id 1sf2939051qec.6 for ; Fri, 11 Oct 2013 10:34:30 -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=S61U17hhEhPPhaV+8IDQJ/USIDYUKlZjThZnRSTdhVo=; b=k1oEEOI4NKyugvpRpewwtTF+lt1csACtwWBe3sAEJgfIBZG4sT3vZTp6smoni3ueCn UU6Xo+igy/4RFce+mDnkXV38tTmIg/stBq9w96I+OeF8WvSV23QB+UIexjlFG7gJYEzn hnkQcywDdhHcMZqqrnZtghgVpjBZWjCF06M6MnF7k7KfAOHo5CpJZXuV6sOel+GG1MAW euTs2pKGFdnCBIAXIoBVjhXClQfNpMOctMfAFpJQ4xS2tKJ1TZDxDcgIcQnOSMTsUYtb LxFOu+5rw0gZeNpQoHltkUCWZxASQAIqiRMamNWdZeOGIMgQRmtmchEHOmsmE/rWTsvu sHBA== X-Received: by 10.224.125.72 with SMTP id x8mr25660168qar.5.1381512870296; Fri, 11 Oct 2013 10:34:30 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.24.144 with SMTP id u16ls1504164qef.84.gmail; Fri, 11 Oct 2013 10:34:30 -0700 (PDT) X-Received: by 10.52.228.137 with SMTP id si9mr18196551vdc.29.1381512870190; Fri, 11 Oct 2013 10:34:30 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id lu1si17060046vcb.88.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Oct 2013 10:34:30 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.177 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.177; Received: by mail-vc0-f177.google.com with SMTP id hv10so2976504vcb.8 for ; Fri, 11 Oct 2013 10:34:30 -0700 (PDT) X-Gm-Message-State: ALoCoQldDF91Y95SDI1J9XkNm13fOw0YIVISJf3ZXPWZJeNzRaHhtLwQ2YF+1MtdEB5SWzC3bb3t X-Received: by 10.221.53.74 with SMTP id vp10mr517vcb.54.1381512870109; Fri, 11 Oct 2013 10:34:30 -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 u4csp57449vcz; Fri, 11 Oct 2013 10:34:29 -0700 (PDT) X-Received: by 10.194.48.74 with SMTP id j10mr18372441wjn.41.1381512869169; Fri, 11 Oct 2013 10:34:29 -0700 (PDT) Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com [74.125.82.49]) by mx.google.com with ESMTPS id ea7si1487981wib.43.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Oct 2013 10:34:29 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.49 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=74.125.82.49; Received: by mail-wg0-f49.google.com with SMTP id x12so2212837wgg.16 for ; Fri, 11 Oct 2013 10:34:28 -0700 (PDT) X-Received: by 10.180.126.101 with SMTP id mx5mr3503647wib.63.1381512868258; Fri, 11 Oct 2013 10:34:28 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id ev4sm7622890wib.7.2013.10.11.10.34.26 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Fri, 11 Oct 2013 10:34:27 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Alexandre Courbot , Linus Walleij , Mathias Nyman , Mika Westerberg Subject: [PATCH] gpio: lynxpoint: drop references to "virtual" IRQ Date: Fri, 11 Oct 2013 19:34:20 +0200 Message-Id: <1381512860-7129-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.177 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 --- drivers/gpio/gpio-lynxpoint.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/gpio-lynxpoint.c b/drivers/gpio/gpio-lynxpoint.c index 2d9ca60..8e5d7ce 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);