kernel: drop obsolete kernel version checks
authorFelix Fietkau <nbd@openwrt.org>
Sat, 24 Jan 2015 22:13:22 +0000 (22:13 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 24 Jan 2015 22:13:22 +0000 (22:13 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 44113

include/kernel.mk
package/kernel/linux/modules/crypto.mk
package/kernel/linux/modules/fs.mk
package/kernel/linux/modules/i2c.mk
package/kernel/linux/modules/other.mk
package/kernel/linux/modules/sound.mk
package/kernel/linux/modules/usb.mk
package/kernel/linux/modules/video.mk

index eeb0c3d2bd8e34d226011af8828a3cae71ca5b19..dd6c867ea09b4102a202b16805943110a1d79353 100644 (file)
@@ -35,9 +35,7 @@ else
   endif
   KERNEL_BUILD_DIR ?= $(BUILD_DIR)/linux-$(BOARD)$(if $(SUBTARGET),_$(SUBTARGET))
   LINUX_DIR ?= $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
-  ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.7.0)),1)
-    LINUX_UAPI_DIR=uapi/
-  endif
+  LINUX_UAPI_DIR=uapi/
   LINUX_VERMAGIC:=$(strip $(shell cat $(LINUX_DIR)/.vermagic 2>/dev/null))
   LINUX_VERMAGIC:=$(if $(LINUX_VERMAGIC),$(LINUX_VERMAGIC),unknown)
 
index bcd45061c592935eedcd66e83c16d617f59c4112..2f1d33f4a41c4157bc25172e34b6331c1508ff3b 100644 (file)
@@ -495,13 +495,6 @@ endef
 $(eval $(call KernelPackage,crypto-sha256))
 
 
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.6.0)),1)
-camellia_mod_suffix=_generic
-endif
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.7.0)),1)
-cast56_mod_suffix=_generic
-endif
-
 define KernelPackage/crypto-misc
   TITLE:=Other CryptoAPI modules
   DEPENDS:=+kmod-crypto-manager
@@ -523,10 +516,10 @@ define KernelPackage/crypto-misc
        CONFIG_CRYPTO_WP512
   FILES:= \
        $(LINUX_DIR)/crypto/anubis.ko \
-       $(LINUX_DIR)/crypto/camellia$(camellia_mod_suffix).ko \
-       $(if $(call kernel_patchver_ge,3.7),$(LINUX_DIR)/crypto/cast_common.ko) \
-       $(LINUX_DIR)/crypto/cast5$(cast56_mod_suffix).ko \
-       $(LINUX_DIR)/crypto/cast6$(cast56_mod_suffix).ko \
+       $(LINUX_DIR)/crypto/camellia_generic.ko \
+       $(LINUX_DIR)/crypto/cast_common.ko \
+       $(LINUX_DIR)/crypto/cast5_generic.ko \
+       $(LINUX_DIR)/crypto/cast6_generic.ko \
        $(LINUX_DIR)/crypto/khazad.ko \
        $(LINUX_DIR)/crypto/sha512_generic.ko \
        $(LINUX_DIR)/crypto/tea.ko \
index 8d2731d1993f58caeb28868489428a8428b4269c..e1ddbaee6863645f541efa0b3b9c27b0287fd732 100644 (file)
@@ -298,14 +298,9 @@ define KernelPackage/fs-nfs
        CONFIG_NFS_FS \
        CONFIG_NFS_USE_LEGACY_DNS=n \
        CONFIG_NFS_USE_NEW_IDMAPPER=n
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.6.0)),1)
   FILES:= \
        $(LINUX_DIR)/fs/nfs/nfs.ko \
        $(LINUX_DIR)/fs/nfs/nfsv3.ko
-else
-  FILES:= \
-       $(LINUX_DIR)/fs/nfs/nfs.ko
-endif
   AUTOLOAD:=$(call AutoLoad,40,nfs nfsv3)
 endef
 
index 76431380649fd25040ae469e92ef8768e0f34083..a2dcf35e5358eae60b09fdaaf803ae3ea7d399a4 100644 (file)
@@ -206,13 +206,8 @@ endef
 
 $(eval $(call KernelPackage,i2c-mux))
 
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.6.0)),1)
 I2C_MUX_GPIO_MODULES:= \
   CONFIG_I2C_MUX_GPIO:drivers/i2c/muxes/i2c-mux-gpio
-else
-I2C_MUX_GPIO_MODULES:= \
-  CONFIG_I2C_MUX_GPIO:drivers/i2c/muxes/gpio-i2cmux
-endif
 
 define KernelPackage/i2c-mux-gpio
   $(call i2c_defaults,$(I2C_MUX_GPIO_MODULES),51)
@@ -226,12 +221,8 @@ endef
 
 $(eval $(call KernelPackage,i2c-mux-gpio))
 
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.6.0)),1)
-I2C_MUX_PREFIX:=i2c-mux-
-endif
-
 I2C_MUX_PCA954x_MODULES:= \
