From patchwork Fri Oct 11 17:18:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 20973 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f70.google.com (mail-qa0-f70.google.com [209.85.216.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 860E725EA1 for ; Fri, 11 Oct 2013 17:18:23 +0000 (UTC) Received: by mail-qa0-f70.google.com with SMTP id i13sf2402984qae.5 for ; Fri, 11 Oct 2013 10:18:23 -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=bUCaglwkhMSNkURzQ7o45pJfr+URquM35Hv4KEurUZ0=; b=kLpVRJpCGHG6LBLwutf3WhkwAlOgLQT/OSpe6NQMY8q5ehqfP/J2VHsxNiAJGlvx28 7aDHkeq2KY2Ri54+oupBId2Z2+dC9356ToPJ0HQm/iE5wdx8Qpj3g4AOtWl5DBUI2SRW z0kD4EAzmHOrgXBenYtejI5MScRP8M78D/HKCcSfe42A7mVsynwBrk+Ci9q6wm9zcpS+ FLIm6TSxQNzMlU2gg+BLtoAfuy8wkeVViwmkat3CCgAx9n5VTPJSomWhubQE9RHnL5Ti PUpAzSA3b7aCUB6a1T5lU0fSi6G/PYTFyvxx6JUGjOBSAo2OAG9bKqOB1nFLAROCMDUy w1wg== X-Received: by 10.236.32.74 with SMTP id n50mr20108022yha.13.1381511902907; Fri, 11 Oct 2013 10:18:22 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.129.8 with SMTP id ns8ls1496772qeb.39.gmail; Fri, 11 Oct 2013 10:18:22 -0700 (PDT) X-Received: by 10.52.169.227 with SMTP id ah3mr1004427vdc.45.1381511902826; Fri, 11 Oct 2013 10:18:22 -0700 (PDT) Received: from mail-vb0-f52.google.com (mail-vb0-f52.google.com [209.85.212.52]) by mx.google.com with ESMTPS id tt2si17047027vcb.2.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Oct 2013 10:18:22 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.52 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.52; Received: by mail-vb0-f52.google.com with SMTP id f12so2966674vbg.39 for ; Fri, 11 Oct 2013 10:18:22 -0700 (PDT) X-Gm-Message-State: ALoCoQmPU9ZTpLzZ2Zupgn5/H5p9ww0Ig1ZMFka+brClxsoGwz1cbzOcQFSjerfkkCBM6kfyHvCt X-Received: by 10.221.51.206 with SMTP id vj14mr22202751vcb.17.1381511902718; Fri, 11 Oct 2013 10:18:22 -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 u4csp56429vcz; Fri, 11 Oct 2013 10:18:22 -0700 (PDT) X-Received: by 10.194.134.97 with SMTP id pj1mr2573865wjb.58.1381511901759; Fri, 11 Oct 2013 10:18:21 -0700 (PDT) Received: from mail-we0-f180.google.com (mail-we0-f180.google.com [74.125.82.180]) by mx.google.com with ESMTPS id w8si1455127wib.85.2013.10.11.10.18.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Oct 2013 10:18:21 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.180 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=74.125.82.180; Received: by mail-we0-f180.google.com with SMTP id q59so4561611wes.11 for ; Fri, 11 Oct 2013 10:18:21 -0700 (PDT) X-Received: by 10.180.210.231 with SMTP id mx7mr4128119wic.5.1381511901215; Fri, 11 Oct 2013 10:18:21 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id mw9sm7971286wib.0.2013.10.11.10.18.19 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Fri, 11 Oct 2013 10:18:20 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Alexandre Courbot , Linus Walleij , Markus Mayer Subject: [PATCH] gpio: bcm_kona: rename confusing variables Date: Fri, 11 Oct 2013 19:18:15 +0200 Message-Id: <1381511895-6401-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.212.52 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. Rename the "gpio" variable to "hwirq" to reflect what it is. Rename one instance of "virq" to "child_irq" that better describes what it is. Cc: Markus Mayer Signed-off-by: Linus Walleij --- drivers/gpio/gpio-bcm-kona.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c index ff5c98e..58188ba 100644 --- a/drivers/gpio/gpio-bcm-kona.c +++ b/drivers/gpio/gpio-bcm-kona.c @@ -428,9 +428,10 @@ static void bcm_kona_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) while ((sta = readl(reg_base + GPIO_INT_STATUS(bank_id)) & (~(readl(reg_base + GPIO_INT_MASK(bank_id)))))) { for_each_set_bit(bit, &sta, 32) { - int gpio = GPIO_PER_BANK * bank_id + bit; - int virq = irq_find_mapping(bank->kona_gpio->irq_domain, - gpio); + int hwirq = GPIO_PER_BANK * bank_id + bit; + int child_irq = + irq_find_mapping(bank->kona_gpio->irq_domain, + hwirq); /* * Clear interrupt before handler is called so we don't * miss any interrupt occurred during executing them. @@ -438,7 +439,7 @@ static void bcm_kona_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) writel(readl(reg_base + GPIO_INT_STATUS(bank_id)) | BIT(bit), reg_base + GPIO_INT_STATUS(bank_id)); /* Invoke interrupt handler */ - generic_handle_irq(virq); + generic_handle_irq(child_irq); } } @@ -487,10 +488,10 @@ static int bcm_kona_gpio_irq_map(struct irq_domain *d, unsigned int irq, return 0; } -static void bcm_kona_gpio_irq_unmap(struct irq_domain *d, unsigned int virq) +static void bcm_kona_gpio_irq_unmap(struct irq_domain *d, unsigned int irq) { - irq_set_chip_and_handler(virq, NULL, NULL); - irq_set_chip_data(virq, NULL); + irq_set_chip_and_handler(irq, NULL, NULL); + irq_set_chip_data(irq, NULL); } static struct irq_domain_ops bcm_kona_irq_ops = {