fix the path to the yealink module (#1944)
[openwrt-10.03/.git] / package / kernel / modules / usb.mk
index 76125a9f5d13df8c3033329d075f2a6106ed360b..1add87557e8146f4ea6629544335fe1779279480 100644 (file)
@@ -8,12 +8,23 @@
 
 USBMENU:=USB Support
 
-# This is 2.6.22 specific
-#ifeq ($(KERNEL),2.4)
-       USBNET_DIR=usb/net
-#else
-#      USBNET_DIR=net/usb
-#endif
+ifeq ($(KERNEL),2.4)
+  USBNET_DIR:=usb/net
+endif
+ifeq ($(KERNEL_PATCHVER),2.6.21)
+  USBNET_DIR:=usb/net
+endif
+USBNET_DIR?=net/usb
+
+ifeq ($(KERNEL_PATCHVER),2.6.21)
+  USBHID_DIR:=drivers/usb/input
+endif
+USBHID_DIR?=drivers/hid/usbhid
+
+ifeq ($(KERNEL_PATCHVER),2.6.21)
+  USBINPUT_DIR:=usb/input
+endif
+USBINPUT_DIR?=input/misc
 
 define usbdep
   SUBMENU:=$(USBMENU)
@@ -245,6 +256,17 @@ define KernelPackage/usb-serial-visor
 endef
 $(eval $(call KernelPackage,usb-serial-visor))
 
+define KernelPackage/usb-serial-option
+  $(call usbdep,kmod-usb-serial)
+  TITLE:=Support for Option HSDPA modems
+  DESCRIPTION:=Kernel support for Option HSDPA modems
+  DEPENDS:=@LINUX_2_6
+  KCONFIG:=$(CONFIG_USB_SERIAL_OPTION)
+  FILES:=$(LINUX_DIR)/drivers/usb/serial/option.$(LINUX_KMOD_SUFFIX)
+  AUTOLOAD:=$(call AutoLoad,65,option)
+endef
+$(eval $(call KernelPackage,usb-serial-option))
+
 
 define KernelPackage/usb-storage
   $(call usbdep,+kmod-scsi-core)
@@ -389,7 +411,7 @@ define KernelPackage/usb-hid
 endef
 
 define KernelPackage/usb-hid/2.6
-  FILES:=$(LINUX_DIR)/drivers/usb/input/usbhid.ko
+  FILES:=$(LINUX_DIR)/$(USBHID_DIR)/usbhid.ko
 endef
 $(eval $(call KernelPackage,usb-hid))
 
@@ -398,7 +420,7 @@ define KernelPackage/usb-yealink
   TITLE:=USB Yealink VOIP phone
   DESCRIPTION:=Kernel support for Yealink VOIP phone
   KCONFIG:=$(CONFIG_USB_YEALINK)
-  FILES:=$(LINUX_DIR)/drivers/usb/input/yealink.ko
+  FILES:=$(LINUX_DIR)/drivers/$(USBINPUT_DIR)/yealink.ko
   AUTOLOAD:=$(call AutoLoad,70,yealink)
 endef
 $(eval $(call KernelPackage,usb-yealink))