diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2011-07-04 13:16:23 -0400 |
---|---|---|
committer | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2011-07-07 07:23:35 -0400 |
commit | 1b7c4725e2e926eaeb8657ac22992ec27fe03135 (patch) | |
tree | b435e06d240ecccbd9d9cdb64f5a914b87b05b06 | |
parent | d20e1d21fd0c398a8beb170beacf8e2ca839844c (diff) |
MFD: twl6040: Remove wrapper for threaded irq request
Remove the twl6040_request_irq/free_irq inline functions,
and use direct calls instead in the core driver to
register the threaded irq.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r-- | drivers/mfd/twl6040-core.c | 10 | ||||
-rw-r--r-- | include/linux/mfd/twl6040.h | 22 |
2 files changed, 5 insertions, 27 deletions
diff --git a/drivers/mfd/twl6040-core.c b/drivers/mfd/twl6040-core.c index f71bb147d11c..6843977f4e87 100644 --- a/drivers/mfd/twl6040-core.c +++ b/drivers/mfd/twl6040-core.c | |||
@@ -502,9 +502,9 @@ static int __devinit twl6040_probe(struct platform_device *pdev) | |||
502 | if (ret) | 502 | if (ret) |
503 | goto gpio2_err; | 503 | goto gpio2_err; |
504 | 504 | ||
505 | ret = twl6040_request_irq(twl6040, TWL6040_IRQ_READY, | 505 | ret = request_threaded_irq(twl6040->irq_base + TWL6040_IRQ_READY, |
506 | twl6040_naudint_handler, 0, | 506 | NULL, twl6040_naudint_handler, 0, |
507 | "twl6040_irq_ready", twl6040); | 507 | "twl6040_irq_ready", twl6040); |
508 | if (ret) { | 508 | if (ret) { |
509 | dev_err(twl6040->dev, "READY IRQ request failed: %d\n", | 509 | dev_err(twl6040->dev, "READY IRQ request failed: %d\n", |
510 | ret); | 510 | ret); |
@@ -557,7 +557,7 @@ static int __devinit twl6040_probe(struct platform_device *pdev) | |||
557 | return 0; | 557 | return 0; |
558 | 558 | ||
559 | mfd_err: | 559 | mfd_err: |
560 | twl6040_free_irq(twl6040, TWL6040_IRQ_READY, twl6040); | 560 | free_irq(twl6040->irq_base + TWL6040_IRQ_READY, twl6040); |
561 | irq_err: | 561 | irq_err: |
562 | twl6040_irq_exit(twl6040); | 562 | twl6040_irq_exit(twl6040); |
563 | gpio2_err: | 563 | gpio2_err: |
@@ -580,7 +580,7 @@ static int __devexit twl6040_remove(struct platform_device *pdev) | |||
580 | if (gpio_is_valid(twl6040->audpwron)) | 580 | if (gpio_is_valid(twl6040->audpwron)) |
581 | gpio_free(twl6040->audpwron); | 581 | gpio_free(twl6040->audpwron); |
582 | 582 | ||
583 | twl6040_free_irq(twl6040, TWL6040_IRQ_READY, twl6040); | 583 | free_irq(twl6040->irq_base + TWL6040_IRQ_READY, twl6040); |
584 | twl6040_irq_exit(twl6040); | 584 | twl6040_irq_exit(twl6040); |
585 | 585 | ||
586 | mfd_remove_devices(&pdev->dev); | 586 | mfd_remove_devices(&pdev->dev); |
diff --git a/include/linux/mfd/twl6040.h b/include/linux/mfd/twl6040.h index c3c1de53dcfe..df890a247c36 100644 --- a/include/linux/mfd/twl6040.h +++ b/include/linux/mfd/twl6040.h | |||
@@ -215,28 +215,6 @@ struct twl6040 { | |||
215 | u8 irq_masks_cache; | 215 | u8 irq_masks_cache; |
216 | }; | 216 | }; |
217 | 217 | ||
218 | static inline int twl6040_request_irq(struct twl6040 *twl6040, int irq, | ||
219 | irq_handler_t handler, | ||
220 | unsigned long irqflags, | ||
221 | const char *name, | ||
222 | void *data) | ||
223 | { | ||
224 | if (!twl6040->irq_base) | ||
225 | return -EINVAL; | ||
226 | |||
227 | return request_threaded_irq(twl6040->irq_base + irq, NULL, handler, | ||
228 | irqflags, name, data); | ||
229 | } | ||
230 | |||
231 | static inline void twl6040_free_irq(struct twl6040 *twl6040, int irq, | ||
232 | void *data) | ||
233 | { | ||
234 | if (!twl6040->irq_base) | ||
235 | return; | ||
236 | |||
237 | free_irq(twl6040->irq_base + irq, data); | ||
238 | } | ||
239 | |||
240 | int twl6040_reg_read(struct twl6040 *twl6040, unsigned int reg); | 218 | int twl6040_reg_read(struct twl6040 *twl6040, unsigned int reg); |
241 | int twl6040_reg_write(struct twl6040 *twl6040, unsigned int reg, | 219 | int twl6040_reg_write(struct twl6040 *twl6040, unsigned int reg, |
242 | u8 val); | 220 | u8 val); |