-  CONFIG_I2C_MUX_PCA954x:drivers/i2c/muxes/$(I2C_MUX_PREFIX)pca954x
+  CONFIG_I2C_MUX_PCA954x:drivers/i2c/muxes/i2c-mux-pca954x
 
 define KernelPackage/i2c-mux-pca954x
   $(call i2c_defaults,$(I2C_MUX_PCA954x_MODULES),51)
index decc1df6755c20d759e69331b0e38c8cc25fe0e9..b2d8eb7efaadc56b6d08eee56c4ec616f6481f42 100644 (file)
@@ -698,7 +698,7 @@ define KernelPackage/serial-8250
        CONFIG_SERIAL_8250_SHARE_IRQ=y \
        CONFIG_SERIAL_8250_DETECT_IRQ=n \
        CONFIG_SERIAL_8250_RSA=n
-  FILES:=$(LINUX_DIR)/drivers/tty/serial/8250/8250$(if $(call kernel_patchver_ge,3.7),$(if $(call kernel_patchver_le,3.8),_core)).ko
+  FILES:=$(LINUX_DIR)/drivers/tty/serial/8250/8250.ko
 endef
 
 define KernelPackage/serial-8250/description
index be016381744aee246eb5c3d9304709cc95552575..964524b0afa2a307d14b7b5f399fbc0dfacebee1 100644 (file)
@@ -17,7 +17,8 @@ SOUNDCORE_LOAD ?= \
        snd-timer \
        snd-pcm \
        snd-mixer-oss \
-       snd-pcm-oss
+       snd-pcm-oss \
+       snd-compress
 
 SOUNDCORE_FILES ?= \
        $(LINUX_DIR)/sound/soundcore.ko \
@@ -28,15 +29,8 @@ SOUNDCORE_FILES ?= \
        $(LINUX_DIR)/sound/core/snd-timer.ko \
        $(LINUX_DIR)/sound/core/snd-pcm.ko \
        $(LINUX_DIR)/sound/core/oss/snd-mixer-oss.ko \
-       $(LINUX_DIR)/sound/core/oss/snd-pcm-oss.ko
-
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.3.0)),1)
-SOUNDCORE_LOAD += \
-       snd-compress
-
-SOUNDCORE_FILES += \
+       $(LINUX_DIR)/sound/core/oss/snd-pcm-oss.ko \
        $(LINUX_DIR)/sound/core/snd-compress.ko
-endif
 
 ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.12.0)),1)
 SOUNDCORE_LOAD += \
@@ -196,18 +190,6 @@ $(eval $(call KernelPackage,sound-soc-ac97))
 
 define KernelPackage/sound-soc-imx
   TITLE:=IMX SoC support
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),lt,3.12.0)),1)
-  KCONFIG:=\
-       CONFIG_SND_IMX_SOC \
-       CONFIG_SND_SOC_IMX_AUDMUX \
-       CONFIG_SND_SOC_FSL_SSI \
-       CONFIG_SND_SOC_IMX_PCM
-  FILES:= \
-       $(LINUX_DIR)/sound/soc/fsl/snd-soc-imx-audmux.ko \
-       $(LINUX_DIR)/sound/soc/fsl/snd-soc-fsl-ssi.ko \
-       $(LINUX_DIR)/sound/soc/fsl/snd-soc-imx-pcm.ko
-  AUTOLOAD:=$(call AutoLoad,56,snd-soc-imx-audmux snd-soc-fsl-ssi snd-soc-imx-pcm)
-else
   KCONFIG:=\
        CONFIG_SND_IMX_SOC \
        CONFIG_SND_SOC_IMX_AUDMUX \
@@ -218,7 +200,6 @@ else
        $(LINUX_DIR)/sound/soc/fsl/snd-soc-fsl-ssi.ko \
        $(LINUX_DIR)/sound/soc/fsl/imx-pcm-dma.ko
   AUTOLOAD:=$(call AutoLoad,56,snd-soc-imx-audmux snd-soc-fsl-ssi snd-soc-imx-pcm)
-endif
   DEPENDS:=@TARGET_imx6 +kmod-sound-soc-core
   $(call AddDepends/sound)
 endef
index e147c49372b34205e4256b07b78992510e5350a8..9e5a1ebe5817a09b19a96049d759a26edbe89275 100644 (file)
@@ -400,7 +400,6 @@ define KernelPackage/usb2
        CONFIG_USB_OCTEON_EHCI=y \
        CONFIG_USB_EHCI_HCD_ORION=y \
        CONFIG_USB_EHCI_HCD_PLATFORM=y
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.8.0)),1)
   FILES:= \
        $(LINUX_DIR)/drivers/usb/host/ehci-hcd.ko \
        $(LINUX_DIR)/drivers/usb/host/ehci-platform.ko
@@ -408,10 +407,6 @@ ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.8.0)),1)
     FILES+=$(LINUX_DIR)/drivers/usb/host/ehci-orion.ko
   endif
   AUTOLOAD:=$(call AutoLoad,40,ehci-hcd ehci-platform ehci-orion,1)
