Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1646115
| From | Bram Vlerick <vlerickb@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] input: move gpio mouse to managed api |
| Date | 2017-05-20 15:20 +0200 |
| Message-ID | <tJcsy-1Xo-33@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Signed-off-by: Bram Vlerick <vlerickb@gmail.com>
---
drivers/input/mouse/gpio_mouse.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/input/mouse/gpio_mouse.c b/drivers/input/mouse/gpio_mouse.c
index ced07391304b..2fc8ddaf0175 100644
--- a/drivers/input/mouse/gpio_mouse.c
+++ b/drivers/input/mouse/gpio_mouse.c
@@ -93,7 +93,7 @@ static int gpio_mouse_probe(struct platform_device *pdev)
}
}
- input_poll = input_allocate_polled_device();
+ input_poll = devm_input_allocate_polled_device(&pdev->dev);
if (!input_poll) {
dev_err(&pdev->dev, "not enough memory for input device\n");
error = -ENOMEM;
@@ -124,7 +124,7 @@ static int gpio_mouse_probe(struct platform_device *pdev)
error = input_register_polled_device(input_poll);
if (error) {
dev_err(&pdev->dev, "could not register input device\n");
- goto out_free_polldev;
+ goto out_free_gpios;
}
dev_dbg(&pdev->dev, "%d ms scan time, buttons: %s%s%s\n",
@@ -135,9 +135,6 @@ static int gpio_mouse_probe(struct platform_device *pdev)
return 0;
- out_free_polldev:
- input_free_polled_device(input_poll);
-
out_free_gpios:
while (--i >= 0) {
pin = pdata->pins[i];
@@ -155,7 +152,6 @@ static int gpio_mouse_remove(struct platform_device *pdev)
int pin, i;
input_unregister_polled_device(input);
- input_free_polled_device(input);
for (i = 0; i < GPIO_MOUSE_PIN_MAX; i++) {
pin = pdata->pins[i];
--
2.12.2
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] input: move gpio mouse to managed api Bram Vlerick <vlerickb@gmail.com> - 2017-05-20 15:20 +0200 Re: [PATCH] input: move gpio mouse to managed api Bram Vlerick <vlerickb@gmail.com> - 2017-05-21 09:40 +0200
csiph-web