aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/evdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/evdev.c')
-rw-r--r--drivers/input/evdev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index a4696cd0978c..9f2352bd8348 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -565,6 +565,7 @@ static long evdev_ioctl_compat(struct file *file, unsigned int cmd, unsigned lon
565 case EV_LED: bits = dev->ledbit; max = LED_MAX; break; 565 case EV_LED: bits = dev->ledbit; max = LED_MAX; break;
566 case EV_SND: bits = dev->sndbit; max = SND_MAX; break; 566 case EV_SND: bits = dev->sndbit; max = SND_MAX; break;
567 case EV_FF: bits = dev->ffbit; max = FF_MAX; break; 567 case EV_FF: bits = dev->ffbit; max = FF_MAX; break;
568 case EV_SW: bits = dev->swbit; max = SW_MAX; break;
568 default: return -EINVAL; 569 default: return -EINVAL;
569 } 570 }
570 bit_to_user(bits, max); 571 bit_to_user(bits, max);
@@ -579,6 +580,9 @@ static long evdev_ioctl_compat(struct file *file, unsigned int cmd, unsigned lon
579 if (_IOC_NR(cmd) == _IOC_NR(EVIOCGSND(0))) 580 if (_IOC_NR(cmd) == _IOC_NR(EVIOCGSND(0)))
580 bit_to_user(dev->snd, SND_MAX); 581 bit_to_user(dev->snd, SND_MAX);
581 582
583 if (_IOC_NR(cmd) == _IOC_NR(EVIOCGSW(0)))
584 bit_to_user(dev->sw, SW_MAX);
585
582 if (_IOC_NR(cmd) == _IOC_NR(EVIOCGNAME(0))) { 586 if (_IOC_NR(cmd) == _IOC_NR(EVIOCGNAME(0))) {
583 int len; 587 int len;
584 if (!dev->name) return -ENOENT; 588 if (!dev->name) return -ENOENT;