lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

160-uinput_defs.patch (575B)


      1 --- a/drv_G15.c
      2 +++ b/drv_G15.c
      3 @@ -42,6 +42,7 @@
      4  
      5  #include <usb.h>
      6  #include <fcntl.h>
      7 +#include <linux/version.h>
      8  #include <linux/input.h>
      9  #include <linux/uinput.h>
     10  
     11 @@ -269,8 +270,13 @@ void drv_G15_initKeyHandling(char *devic
     12      }
     13      memset(&device, 0, sizeof(device));
     14      strncpy(device.name, "G15 Keys", UINPUT_MAX_NAME_SIZE);
     15 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
     16      device.id.bustype = BUS_USB;
     17      device.id.version = 4;
     18 +#else
     19 +    device.idbus = BUS_USB;
     20 +    device.idversion = 4;
     21 +#endif
     22  
     23      ioctl(uinput_fd, UI_SET_EVBIT, EV_KEY);
     24