From d04d11092bad04308dbf43464777ce324ff0c6d2 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 14 Apr 2007 10:25:53 -0300 Subject: DVB: Fix for bug 8312: oops on dvb-usb-remote when changing keymap From: Olaf Kirch 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. Signed-off-by: olaf.kirch@oracle.com Signed-off-by: Dmitry Torokhov Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'linux/drivers/media') diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c index cccc2512a..9d5f1bc1e 100644 --- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c @@ -121,8 +121,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); -- cgit v1.2.3