aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/touchscreen/wm831x-ts.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/input/touchscreen/wm831x-ts.c b/drivers/input/touchscreen/wm831x-ts.c
index f88fab56178c..6be2eb6a153a 100644
--- a/drivers/input/touchscreen/wm831x-ts.c
+++ b/drivers/input/touchscreen/wm831x-ts.c
@@ -247,7 +247,7 @@ static int wm831x_ts_probe(struct platform_device *pdev)
247 247
248 wm831x_ts = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ts), 248 wm831x_ts = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ts),
249 GFP_KERNEL); 249 GFP_KERNEL);
250 input_dev = input_allocate_device(); 250 input_dev = devm_input_allocate_device(&pdev->dev);
251 if (!wm831x_ts || !input_dev) { 251 if (!wm831x_ts || !input_dev) {
252 error = -ENOMEM; 252 error = -ENOMEM;
253 goto err_alloc; 253 goto err_alloc;
@@ -376,7 +376,6 @@ err_pd_irq:
376err_data_irq: 376err_data_irq:
377 free_irq(wm831x_ts->data_irq, wm831x_ts); 377 free_irq(wm831x_ts->data_irq, wm831x_ts);
378err_alloc: 378err_alloc:
379 input_free_device(input_dev);
380 379
381 return error; 380 return error;
382} 381}
@@ -387,7 +386,6 @@ static int wm831x_ts_remove(struct platform_device *pdev)
387 386
388 free_irq(wm831x_ts->pd_irq, wm831x_ts); 387 free_irq(wm831x_ts->pd_irq, wm831x_ts);
389 free_irq(wm831x_ts->data_irq, wm831x_ts); 388 free_irq(wm831x_ts->data_irq, wm831x_ts);
390 input_unregister_device(wm831x_ts->input_dev);
391 389
392 return 0; 390 return 0;
393} 391}