aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-03-11 02:41:33 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-03-11 03:02:53 -0500
commitafadb8e08c48d08b75f3caf8404742b13e6b3624 (patch)
tree90217a3d58c3d871a96674e2ca45e47852d7d8fd /drivers/input/misc
parentfdba2bb1f2eed85085a0fe154e1acb82de3239f7 (diff)
Input: wm831x-on - convert to use genirq
Now that the WM831x core has been converted to use genirq for the interrupt controller there is no need for the client drivers to use a WM831x-specific API rather than just calling genirq directly. Also fixes a leak of the IRQ during init failure - the error path free_irq() was using NULL rather than the driver data as the data pointer so free_irq() wouldn't have matched. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/misc')
-rw-r--r--drivers/input/misc/wm831x-on.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/input/misc/wm831x-on.c b/drivers/input/misc/wm831x-on.c
index ba4f5dd7c60e..1e54bce72db5 100644
--- a/drivers/input/misc/wm831x-on.c
+++ b/drivers/input/misc/wm831x-on.c
@@ -97,8 +97,9 @@ static int __devinit wm831x_on_probe(struct platform_device *pdev)
97 wm831x_on->dev->phys = "wm831x_on/input0"; 97 wm831x_on->dev->phys = "wm831x_on/input0";
98 wm831x_on->dev->dev.parent = &pdev->dev; 98 wm831x_on->dev->dev.parent = &pdev->dev;
99 99
100 ret = wm831x_request_irq(wm831x, irq, wm831x_on_irq, 100 ret = request_threaded_irq(irq, NULL, wm831x_on_irq,
101 IRQF_TRIGGER_RISING, "wm831x_on", wm831x_on); 101 IRQF_TRIGGER_RISING, "wm831x_on",
102 wm831x_on);
102 if (ret < 0) { 103 if (ret < 0) {
103 dev_err(&pdev->dev, "Unable to request IRQ: %d\n", ret); 104 dev_err(&pdev->dev, "Unable to request IRQ: %d\n", ret);
104 goto err_input_dev; 105 goto err_input_dev;
@@ -114,7 +115,7 @@ static int __devinit wm831x_on_probe(struct platform_device *pdev)
114 return 0; 115 return 0;
115 116
116err_irq: 117err_irq:
117 wm831x_free_irq(wm831x, irq, NULL); 118 free_irq(irq, wm831x_on);
118err_input_dev: 119err_input_dev:
119 input_free_device(wm831x_on->dev); 120 input_free_device(wm831x_on->dev);
120err: 121err:
@@ -127,7 +128,7 @@ static int __devexit wm831x_on_remove(struct platform_device *pdev)
127 struct wm831x_on *wm831x_on = platform_get_drvdata(pdev); 128 struct wm831x_on *wm831x_on = platform_get_drvdata(pdev);
128 int irq = platform_get_irq(pdev, 0); 129 int irq = platform_get_irq(pdev, 0);
129 130
130 wm831x_free_irq(wm831x_on->wm831x, irq, wm831x_on); 131 free_irq(irq, wm831x_on);
131 cancel_delayed_work_sync(&wm831x_on->work); 132 cancel_delayed_work_sync(&wm831x_on->work);
132 input_unregister_device(wm831x_on->dev); 133 input_unregister_device(wm831x_on->dev);
133 kfree(wm831x_on); 134 kfree(wm831x_on);