Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions drivers/media/rc/imon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1406,6 +1406,17 @@ static void imon_pad_to_keys(struct imon_context *ictx, unsigned char *buf)
buf[3] = (dir >> 8) & 0xFF;
scancode = be32_to_cpu(*((u32 *)buf));
} else {
/*
* For users without stabilized, just ignore any value getting
* to close to the diagonal.
*/
if ((abs(rel_y) < 2 && abs(rel_x) < 2) ||
abs(abs(rel_y) - abs(rel_x)) < 2 ) {
spin_lock_irqsave(&ictx->kc_lock, flags);
ictx->kc = KEY_UNKNOWN;
spin_unlock_irqrestore(&ictx->kc_lock, flags);
return;
}
/*
* Hack alert: instead of using keycodes, we have
* to use hard-coded scancodes here...
Expand Down