提交 e7cd0aeb 编写于 作者: M Mark Brown 提交者: Dmitry Torokhov

Input: wm831x-ts - convert to devm_input_allocate_device()

Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 7488b1b9
...@@ -247,7 +247,7 @@ static int wm831x_ts_probe(struct platform_device *pdev) ...@@ -247,7 +247,7 @@ static int wm831x_ts_probe(struct platform_device *pdev)
wm831x_ts = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ts), wm831x_ts = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ts),
GFP_KERNEL); GFP_KERNEL);
input_dev = input_allocate_device(); input_dev = devm_input_allocate_device(&pdev->dev);
if (!wm831x_ts || !input_dev) { if (!wm831x_ts || !input_dev) {
error = -ENOMEM; error = -ENOMEM;
goto err_alloc; goto err_alloc;
...@@ -376,7 +376,6 @@ static int wm831x_ts_probe(struct platform_device *pdev) ...@@ -376,7 +376,6 @@ static int wm831x_ts_probe(struct platform_device *pdev)
err_data_irq: err_data_irq:
free_irq(wm831x_ts->data_irq, wm831x_ts); free_irq(wm831x_ts->data_irq, wm831x_ts);
err_alloc: err_alloc:
input_free_device(input_dev);
return error; return error;
} }
...@@ -387,7 +386,6 @@ static int wm831x_ts_remove(struct platform_device *pdev) ...@@ -387,7 +386,6 @@ static int wm831x_ts_remove(struct platform_device *pdev)
free_irq(wm831x_ts->pd_irq, wm831x_ts); free_irq(wm831x_ts->pd_irq, wm831x_ts);
free_irq(wm831x_ts->data_irq, wm831x_ts); free_irq(wm831x_ts->data_irq, wm831x_ts);
input_unregister_device(wm831x_ts->input_dev);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册