Re: [PATCH v2] sysrq: supplementing reset sequence with timeout functionality

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

 



On Sat, Mar 16, 2013 at 10:14 AM,  <mathieu.poirier@xxxxxxxxxx> wrote:
> From: "Mathieu J. Poirier" <mathieu.poirier@xxxxxxxxxx>
>
> Some devices have too few buttons, which it makes it hard to have
> a reset combo that won't trigger automatically.  As such a
> timeout functionality that requires the combination to be held for
> a given amount of time before triggering is introduced.
>
> If a key combo is recognized and held for a 'timeout' amount of time,
> the system triggers a reset.

The code seems to only require one of the keys in the combo to be held
for the full 'timeout' amount of time:

...
>                 /* key release */
> -               if (--state->reset_seq_cnt == 0)
> +               if (--state->reset_seq_cnt == 0) {
>                         state->reset_canceled = false;
> +                       del_timer(&state->keyreset_timeout);
> +               }

-- 
Arve Hjønnevåg
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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