-else
-  FILES:=$(LINUX_DIR)/drivers/usb/host/ehci-hcd.ko
-  AUTOLOAD:=$(call AutoLoad,40,ehci-hcd,1)
-endif
   $(call AddDepends/usb)
 endef
 
@@ -440,21 +435,15 @@ $(eval $(call KernelPackage,usb2-pci))
 
 define KernelPackage/usb-dwc2
   TITLE:=DWC2 USB controller driver
-  DEPENDS:=@!LINUX_3_8
+  DEPENDS:=@!LINUX_3_8 @!LINUX_3_10
   KCONFIG:= \
        CONFIG_USB_DWC2 \
        CONFIG_USB_DWC2_DEBUG=n \
        CONFIG_USB_DWC2_VERBOSE=n \
        CONFIG_USB_DWC2_TRACK_MISSED_SOFS=n
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.14.0)),1)
   FILES:= \
        $(LINUX_DIR)/drivers/usb/dwc2/dwc2.ko \
        $(LINUX_DIR)/drivers/usb/dwc2/dwc2_platform.ko
-else
-  FILES:= \
-       $(LINUX_DIR)/drivers/staging/dwc2/dwc2.ko \
-       $(LINUX_DIR)/drivers/staging/dwc2/dwc2_platform.ko
-endif
   AUTOLOAD:=$(call AutoLoad,54,dwc2 dwc2_platform,1)
   $(call AddDepends/usb)
 endef
@@ -1409,19 +1398,11 @@ define KernelPackage/usb-chipidea-imx
        CONFIG_USB_CHIPIDEA_HOST=y \
        CONFIG_USB_CHIPIDEA_UDC=y \
        CONFIG_USB_CHIPIDEA_DEBUG=y
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),lt,3.11.0)),1)
-  FILES:=\
-       $(LINUX_DIR)/drivers/usb/chipidea/ci_hdrc.ko \
-       $(if $(CONFIG_OF_DEVICE),$(LINUX_DIR)/drivers/usb/chipidea/ci13xxx_imx.ko) \
-       $(if $(CONFIG_OF_DEVICE),$(LINUX_DIR)/drivers/usb/chipidea/usbmisc_imx$(if $(call kernel_patchver_le,3.9),6q).ko)
-  AUTOLOAD:=$(call AutoLoad,51,ci_hdrc $(if $(CONFIG_OF_DEVICE),ci13xxx_imx usbmisc_imx$(if $(call kernel_patchver_le,3.9),6q)),1)
-else
   FILES:=\
        $(LINUX_DIR)/drivers/usb/chipidea/ci_hdrc.ko \
        $(if $(CONFIG_OF),$(LINUX_DIR)/drivers/usb/chipidea/ci_hdrc_imx.ko) \
        $(if $(CONFIG_OF),$(LINUX_DIR)/drivers/usb/chipidea/usbmisc_imx.ko)
   AUTOLOAD:=$(call AutoLoad,51,ci_hdrc $(if $(CONFIG_OF),ci_hdrc_imx usbmisc_imx),1)
-endif
   $(call AddDepends/usb)
 endef
 
index 0681b0e767815b74a8fdea908fa9490d3fdcd366..77ba29a00017f97b727b5b1e83d432e822a8f2db 100644 (file)
@@ -8,14 +8,8 @@
 
 VIDEO_MENU:=Video Support
 
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.7.0)),1)
 V4L2_DIR=v4l2-core
 V4L2_USB_DIR=usb
-else
-V4L2_DIR=video
-V4L2_USB_DIR=video
-endif
-
 
 define KernelPackage/fb
   SUBMENU:=$(VIDEO_MENU)
@@ -99,18 +93,10 @@ define KernelPackage/video-core
        CONFIG_V4L_PCI_DRIVERS=y \
        CONFIG_V4L_PLATFORM_DRIVERS=y \
        CONFIG_V4L_ISA_PARPORT_DRIVERS=y
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.6.0)),1)
   FILES:= \
        $(LINUX_DIR)/drivers/media/$(V4L2_DIR)/v4l2-common.ko \
        $(LINUX_DIR)/drivers/media/$(V4L2_DIR)/videodev.ko
   AUTOLOAD:=$(call AutoLoad,60, videodev v4l2-common)
-else
-  FILES:= \
-       $(if $(CONFIG_COMPAT),$(LINUX_DIR)/drivers/media/$(V4L2_DIR)/v4l2-compat-ioctl32.ko) \
-       $(LINUX_DIR)/drivers/media/$(V4L2_DIR)/v4l2-common.ko \
-       $(LINUX_DIR)/drivers/media/$(V4L2_DIR)/videodev.ko
-  AUTOLOAD:=$(call AutoLoad,60, $(if $(CONFIG_COMPAT),v4l2-compat-ioctl32) videodev v4l2-common)
-endif
 endef
 
 define KernelPackage/video-core/description