aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-24 12:45:22 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-12-24 12:52:29 -0500
commit5d3caa442e0858fa07b9a6a68d05e1ba2cf246a4 (patch)
tree19e2bd5344ce67fc349f7b6b4882403361785448 /drivers/input/misc
parente7cd0aeb323441228ebbffb0c5a78ea1132663fd (diff)
Input: wm831x-on - convert to devm_input_allocate_device()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/misc')
-rw-r--r--drivers/input/misc/wm831x-on.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/input/misc/wm831x-on.c b/drivers/input/misc/wm831x-on.c
index 558767d8ebf4..caa2c4068f09 100644
--- a/drivers/input/misc/wm831x-on.c
+++ b/drivers/input/misc/wm831x-on.c
@@ -86,7 +86,7 @@ static int wm831x_on_probe(struct platform_device *pdev)
86 wm831x_on->wm831x = wm831x; 86 wm831x_on->wm831x = wm831x;
87 INIT_DELAYED_WORK(&wm831x_on->work, wm831x_poll_on); 87 INIT_DELAYED_WORK(&wm831x_on->work, wm831x_poll_on);
88 88
89 wm831x_on->dev = input_allocate_device(); 89 wm831x_on->dev = devm_input_allocate_device(&pdev->dev);
90 if (!wm831x_on->dev) { 90 if (!wm831x_on->dev) {
91 dev_err(&pdev->dev, "Can't allocate input dev\n"); 91 dev_err(&pdev->dev, "Can't allocate input dev\n");
92 ret = -ENOMEM; 92 ret = -ENOMEM;
@@ -119,7 +119,6 @@ static int wm831x_on_probe(struct platform_device *pdev)
119err_irq: 119err_irq:
120 free_irq(irq, wm831x_on); 120 free_irq(irq, wm831x_on);
121err_input_dev: 121err_input_dev:
122 input_free_device(wm831x_on->dev);
123err: 122err:
124 return ret; 123 return ret;
125} 124}
@@ -131,7 +130,6 @@ static int wm831x_on_remove(struct platform_device *pdev)
131 130
132 free_irq(irq, wm831x_on); 131 free_irq(irq, wm831x_on);
133 cancel_delayed_work_sync(&wm831x_on->work); 132 cancel_delayed_work_sync(&wm831x_on->work);
134 input_unregister_device(wm831x_on->dev);
135 133
136 return 0; 134 return 0;
137} 135}