diff options
-rw-r--r-- | drivers/gpio/gpio-stmpe.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/gpio/gpio-stmpe.c b/drivers/gpio/gpio-stmpe.c index b33bad1bb4df..2647e243d471 100644 --- a/drivers/gpio/gpio-stmpe.c +++ b/drivers/gpio/gpio-stmpe.c | |||
@@ -254,9 +254,10 @@ static irqreturn_t stmpe_gpio_irq(int irq, void *dev) | |||
254 | while (stat) { | 254 | while (stat) { |
255 | int bit = __ffs(stat); | 255 | int bit = __ffs(stat); |
256 | int line = bank * 8 + bit; | 256 | int line = bank * 8 + bit; |
257 | int virq = irq_find_mapping(stmpe_gpio->domain, line); | 257 | int child_irq = irq_find_mapping(stmpe_gpio->domain, |
258 | line); | ||
258 | 259 | ||
259 | handle_nested_irq(virq); | 260 | handle_nested_irq(child_irq); |
260 | stat &= ~(1 << bit); | 261 | stat &= ~(1 << bit); |
261 | } | 262 | } |
262 | 263 | ||
@@ -271,7 +272,7 @@ static irqreturn_t stmpe_gpio_irq(int irq, void *dev) | |||
271 | return IRQ_HANDLED; | 272 | return IRQ_HANDLED; |
272 | } | 273 | } |
273 | 274 | ||
274 | static int stmpe_gpio_irq_map(struct irq_domain *d, unsigned int virq, | 275 | static int stmpe_gpio_irq_map(struct irq_domain *d, unsigned int irq, |
275 | irq_hw_number_t hwirq) | 276 | irq_hw_number_t hwirq) |
276 | { | 277 | { |
277 | struct stmpe_gpio *stmpe_gpio = d->host_data; | 278 | struct stmpe_gpio *stmpe_gpio = d->host_data; |
@@ -279,26 +280,26 @@ static int stmpe_gpio_irq_map(struct irq_domain *d, unsigned int virq, | |||
279 | if (!stmpe_gpio) | 280 | if (!stmpe_gpio) |
280 | return -EINVAL; | 281 | return -EINVAL; |
281 | 282 | ||
282 | irq_set_chip_data(hwirq, stmpe_gpio); | 283 | irq_set_chip_data(irq, stmpe_gpio); |
283 | irq_set_chip_and_handler(hwirq, &stmpe_gpio_irq_chip, | 284 | irq_set_chip_and_handler(irq, &stmpe_gpio_irq_chip, |
284 | handle_simple_irq); | 285 | handle_simple_irq); |
285 | irq_set_nested_thread(hwirq, 1); | 286 | irq_set_nested_thread(irq, 1); |
286 | #ifdef CONFIG_ARM | 287 | #ifdef CONFIG_ARM |
287 | set_irq_flags(hwirq, IRQF_VALID); | 288 | set_irq_flags(irq, IRQF_VALID); |
288 | #else | 289 | #else |
289 | irq_set_noprobe(hwirq); | 290 | irq_set_noprobe(irq); |
290 | #endif | 291 | #endif |
291 | 292 | ||
292 | return 0; | 293 | return 0; |
293 | } | 294 | } |
294 | 295 | ||
295 | static void stmpe_gpio_irq_unmap(struct irq_domain *d, unsigned int virq) | 296 | static void stmpe_gpio_irq_unmap(struct irq_domain *d, unsigned int irq) |
296 | { | 297 | { |
297 | #ifdef CONFIG_ARM | 298 | #ifdef CONFIG_ARM |
298 | set_irq_flags(virq, 0); | 299 | set_irq_flags(irq, 0); |
299 | #endif | 300 | #endif |
300 | irq_set_chip_and_handler(virq, NULL, NULL); | 301 | irq_set_chip_and_handler(irq, NULL, NULL); |
301 | irq_set_chip_data(virq, NULL); | 302 | irq_set_chip_data(irq, NULL); |
302 | } | 303 | } |
303 | 304 | ||
304 | static const struct irq_domain_ops stmpe_gpio_irq_simple_ops = { | 305 | static const struct irq_domain_ops stmpe_gpio_irq_simple_ops = { |