X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/7ed9009bbdf799be5f9f1446c264b8504f483beb..e48f1513b2675cb956582a04d54993398f410c26:/target/linux/brcm-2.4/files/arch/mips/bcm947xx/include/linuxver.h diff --git a/target/linux/brcm-2.4/files/arch/mips/bcm947xx/include/linuxver.h b/target/linux/brcm-2.4/files/arch/mips/bcm947xx/include/linuxver.h index c6a12ae92..3f16345f7 100644 --- a/target/linux/brcm-2.4/files/arch/mips/bcm947xx/include/linuxver.h +++ b/target/linux/brcm-2.4/files/arch/mips/bcm947xx/include/linuxver.h @@ -2,7 +2,7 @@ * Linux-specific abstractions to gain some independence from linux kernel versions. * Pave over some 2.2 versus 2.4 versus 2.6 kernel differences. * - * Copyright 2006, Broadcom Corporation + * Copyright 2007, Broadcom Corporation * All Rights Reserved. * * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY @@ -10,14 +10,18 @@ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. * - * $Id: linuxver.h,v 1.1.1.10 2006/02/27 03:43:16 honor Exp $ */ #ifndef _linuxver_h_ #define _linuxver_h_ -#include #include +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)) +#include +#else +#include +#endif +#include #if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 0)) /* __NO_VERSION__ must be defined for all linkables except one in 2.2 */ @@ -28,15 +32,6 @@ #endif #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 0) */ -#if defined(MODULE) && defined(MODVERSIONS) -#include -#endif - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 0) -#include -#endif - - #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) #define module_param(_name_, _type_, _perm_) MODULE_PARM(_name_, "i") #define module_param_string(_name_, _string_, _size_, _perm_) \ @@ -77,6 +72,13 @@ #endif #endif /* LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 41) */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20) +#define MY_INIT_WORK(_work, _func, _data) INIT_WORK(_work, _func) +#else +#define MY_INIT_WORK(_work, _func, _data) INIT_WORK(_work, _func, _data) +typedef void (*work_func_t)(void *work); +#endif /* < 2.6.20 */ + #if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)) /* Some distributions have their own 2.6.x compatibility layers */ #ifndef IRQ_NONE @@ -110,6 +112,12 @@ cs_error(client_handle_t handle, int func, int ret) } #endif +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 15)) + +typedef struct pcmcia_device dev_link_t; + +#endif + #endif /* CONFIG_PCMCIA */ #ifndef __exit @@ -414,4 +422,11 @@ pci_restore_state(struct pci_dev *dev, u32 *buffer) #define af_packet_priv data #endif +/* suspend args */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11) +#define DRV_SUSPEND_STATE_TYPE pm_message_t +#else +#define DRV_SUSPEND_STATE_TYPE uint32 +#endif + #endif /* _linuxver_h_ */