diff options
Diffstat (limited to 'drivers/input/misc/wm831x-on.c')
-rw-r--r-- | drivers/input/misc/wm831x-on.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/input/misc/wm831x-on.c b/drivers/input/misc/wm831x-on.c index ba4f5dd7c60e..c3d7ba5f5b47 100644 --- a/drivers/input/misc/wm831x-on.c +++ b/drivers/input/misc/wm831x-on.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
23 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
24 | #include <linux/input.h> | 25 | #include <linux/input.h> |
@@ -97,8 +98,9 @@ static int __devinit wm831x_on_probe(struct platform_device *pdev) | |||
97 | wm831x_on->dev->phys = "wm831x_on/input0"; | 98 | wm831x_on->dev->phys = "wm831x_on/input0"; |
98 | wm831x_on->dev->dev.parent = &pdev->dev; | 99 | wm831x_on->dev->dev.parent = &pdev->dev; |
99 | 100 | ||
100 | ret = wm831x_request_irq(wm831x, irq, wm831x_on_irq, | 101 | ret = request_threaded_irq(irq, NULL, wm831x_on_irq, |
101 | IRQF_TRIGGER_RISING, "wm831x_on", wm831x_on); | 102 | IRQF_TRIGGER_RISING, "wm831x_on", |
103 | wm831x_on); | ||
102 | if (ret < 0) { | 104 | if (ret < 0) { |
103 | dev_err(&pdev->dev, "Unable to request IRQ: %d\n", ret); | 105 | dev_err(&pdev->dev, "Unable to request IRQ: %d\n", ret); |
104 | goto err_input_dev; | 106 | goto err_input_dev; |
@@ -114,7 +116,7 @@ static int __devinit wm831x_on_probe(struct platform_device *pdev) | |||
114 | return 0; | 116 | return 0; |
115 | 117 | ||
116 | err_irq: | 118 | err_irq: |
117 | wm831x_free_irq(wm831x, irq, NULL); | 119 | free_irq(irq, wm831x_on); |
118 | err_input_dev: | 120 | err_input_dev: |
119 | input_free_device(wm831x_on->dev); | 121 | input_free_device(wm831x_on->dev); |
120 | err: | 122 | err: |
@@ -127,7 +129,7 @@ static int __devexit wm831x_on_remove(struct platform_device *pdev) | |||
127 | struct wm831x_on *wm831x_on = platform_get_drvdata(pdev); | 129 | struct wm831x_on *wm831x_on = platform_get_drvdata(pdev); |
128 | int irq = platform_get_irq(pdev, 0); | 130 | int irq = platform_get_irq(pdev, 0); |
129 | 131 | ||
130 | wm831x_free_irq(wm831x_on->wm831x, irq, wm831x_on); | 132 | free_irq(irq, wm831x_on); |
131 | cancel_delayed_work_sync(&wm831x_on->work); | 133 | cancel_delayed_work_sync(&wm831x_on->work); |
132 | input_unregister_device(wm831x_on->dev); | 134 | input_unregister_device(wm831x_on->dev); |
133 | kfree(wm831x_on); | 135 | kfree(wm831x_on); |