compat: backport struct hid_device_id
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>
Thu, 13 Dec 2012 04:18:00 +0000 (20:18 -0800)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Thu, 13 Dec 2012 04:18:00 +0000 (20:18 -0800)
Kernels older than 2.6.28 did not have this
defined. Add it.

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains e8c84f9a
v2.6.28-rc1~571^2~54

commit e8c84f9a5f06912c94c38961096c994da3890a2e
Author: Jiri Slaby <jirislaby@gmail.com>
Date:   Mon May 19 15:50:01 2008 +0200

    modpost: add support for hid

    Generate aliases for hid device modules to support autoloading.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
include/linux/compat-2.6.28.h

index 8df4e46149b2e350de24c8afaf5f069470e9432c..b82a7eae7a94fd8c67221a66e7f09faf22c6e4fc 100644 (file)
 #include <linux/types.h>
 #include <linux/types.h>
 #include <linux/cpumask.h>
+#include <linux/mod_devicetable.h>
+
+#define HID_ANY_ID                             (~0)
+
+struct hid_device_id {
+       __u16 bus;
+       __u32 vendor;
+       __u32 product;
+       kernel_ulong_t driver_data
+               __attribute__((aligned(sizeof(kernel_ulong_t))));
+};
 
 #ifndef ETH_P_PAE
 #define ETH_P_PAE 0x888E      /* Port Access Entity (IEEE 802.1X) */