From: Luis R. Rodriguez Date: Thu, 13 Dec 2012 04:38:14 +0000 (-0800) Subject: compat: fix compilation on hid_ignore() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=54783c5b8bd5798320ca948ce00fa88b3b3c8211;p=openwrt%2Fstaging%2Fblogic.git compat: fix compilation on hid_ignore() This fixes compilation on the addition of hid_ignore() for kernels older than 2.6.28. mcgrof@drvbp1 ~/compat (git::master)$ time ckmake Trying kernel 3.6.5-030605-generic [OK] Trying kernel 3.5.7-030507-generic [OK] Trying kernel 3.4.17-030417-generic [OK] Trying kernel 3.3.8-030308-generic [OK] Trying kernel 3.2.33-030233-generic [OK] Trying kernel 3.1.10-030110-generic [OK] Trying kernel 3.0.50-030050-generic [OK] Trying kernel 2.6.39-02063904-generic [OK] Trying kernel 2.6.38-02063808-generic [OK] Trying kernel 2.6.37-02063706-generic [OK] Trying kernel 2.6.36-02063604-generic [OK] Trying kernel 2.6.35-02063513-generic [OK] Trying kernel 2.6.34-02063413-generic [OK] Trying kernel 2.6.33-02063320-generic [OK] Trying kernel 2.6.32-02063260-generic [OK] Trying kernel 2.6.31-02063113-generic [OK] Trying kernel 2.6.30-02063010-generic [OK] Trying kernel 2.6.29-02062906-generic [OK] Trying kernel 2.6.28-02062810-generic [OK] Trying kernel 2.6.27-020627-generic [OK] Trying kernel 2.6.26-020626-generic [OK] Trying kernel 2.6.25-020625-generic [OK] Trying kernel 2.6.24-020624-generic [OK] real 1m58.798s user 3m59.967s sys 1m25.585s Signed-off-by: Luis R. Rodriguez --- diff --git a/compat/compat-3.8.c b/compat/compat-3.8.c index c7df174343fd..034dd776ef2f 100644 --- a/compat/compat-3.8.c +++ b/compat/compat-3.8.c @@ -317,24 +317,37 @@ bool hid_ignore(struct hid_device *hdev) return true; break; case USB_VENDOR_ID_JESS: +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)) if (hdev->product == USB_DEVICE_ID_JESS_YUREX && hdev->type == HID_TYPE_USBNONE) return true; +#else + if (hdev->product == USB_DEVICE_ID_JESS_YUREX) + return true; +#endif break; case USB_VENDOR_ID_DWAV: /* These are handled by usbtouchscreen. hdev->type is probably * HID_TYPE_USBNONE, but we say !HID_TYPE_USBMOUSE to match * usbtouchscreen. */ +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)) if ((hdev->product == USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER || hdev->product == USB_DEVICE_ID_DWAV_TOUCHCONTROLLER) && hdev->type != HID_TYPE_USBMOUSE) return true; +#else + if (hdev->product == USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER || + hdev->product == USB_DEVICE_ID_DWAV_TOUCHCONTROLLER) + return true; +#endif break; } +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)) if (hdev->type == HID_TYPE_USBMOUSE && hid_match_id(hdev, hid_mouse_ignore_list)) return true; +#endif return !!hid_match_id(hdev, hid_ignore_list); }