diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2013-11-30 18:09:53 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2013-11-30 22:36:53 +0100 |
commit | 2bc07419d7fc6488f8f13f66c388217441407106 (patch) | |
tree | 33c0ed37c1dba81f24a0527f284ea6de8e1d60b2 | |
parent | 1cef5b19ab88df96280e182b3ebbfaa5e3a1972f (diff) |
backports: check for define in module_driver and not kernel version
Upstream commit: 153c22dd7d65ac8e607e682c834316a164dba5b6
In some places backports checked for the kernel version on weather to
add a own define for module_driver or not. This patch makes it check if
there is already one or not.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r-- | backport/backport-include/linux/device.h | 2 | ||||
-rw-r--r-- | backport/backport-include/linux/pci.h | 2 | ||||
-rw-r--r-- | backport/backport-include/linux/platform_device.h | 2 | ||||
-rw-r--r-- | backport/backport-include/linux/usb.h | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/backport/backport-include/linux/device.h b/backport/backport-include/linux/device.h index 2244c626..8b90ee49 100644 --- a/backport/backport-include/linux/device.h +++ b/backport/backport-include/linux/device.h @@ -29,7 +29,7 @@ backport_device_move(struct device *dev, struct device *new_parent, #define device_move LINUX_BACKPORT(device_move) #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) +#ifndef module_driver /** * module_driver() - Helper macro for drivers that don't do anything * special in module init/exit. This eliminates a lot of boilerplate. diff --git a/backport/backport-include/linux/pci.h b/backport/backport-include/linux/pci.h index e309586d..208278d4 100644 --- a/backport/backport-include/linux/pci.h +++ b/backport/backport-include/linux/pci.h @@ -70,7 +70,7 @@ #define compat_pci_resume(fn) #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0) +#ifndef module_pci_driver /** * module_pci_driver() - Helper macro for registering a PCI driver * @__pci_driver: pci_driver struct diff --git a/backport/backport-include/linux/platform_device.h b/backport/backport-include/linux/platform_device.h index d93f04b4..3735cc87 100644 --- a/backport/backport-include/linux/platform_device.h +++ b/backport/backport-include/linux/platform_device.h @@ -4,7 +4,7 @@ #include_next <linux/platform_device.h> #include <linux/version.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) +#ifndef module_platform_driver_probe #define module_platform_driver_probe(__platform_driver, __platform_probe) \ static int __init __platform_driver##_init(void) \ { \ diff --git a/backport/backport-include/linux/usb.h b/backport/backport-include/linux/usb.h index 70d89b81..717b796d 100644 --- a/backport/backport-include/linux/usb.h +++ b/backport/backport-include/linux/usb.h @@ -4,7 +4,7 @@ #include_next <linux/usb.h> #include <linux/version.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) +#ifndef module_usb_driver /** * module_usb_driver() - Helper macro for registering a USB driver * @__usb_driver: usb_driver struct |