diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2013-10-11 13:14:50 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-10-16 03:59:17 -0400 |
commit | d933cc619e36c2288730fd8a8bdbb16a35dade07 (patch) | |
tree | ac2c69761cafdf31d24e62cdc3a48abeb1e1756e /drivers/gpio/gpio-bcm-kona.c | |
parent | 472f95b93860ef8ba562c6231ab8f6ff9d352a0e (diff) |
gpio: bcm_kona: rename confusing variables
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 <markus.mayer@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-bcm-kona.c')
-rw-r--r-- | drivers/gpio/gpio-bcm-kona.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c index ff5c98e8a075..58188bafba43 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) | |||
428 | while ((sta = readl(reg_base + GPIO_INT_STATUS(bank_id)) & | 428 | while ((sta = readl(reg_base + GPIO_INT_STATUS(bank_id)) & |
429 | (~(readl(reg_base + GPIO_INT_MASK(bank_id)))))) { | 429 | (~(readl(reg_base + GPIO_INT_MASK(bank_id)))))) { |
430 | for_each_set_bit(bit, &sta, 32) { | 430 | for_each_set_bit(bit, &sta, 32) { |
431 | int gpio = GPIO_PER_BANK * bank_id + bit; | 431 | int hwirq = GPIO_PER_BANK * bank_id + bit; |
432 | int virq = irq_find_mapping(bank->kona_gpio->irq_domain, | 432 | int child_irq = |
433 | gpio); | 433 | irq_find_mapping(bank->kona_gpio->irq_domain, |
434 | hwirq); | ||
434 | /* | 435 | /* |
435 | * Clear interrupt before handler is called so we don't | 436 | * Clear interrupt before handler is called so we don't |
436 | * miss any interrupt occurred during executing them. | 437 | * 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) | |||
438 | writel(readl(reg_base + GPIO_INT_STATUS(bank_id)) | | 439 | writel(readl(reg_base + GPIO_INT_STATUS(bank_id)) | |
439 | BIT(bit), reg_base + GPIO_INT_STATUS(bank_id)); | 440 | BIT(bit), reg_base + GPIO_INT_STATUS(bank_id)); |
440 | /* Invoke interrupt handler */ | 441 | /* Invoke interrupt handler */ |
441 | generic_handle_irq(virq); | 442 | generic_handle_irq(child_irq); |
442 | } | 443 | } |
443 | } | 444 | } |
444 | 445 | ||
@@ -487,10 +488,10 @@ static int bcm_kona_gpio_irq_map(struct irq_domain *d, unsigned int irq, | |||
487 | return 0; | 488 | return 0; |
488 | } | 489 | } |
489 | 490 | ||
490 | static void bcm_kona_gpio_irq_unmap(struct irq_domain *d, unsigned int virq) | 491 | static void bcm_kona_gpio_irq_unmap(struct irq_domain *d, unsigned int irq) |
491 | { | 492 | { |
492 | irq_set_chip_and_handler(virq, NULL, NULL); | 493 | irq_set_chip_and_handler(irq, NULL, NULL); |
493 | irq_set_chip_data(virq, NULL); | 494 | irq_set_chip_data(irq, NULL); |
494 | } | 495 | } |
495 | 496 | ||
496 | static struct irq_domain_ops bcm_kona_irq_ops = { | 497 | static struct irq_domain_ops bcm_kona_irq_ops = { |