Skip to content

Commit

Permalink
gpiolib: wm8994: Use irq_domain mappings for gpios
Browse files Browse the repository at this point in the history
This has no practical impact at present since we don't support device tree
so any user must have set an irq_base but this will in future allow a
transition to device tree with minimal invasiveness.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Mark Brown authored and Linus Walleij committed Jul 12, 2012
1 parent f942a7d commit 224a1f9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/gpio/gpio-wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/mfd/core.h>
#include <linux/platform_device.h>
#include <linux/seq_file.h>
#include <linux/regmap.h>

#include <linux/mfd/wm8994/core.h>
#include <linux/mfd/wm8994/pdata.h>
Expand Down Expand Up @@ -109,10 +110,7 @@ static int wm8994_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
struct wm8994_gpio *wm8994_gpio = to_wm8994_gpio(chip);
struct wm8994 *wm8994 = wm8994_gpio->wm8994;

if (!wm8994->irq_base)
return -EINVAL;

return wm8994->irq_base + offset;
return regmap_irq_get_virq(wm8994->irq_data, offset);
}


Expand Down

0 comments on commit 224a1f9

Please sign in to comment.