]> err.no Git - linux-2.6/blobdiff - drivers/input/evdev.c
Merge branch 'master'
[linux-2.6] / drivers / input / evdev.c
index a4696cd0978ca68c436ad37ceaa66252b4464b68..9f2352bd8348efa34047125a4f72c181dd5d9f93 100644 (file)
@@ -565,6 +565,7 @@ static long evdev_ioctl_compat(struct file *file, unsigned int cmd, unsigned lon
                                                case EV_LED: bits = dev->ledbit; max = LED_MAX; break;
                                                case EV_SND: bits = dev->sndbit; max = SND_MAX; break;
                                                case EV_FF:  bits = dev->ffbit;  max = FF_MAX;  break;
+                                               case EV_SW:  bits = dev->swbit;  max = SW_MAX;  break;
                                                default: return -EINVAL;
                                        }
                                        bit_to_user(bits, max);
@@ -579,6 +580,9 @@ static long evdev_ioctl_compat(struct file *file, unsigned int cmd, unsigned lon
                                if (_IOC_NR(cmd) == _IOC_NR(EVIOCGSND(0)))
                                        bit_to_user(dev->snd, SND_MAX);
 
+                               if (_IOC_NR(cmd) == _IOC_NR(EVIOCGSW(0)))
+                                       bit_to_user(dev->sw, SW_MAX);
+
                                if (_IOC_NR(cmd) == _IOC_NR(EVIOCGNAME(0))) {
                                        int len;
                                        if (!dev->name) return -ENOENT;