Re: [PATCH v2 1/5] Input: Set EV_ABS in dev->evbit even if input_alloc_absinfo() fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Hans,

On Mon, Jan 31, 2022 at 03:35:35PM +0100, Hans de Goede wrote:
> The input core's error handling for input_alloc_absinfo() failures

The original idea was actually to catch cases where ABS axis was set up
without calling input_set_capability() or input_set_abs_info(), but
great idea to also catch allocation failures.

> is based on ignoring the error until input_register_device() runs
> and then checks for the failure like this:
> 
>         if (test_bit(EV_ABS, dev->evbit) && !dev->absinfo) {
>                 dev_err(&dev->dev, ...);
>                 return -EINVAL;
>         }
> 
> This relies on EV_ABS actually getting set in dev->evbit even
> if input_alloc_absinfo() fails, change input_set_abs_params() and
> input_set_capability() to actually adhere to this.
> 
> Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>

Applied, thank you.

-- 
Dmitry



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux