Re: [PATCH v2] platform/x86: peaq-wmi: switch to using polled mode of input devices

From: Andy Shevchenko
Date: Tue Oct 01 2019 - 15:14:08 EST


On Tue, Oct 1, 2019 at 9:58 PM Dmitry Torokhov
<dmitry.torokhov@xxxxxxxxx> wrote:
>
> We have added polled mode to the normal input devices with the intent of
> retiring input_polled_dev. This converts peaq-wmi driver to use the
> polling mode of standard input devices and removes dependency on
> INPUT_POLLDEV.
>
> Because the new polling coded does not allow peeking inside the poller
> structure to get the poll interval, we change the "debounce" process to
> operate on the time basis, instead of counting events.
>
> We also fix error handling during initialization, as previously we leaked
> input device structure when we failed to register it.

> if (obj.type != ACPI_TYPE_INTEGER) {
> - dev_err(&peaq_poll_dev->input->dev,
> + dev_err(&input_dev->dev,
> "Error WMBC did not return an integer\n");

It seems it can be one line now.

> return;
> }

--
With Best Regards,
Andy Shevchenko