diff options
| -rw-r--r-- | drivers/mfd/wm8994-irq.c | 6 | ||||
| -rw-r--r-- | include/linux/mfd/wm8994/core.h | 12 |
2 files changed, 6 insertions, 12 deletions
diff --git a/drivers/mfd/wm8994-irq.c b/drivers/mfd/wm8994-irq.c index 46b20c445ecf..f1837f669755 100644 --- a/drivers/mfd/wm8994-irq.c +++ b/drivers/mfd/wm8994-irq.c | |||
| @@ -147,12 +147,6 @@ int wm8994_irq_init(struct wm8994 *wm8994) | |||
| 147 | return 0; | 147 | return 0; |
| 148 | } | 148 | } |
| 149 | 149 | ||
| 150 | if (!wm8994->irq_base) { | ||
| 151 | dev_err(wm8994->dev, | ||
| 152 | "No interrupt base specified, no interrupts\n"); | ||
| 153 | return 0; | ||
| 154 | } | ||
| 155 | |||
| 156 | ret = regmap_add_irq_chip(wm8994->regmap, wm8994->irq, | 150 | ret = regmap_add_irq_chip(wm8994->regmap, wm8994->irq, |
| 157 | IRQF_TRIGGER_HIGH | IRQF_ONESHOT, | 151 | IRQF_TRIGGER_HIGH | IRQF_ONESHOT, |
| 158 | wm8994->irq_base, &wm8994_irq_chip, | 152 | wm8994->irq_base, &wm8994_irq_chip, |
diff --git a/include/linux/mfd/wm8994/core.h b/include/linux/mfd/wm8994/core.h index 9eff2a351ec5..6695c3ec4518 100644 --- a/include/linux/mfd/wm8994/core.h +++ b/include/linux/mfd/wm8994/core.h | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | 17 | ||
| 18 | #include <linux/mutex.h> | 18 | #include <linux/mutex.h> |
| 19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
| 20 | #include <linux/regmap.h> | ||
| 20 | 21 | ||
| 21 | enum wm8994_type { | 22 | enum wm8994_type { |
| 22 | WM8994 = 0, | 23 | WM8994 = 0, |
| @@ -26,7 +27,6 @@ enum wm8994_type { | |||
| 26 | 27 | ||
| 27 | struct regulator_dev; | 28 | struct regulator_dev; |
| 28 | struct regulator_bulk_data; | 29 | struct regulator_bulk_data; |
| 29 | struct regmap; | ||
| 30 | 30 | ||
| 31 | #define WM8994_NUM_GPIO_REGS 11 | 31 | #define WM8994_NUM_GPIO_REGS 11 |
| 32 | #define WM8994_NUM_LDO_REGS 2 | 32 | #define WM8994_NUM_LDO_REGS 2 |
| @@ -94,17 +94,17 @@ static inline int wm8994_request_irq(struct wm8994 *wm8994, int irq, | |||
| 94 | irq_handler_t handler, const char *name, | 94 | irq_handler_t handler, const char *name, |
| 95 | void *data) | 95 | void *data) |
| 96 | { | 96 | { |
| 97 | if (!wm8994->irq_base) | 97 | if (!wm8994->irq_data) |
| 98 | return -EINVAL; | 98 | return -EINVAL; |
| 99 | return request_threaded_irq(wm8994->irq_base + irq, NULL, handler, | 99 | return request_threaded_irq(regmap_irq_get_virq(wm8994->irq_data, irq), |
| 100 | IRQF_TRIGGER_RISING, name, | 100 | NULL, handler, IRQF_TRIGGER_RISING, name, |
| 101 | data); | 101 | data); |
| 102 | } | 102 | } |
| 103 | static inline void wm8994_free_irq(struct wm8994 *wm8994, int irq, void *data) | 103 | static inline void wm8994_free_irq(struct wm8994 *wm8994, int irq, void *data) |
| 104 | { | 104 | { |
| 105 | if (!wm8994->irq_base) | 105 | if (!wm8994->irq_data) |
| 106 | return; | 106 | return; |
| 107 | free_irq(wm8994->irq_base + irq, data); | 107 | free_irq(regmap_irq_get_virq(wm8994->irq_data, irq), data); |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | int wm8994_irq_init(struct wm8994 *wm8994); | 110 | int wm8994_irq_init(struct wm8994 *wm8994); |
