Skip to content

Commit

Permalink
DVB: dvb-usb-remote - fix oops when changing keymap
Browse files Browse the repository at this point in the history
DVB USB remotes do not support changing keycode maps but set
input_dev->keycodesize and input_dev->keycodemax without setting
input_dev->keycode. This causes kernel oops when user tries to
look up (or change) current keymap.

While the proper fix would be to make remotes handle keymap changes
we'll just remove keycodemax and keycodesize initialization so
EVIOCGKEYCODE and EVIOCSKEYCODE will simply return -EINVAL.

http://bugzilla.kernel.org/show_bug.cgi?id=8312

Signed-off-by: olaf.kirch@oracle.com
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Olaf Kirch authored and Linus Torvalds committed Apr 14, 2007
1 parent b1847a0 commit d791d41
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/media/dvb/dvb-usb/dvb-usb-remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ int dvb_usb_remote_init(struct dvb_usb_device *d)
return -ENOMEM;

input_dev->evbit[0] = BIT(EV_KEY);
input_dev->keycodesize = sizeof(unsigned char);
input_dev->keycodemax = KEY_MAX;
input_dev->name = "IR-receiver inside an USB DVB receiver";
input_dev->phys = d->rc_phys;
usb_to_input_id(d->udev, &input_dev->id);
Expand Down

0 comments on commit d791d41

Please sign in to comment.