summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2003-01-02 08:01:36 +1100
committerPaul Mackerras <paulus@samba.org>2003-01-02 08:01:36 +1100
commit52daa1f418d104420b8e3cf7c4e2b9edeb3c3ca1 (patch)
tree2731da99a956944ecc6ccf9500a416743aae06ba /include
parent40f576b5364c98919b0f913dec3f8c6d92e4ee0d (diff)
parent49b5e1f71b720f4c3290f586d9231a7cffcb6935 (diff)
Merge samba.org:/home/paulus/kernel/linux-2.5
into samba.org:/home/paulus/kernel/for-linus-ppc
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/types.h11
-rw-r--r--include/asm-arm/types.h12
-rw-r--r--include/asm-cris/types.h12
-rw-r--r--include/asm-i386/hw_irq.h5
-rw-r--r--include/asm-i386/types.h12
-rw-r--r--include/asm-ia64/types.h5
-rw-r--r--include/asm-m68k/types.h12
-rw-r--r--include/asm-m68knommu/types.h12
-rw-r--r--include/asm-mips/types.h12
-rw-r--r--include/asm-mips64/types.h12
-rw-r--r--include/asm-parisc/types.h20
-rw-r--r--include/asm-ppc/types.h24
-rw-r--r--include/asm-ppc64/types.h11
-rw-r--r--include/asm-s390/types.h13
-rw-r--r--include/asm-s390x/compat.h61
-rw-r--r--include/asm-s390x/types.h12
-rw-r--r--include/asm-sh/types.h12
-rw-r--r--include/asm-sparc/types.h12
-rw-r--r--include/asm-sparc64/types.h12
-rw-r--r--include/asm-v850/types.h12
-rw-r--r--include/asm-x86_64/types.h12
-rw-r--r--include/linux/compiler.h5
-rw-r--r--include/linux/i2c-dev.h177
-rw-r--r--include/linux/i2c.h37
-rw-r--r--include/linux/isapnp.h138
-rw-r--r--include/linux/kallsyms.h4
-rw-r--r--include/linux/ncp_fs.h2
-rw-r--r--include/linux/pci.h29
-rw-r--r--include/linux/pnp.h47
-rw-r--r--include/linux/sunrpc/cache.h2
-rw-r--r--include/linux/sunrpc/svc.h8
-rw-r--r--include/linux/types.h2
-rw-r--r--include/video/tgafb.h27
33 files changed, 348 insertions, 436 deletions
diff --git a/include/asm-alpha/types.h b/include/asm-alpha/types.h
index cc8a6dfe1978..f5716139ec89 100644
--- a/include/asm-alpha/types.h
+++ b/include/asm-alpha/types.h
@@ -9,6 +9,8 @@
* need to be careful to avoid a name clashes.
*/
+#ifndef __ASSEMBLY__
+
typedef unsigned int umode_t;
/*
@@ -28,11 +30,17 @@ typedef unsigned int __u32;
typedef __signed__ long __s64;
typedef unsigned long __u64;
+#endif /* __ASSEMBLY__ */
+
/*
* These aren't exported outside the kernel to avoid name space clashes
*/
#ifdef __KERNEL__
+#define BITS_PER_LONG 64
+
+#ifndef __ASSEMBLY__
+
typedef signed char s8;
typedef unsigned char u8;
@@ -45,10 +53,9 @@ typedef unsigned int u32;
typedef signed long s64;
typedef unsigned long u64;
-#define BITS_PER_LONG 64
-
typedef u64 dma_addr_t;
typedef u64 dma64_addr_t;
+#endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */
#endif /* _ALPHA_TYPES_H */
diff --git a/include/asm-arm/types.h b/include/asm-arm/types.h
index 7b66b95e5451..22992ee0627a 100644
--- a/include/asm-arm/types.h
+++ b/include/asm-arm/types.h
@@ -1,6 +1,8 @@
#ifndef __ASM_ARM_TYPES_H
#define __ASM_ARM_TYPES_H
+#ifndef __ASSEMBLY__
+
typedef unsigned short umode_t;
/*
@@ -22,11 +24,17 @@ typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#endif
+#endif /* __ASSEMBLY__ */
+
/*
* These aren't exported outside the kernel to avoid name space clashes
*/
#ifdef __KERNEL__
+#define BITS_PER_LONG 32
+
+#ifndef __ASSEMBLY__
+
typedef signed char s8;
typedef unsigned char u8;
@@ -39,13 +47,13 @@ typedef unsigned int u32;
typedef signed long long s64;
typedef unsigned long long u64;
-#define BITS_PER_LONG 32
-
/* Dma addresses are 32-bits wide. */
typedef u32 dma_addr_t;
typedef u32 dma64_addr_t;
+#endif /* __ASSEMBLY__ */
+
#endif /* __KERNEL__ */
#endif
diff --git a/include/asm-cris/types.h b/include/asm-cris/types.h
index 787ff7b1d86e..25425c09ddbc 100644
--- a/include/asm-cris/types.h
+++ b/include/asm-cris/types.h
@@ -1,6 +1,8 @@
#ifndef _ETRAX_TYPES_H
#define _ETRAX_TYPES_H
+#ifndef __ASSEMBLY__
+
typedef unsigned short umode_t;
/*
@@ -22,11 +24,17 @@ typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#endif
+#endif /* __ASSEMBLY__ */
+
/*
* These aren't exported outside the kernel to avoid name space clashes
*/
#ifdef __KERNEL__
+#define BITS_PER_LONG 32
+
+#ifndef __ASSEMBLY__
+
typedef signed char s8;
typedef unsigned char u8;
@@ -39,12 +47,12 @@ typedef unsigned int u32;
typedef signed long long s64;
typedef unsigned long long u64;
-#define BITS_PER_LONG 32
-
/* Dma addresses are 32-bits wide, just like our other addresses. */
typedef u32 dma_addr_t;
+#endif /* __ASSEMBLY__ */
+
#endif /* __KERNEL__ */
#endif
diff --git a/include/asm-i386/hw_irq.h b/include/asm-i386/hw_irq.h
index 70011938c229..a537cc4d233e 100644
--- a/include/asm-i386/hw_irq.h
+++ b/include/asm-i386/hw_irq.h
@@ -131,8 +131,9 @@ static inline int unregister_profile_notifier(struct notifier_block * nb)
#endif /* CONFIG_PROFILING */
-#ifdef CONFIG_X86_IO_APIC /*more of this file should probably be ifdefed SMP */
-static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {
+#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP)
+static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i)
+{
if (IO_APIC_IRQ(i))
send_IPI_self(IO_APIC_VECTOR(i));
}
diff --git a/include/asm-i386/types.h b/include/asm-i386/types.h
index 6175dba50238..b0d095271284 100644
--- a/include/asm-i386/types.h
+++ b/include/asm-i386/types.h
@@ -1,6 +1,8 @@
#ifndef _I386_TYPES_H
#define _I386_TYPES_H
+#ifndef __ASSEMBLY__
+
typedef unsigned short umode_t;
/*
@@ -22,11 +24,17 @@ typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#endif
+#endif /* __ASSEMBLY__ */
+
/*
* These aren't exported outside the kernel to avoid name space clashes
*/
#ifdef __KERNEL__
+#define BITS_PER_LONG 32
+
+#ifndef __ASSEMBLY__
+
#include <linux/config.h>
typedef signed char s8;
@@ -41,8 +49,6 @@ typedef unsigned int u32;
typedef signed long long s64;
typedef unsigned long long u64;
-#define BITS_PER_LONG 32
-
/* DMA addresses come in generic and 64-bit flavours. */
#ifdef CONFIG_HIGHMEM
@@ -57,6 +63,8 @@ typedef u64 sector_t;
#define HAVE_SECTOR_T
#endif
+#endif /* __ASSEMBLY__ */
+
#endif /* __KERNEL__ */
#endif
diff --git a/include/asm-ia64/types.h b/include/asm-ia64/types.h
index 52d0b3b47c81..cbdc4247a4c9 100644
--- a/include/asm-ia64/types.h
+++ b/include/asm-ia64/types.h
@@ -14,6 +14,11 @@
#ifdef __ASSEMBLY__
# define __IA64_UL(x) (x)
# define __IA64_UL_CONST(x) x
+
+# ifdef __KERNEL__
+# define BITS_PER_LONG 64
+# endif
+
#else
# define __IA64_UL(x) ((unsigned long)(x))
# define __IA64_UL_CONST(x) x##UL
diff --git a/include/asm-m68k/types.h b/include/asm-m68k/types.h
index 92104425be80..b5a1febc97d4 100644
--- a/include/asm-m68k/types.h
+++ b/include/asm-m68k/types.h
@@ -9,6 +9,8 @@
* need to be careful to avoid a name clashes.
*/
+#ifndef __ASSEMBLY__
+
typedef unsigned short umode_t;
/*
@@ -30,11 +32,17 @@ typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#endif
+#endif /* __ASSEMBLY__ */
+
/*
* These aren't exported outside the kernel to avoid name space clashes
*/
#ifdef __KERNEL__
+#define BITS_PER_LONG 32
+
+#ifndef __ASSEMBLY__
+
typedef signed char s8;
typedef unsigned char u8;
@@ -47,13 +55,13 @@ typedef unsigned int u32;
typedef signed long long s64;
typedef unsigned long long u64;
-#define BITS_PER_LONG 32
-
/* DMA addresses are always 32-bits wide */
typedef u32 dma_addr_t;
typedef u32 dma64_addr_t;
+#endif /* __ASSEMBLY__ */
+
#endif /* __KERNEL__ */
#endif /* _M68K_TYPES_H */
diff --git a/include/asm-m68knommu/types.h b/include/asm-m68knommu/types.h
index 74d147dd6ba8..e1153959754e 100644
--- a/include/asm-m68knommu/types.h
+++ b/include/asm-m68knommu/types.h
@@ -9,6 +9,8 @@
* need to be careful to avoid a name clashes.
*/
+#ifndef __ASSEMBLY__
+
typedef unsigned short umode_t;
/*
@@ -30,11 +32,17 @@ typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#endif
+#endif /* __ASSEMBLY__ */
+
/*
* These aren't exported outside the kernel to avoid name space clashes
*/
#ifdef __KERNEL__
+#define BITS_PER_LONG 32
+
+#ifndef __ASSEMBLY__
+
typedef signed char s8;
typedef unsigned char u8;
@@ -47,12 +55,12 @@ typedef unsigned int u32;
typedef signed long long s64;
typedef unsigned long long u64;
-#define BITS_PER_LONG 32
-
/* Dma addresses are 32-bits wide. */
typedef u32 dma_addr_t;
+#endif /* __ASSEMBLY__ */
+
#endif /* __KERNEL__ */
#endif /* _M68K_TYPES_H */
diff --git a/include/asm-mips/types.h b/include/asm-mips/types.h
index 638f75163c36..d4796beca3f5 100644
--- a/include/asm-mips/types.h
+++ b/include/asm-mips/types.h
@@ -10,6 +10,8 @@
#ifndef _ASM_TYPES_H
#define _ASM_TYPES_H
+#ifndef __ASSEMBLY__
+
typedef unsigned short umode_t;
/*
@@ -40,11 +42,17 @@ typedef unsigned long long __u64;
#endif
+#endif /* __ASSEMBLY__ */
+
/*
* These aren't exported outside the kernel to avoid name space clashes
*/
#ifdef __KERNEL__
+#define BITS_PER_LONG _MIPS_SZLONG
+
+#ifndef __ASSEMBLY__
+
typedef __signed char s8;
typedef unsigned char u8;
@@ -68,10 +76,10 @@ typedef unsigned long long u64;
#endif
-#define BITS_PER_LONG _MIPS_SZLONG
-
typedef unsigned long dma_addr_t;
+#endif /* __ASSEMBLY__ */
+
#endif /* __KERNEL__ */
#endif /* _ASM_TYPES_H */
diff --git a/include/asm-mips64/types.h b/include/asm-mips64/types.h
index 26dd2a505a72..5cba0f4857f1 100644
--- a/include/asm-mips64/types.h
+++ b/include/asm-mips64/types.h
@@ -9,6 +9,8 @@
#ifndef _ASM_TYPES_H
#define _ASM_TYPES_H
+#ifndef __ASSEMBLY__
+
typedef unsigned int umode_t;
/*
@@ -39,11 +41,17 @@ typedef unsigned long long __u64;
#endif
+#endif /* __ASSEMBLY__ */
+
/*
* These aren't exported outside the kernel to avoid name space clashes
*/
#ifdef __KERNEL__
+#define BITS_PER_LONG _MIPS_SZLONG
+
+#ifndef __ASSEMBLY__
+
typedef __signed char s8;
typedef unsigned char u8;
@@ -67,10 +75,10 @@ typedef unsigned long long u64;
#endif
-#define BITS_PER_LONG _MIPS_SZLONG
-
typedef unsigned long dma_addr_t;
+#endif /* __ASSEMBLY__ */
+
#endif /* __KERNEL__ */
#endif /* _ASM_TYPES_H */
diff --git a/include/asm-parisc/types.h b/include/asm-parisc/types.h
index 86fb267f2ab7..d21b9d0d63ea 100644
--- a/include/asm-parisc/types.h
+++ b/include/asm-parisc/types.h
@@ -1,6 +1,8 @@
#ifndef _PARISC_TYPES_H
#define _PARISC_TYPES_H
+#ifndef __ASSEMBLY__
+
typedef unsigned short umode_t;
/*
@@ -22,11 +24,21 @@ typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#endif
+#endif /* __ASSEMBLY__ */
+
/*
* These aren't exported outside the kernel to avoid name space clashes
*/
#ifdef __KERNEL__
+#ifdef __LP64__
+#define BITS_PER_LONG 64
+#else
+#define BITS_PER_LONG 32
+#endif
+
+#ifndef __ASSEMBLY__
+
typedef signed char s8;
typedef unsigned char u8;
@@ -39,17 +51,13 @@ typedef unsigned int u32;
typedef signed long long s64;
typedef unsigned long long u64;
-#ifdef __LP64__
-#define BITS_PER_LONG 64
-#else
-#define BITS_PER_LONG 32
-#endif
-
/* Dma addresses are 32-bits wide. */
typedef u32 dma_addr_t;
typedef u64 dma64_addr_t;
+#endif /* __ASSEMBLY__ */
+
#endif /* __KERNEL__ */
#endif
diff --git a/include/asm-ppc/types.h b/include/asm-ppc/types.h
index 26dd36dec197..3c74a27697d5 100644
--- a/include/asm-ppc/types.h
+++ b/include/asm-ppc/types.h
@@ -21,10 +21,22 @@ typedef struct {
__u32 u[4];
} __attribute((aligned(16))) __vector128;
+/*
+ * XXX allowed outside of __KERNEL__ for now, until glibc gets
+ * a proper set of asm headers of its own. -- paulus
+ */
+typedef unsigned short umode_t;
+
+#endif /* __ASSEMBLY__ */
+
#ifdef __KERNEL__
/*
* These aren't exported outside the kernel to avoid name space clashes
*/
+#define BITS_PER_LONG 32
+
+#ifndef __ASSEMBLY__
+
typedef signed char s8;
typedef unsigned char u8;
@@ -39,8 +51,6 @@ typedef unsigned long long u64;
typedef __vector128 vector128;
-#define BITS_PER_LONG 32
-
/* DMA addresses are 32-bits wide */
typedef u32 dma_addr_t;
typedef u64 dma64_addr_t;
@@ -50,14 +60,8 @@ typedef u64 sector_t;
#define HAVE_SECTOR_T
#endif
-#endif /* __KERNEL__ */
-
-/*
- * XXX allowed outside of __KERNEL__ for now, until glibc gets
- * a proper set of asm headers of its own. -- paulus
- */
-typedef unsigned short umode_t;
-
#endif /* __ASSEMBLY__ */
+#endif /* __KERNEL__ */
+
#endif
diff --git a/include/asm-ppc64/types.h b/include/asm-ppc64/types.h
index a2a362bd5a71..08b5757e3d07 100644
--- a/include/asm-ppc64/types.h
+++ b/include/asm-ppc64/types.h
@@ -39,10 +39,16 @@ typedef struct {
__u32 u[4];
} __attribute((aligned(16))) __vector128;
+#endif /* __ASSEMBLY__ */
+
#ifdef __KERNEL__
/*
* These aren't exported outside the kernel to avoid name space clashes
*/
+#define BITS_PER_LONG 64
+
+#ifndef __ASSEMBLY__
+
typedef signed char s8;
typedef unsigned char u8;
@@ -57,12 +63,11 @@ typedef unsigned long u64;
typedef __vector128 vector128;
-#define BITS_PER_LONG 64
-
typedef u32 dma_addr_t;
typedef u64 dma64_addr_t;
-#endif /* __KERNEL__ */
#endif /* __ASSEMBLY__ */
+#endif /* __KERNEL__ */
+
#endif /* _PPC64_TYPES_H */
diff --git a/include/asm-s390/types.h b/include/asm-s390/types.h
index 0f4c3fdf5a93..dc52bf8a7acb 100644
--- a/include/asm-s390/types.h
+++ b/include/asm-s390/types.h
@@ -9,6 +9,8 @@
#ifndef _S390_TYPES_H
#define _S390_TYPES_H
+#ifndef __ASSEMBLY__
+
typedef unsigned short umode_t;
/*
@@ -34,11 +36,18 @@ typedef unsigned long long __u64;
*/
typedef __u32 addr_t;
typedef __s32 saddr_t;
+
+#endif /* __ASSEMBLY__ */
+
/*
* These aren't exported outside the kernel to avoid name space clashes
*/
#ifdef __KERNEL__
+#define BITS_PER_LONG 32
+
+#ifndef __ASSEMBLY__
+
typedef signed char s8;
typedef unsigned char u8;
@@ -51,8 +60,6 @@ typedef unsigned int u32;
typedef signed long long s64;
typedef unsigned long long u64;
-#define BITS_PER_LONG 32
-
typedef u32 dma_addr_t;
typedef union {
@@ -68,5 +75,7 @@ typedef u64 sector_t;
#define HAVE_SECTOR_T
#endif
+#endif /* __ASSEMBLY__ */
+
#endif /* __KERNEL__ */
#endif
diff --git a/include/asm-s390x/compat.h b/include/asm-s390x/compat.h
new file mode 100644
index 000000000000..e376c77f391c
--- /dev/null
+++ b/include/asm-s390x/compat.h
@@ -0,0 +1,61 @@
+#ifndef _ASM_S390X_COMPAT_H
+#define _ASM_S390X_COMPAT_H
+/*
+ * Architecture specific compatibility types
+ */
+#include <linux/types.h>
+
+#define COMPAT_USER_HZ 100
+
+typedef u32 compat_size_t;
+typedef s32 compat_ssize_t;
+typedef s32 compat_time_t;
+typedef s32 compat_clock_t;
+typedef s32 compat_pid_t;
+typedef u16 compat_uid_t;
+typedef u16 compat_gid_t;
+typedef u16 compat_mode_t;
+typedef u32 compat_ino_t;
+typedef u16 compat_dev_t;
+typedef s32 compat_off_t;
+typedef s64 compat_loff_t;
+typedef u16 compat_nlink_t;
+typedef u16 compat_ipc_pid_t;
+typedef s32 compat_daddr_t;
+typedef u32 compat_caddr_t;
+typedef __kernel_fsid_t compat_fsid_t;
+
+struct compat_timespec {
+ compat_time_t tv_sec;
+ s32 tv_nsec;
+};
+
+struct compat_timeval {
+ compat_time_t tv_sec;
+ s32 tv_usec;
+};
+
+struct compat_stat {
+ compat_dev_t st_dev;
+ u16 __pad1;
+ compat_ino_t st_ino;
+ compat_mode_t st_mode;
+ compat_nlink_t st_nlink;
+ compat_uid_t st_uid;
+ compat_gid_t st_gid;
+ compat_dev_t st_rdev;
+ u16 __pad2;
+ u32 st_size;
+ u32 st_blksize;
+ u32 st_blocks;
+ u32 st_atime;
+ u32 __unused1;
+ u32 st_mtime;
+ u32 __unused2;
+ u32 st_ctime;
+ u32 __unused3;
+ u32 __unused4;
+ u32 __unused5;
+};
+
+#endif /* _ASM_S390X_COMPAT_H */
diff --git a/include/asm-s390x/types.h b/include/asm-s390x/types.h
index b8436bf5d54f..2ee9dcb2260b 100644
--- a/include/asm-s390x/types.h
+++ b/include/asm-s390x/types.h
@@ -9,6 +9,8 @@
#ifndef _S390_TYPES_H
#define _S390_TYPES_H
+#ifndef __ASSEMBLY__
+
typedef unsigned short umode_t;
/*
@@ -36,11 +38,17 @@ typedef unsigned long __u64;
typedef unsigned long addr_t;
typedef signed long saddr_t;
+#endif /* __ASSEMBLY__ */
+
/*
* These aren't exported outside the kernel to avoid name space clashes
*/
#ifdef __KERNEL__
+#define BITS_PER_LONG 64
+
+#ifndef __ASSEMBLY__
+
typedef signed char s8;
typedef unsigned char u8;
@@ -53,9 +61,9 @@ typedef unsigned int u32;
typedef signed long s64;
typedef unsigned long u64;
-#define BITS_PER_LONG 64
-
typedef u32 dma_addr_t;
+#endif /* __ASSEMBLY__ */
+
#endif /* __KERNEL__ */
#endif
diff --git a/include/asm-sh/types.h b/include/asm-sh/types.h
index cb0f9f83af4f..c65c391e3f5c 100644
--- a/include/asm-sh/types.h
+++ b/include/asm-sh/types.h
@@ -1,6 +1,8 @@
#ifndef __ASM_SH_TYPES_H
#define __ASM_SH_TYPES_H
+#ifndef __ASSEMBLY__
+
typedef unsigned short umode_t;
/*
@@ -22,11 +24,17 @@ typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#endif
+#endif /* __ASSEMBLY__ */
+
/*
* These aren't exported outside the kernel to avoid name space clashes
*/
#ifdef __KERNEL__
+#define BITS_PER_LONG 32
+
+#ifndef __ASSEMBLY__
+
typedef __signed__ char s8;
typedef unsigned char u8;
@@ -39,12 +47,12 @@ typedef unsigned int u32;
typedef __signed__ long long s64;
typedef unsigned long long u64;
-#define BITS_PER_LONG 32
-
/* Dma addresses are 32-bits wide. */
typedef u32 dma_addr_t;
+#endif /* __ASSEMBLY__ */
+
#endif /* __KERNEL__ */
#endif /* __ASM_SH_TYPES_H */
diff --git a/include/asm-sparc/types.h b/include/asm-sparc/types.h
index 8e726708e1cd..42fc6ed98156 100644
--- a/include/asm-sparc/types.h
+++ b/include/asm-sparc/types.h
@@ -15,6 +15,8 @@
* need to be careful to avoid a name clashes.
*/
+#ifndef __ASSEMBLY__
+
typedef unsigned short umode_t;
typedef __signed__ char __s8;
@@ -29,8 +31,14 @@ typedef unsigned int __u32;
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
+#endif /* __ASSEMBLY__ */
+
#ifdef __KERNEL__
+#define BITS_PER_LONG 32
+
+#ifndef __ASSEMBLY__
+
typedef __signed__ char s8;
typedef unsigned char u8;
@@ -43,11 +51,11 @@ typedef unsigned int u32;
typedef __signed__ long long s64;
typedef unsigned long long u64;
-#define BITS_PER_LONG 32
-
typedef u32 dma_addr_t;
typedef u32 dma64_addr_t;
+#endif /* __ASSEMBLY__ */
+
#endif /* __KERNEL__ */
#endif /* defined(_SPARC_TYPES_H) */
diff --git a/include/asm-sparc64/types.h b/include/asm-sparc64/types.h
index e993f2af43bc..d0ee7f105838 100644
--- a/include/asm-sparc64/types.h
+++ b/include/asm-sparc64/types.h
@@ -10,6 +10,8 @@
* need to be careful to avoid a name clashes.
*/
+#ifndef __ASSEMBLY__
+
typedef unsigned short umode_t;
/*
@@ -29,8 +31,14 @@ typedef unsigned int __u32;
typedef __signed__ long __s64;
typedef unsigned long __u64;
+#endif /* __ASSEMBLY__ */
+
#ifdef __KERNEL__
+#define BITS_PER_LONG 64
+
+#ifndef __ASSEMBLY__
+
typedef __signed__ char s8;
typedef unsigned char u8;
@@ -43,13 +51,13 @@ typedef unsigned int u32;
typedef __signed__ long s64;
typedef unsigned long u64;
-#define BITS_PER_LONG 64
-
/* Dma addresses come in generic and 64-bit flavours. */
typedef u32 dma_addr_t;
typedef u64 dma64_addr_t;
+#endif /* __ASSEMBLY__ */
+
#endif /* __KERNEL__ */
#endif /* defined(_SPARC64_TYPES_H) */
diff --git a/include/asm-v850/types.h b/include/asm-v850/types.h
index 6d144379f13e..dcef57196875 100644
--- a/include/asm-v850/types.h
+++ b/include/asm-v850/types.h
@@ -32,11 +32,17 @@ typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#endif
+#endif /* !__ASSEMBLY__ */
+
/*
* These aren't exported outside the kernel to avoid name space clashes
*/
#ifdef __KERNEL__
+#define BITS_PER_LONG 32
+
+#ifndef __ASSEMBLY__
+
typedef signed char s8;
typedef unsigned char u8;
@@ -49,14 +55,12 @@ typedef unsigned int u32;
typedef signed long long s64;
typedef unsigned long long u64;
-#define BITS_PER_LONG 32
-
/* Dma addresses are 32-bits wide. */
typedef u32 dma_addr_t;
-#endif /* __KERNEL__ */
-
#endif /* !__ASSEMBLY__ */
+#endif /* __KERNEL__ */
+
#endif /* __V850_TYPES_H__ */
diff --git a/include/asm-x86_64/types.h b/include/asm-x86_64/types.h
index 8192e910bb4b..5b2dc01b7969 100644
--- a/include/asm-x86_64/types.h
+++ b/include/asm-x86_64/types.h
@@ -1,6 +1,8 @@
#ifndef _X86_64_TYPES_H
#define _X86_64_TYPES_H
+#ifndef __ASSEMBLY__
+
typedef unsigned short umode_t;
/*
@@ -20,11 +22,17 @@ typedef unsigned int __u32;
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
+#endif /* __ASSEMBLY__ */
+
/*
* These aren't exported outside the kernel to avoid name space clashes
*/
#ifdef __KERNEL__
+#define BITS_PER_LONG 64
+
+#ifndef __ASSEMBLY__
+
typedef signed char s8;
typedef unsigned char u8;
@@ -37,8 +45,6 @@ typedef unsigned int u32;
typedef signed long long s64;
typedef unsigned long long u64;
-#define BITS_PER_LONG 64
-
typedef u64 dma64_addr_t;
typedef u64 dma_addr_t;
@@ -47,6 +53,8 @@ typedef u64 sector_t;
#define HAVE_SECTOR_T
#endif
+#endif /* __ASSEMBLY__ */
+
#endif /* __KERNEL__ */
#endif
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index f88889740949..99aab023173f 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -17,10 +17,9 @@
* Allow us to mark functions as 'deprecated' and have gcc emit a nice
* warning for each use, in hopes of speeding the functions removal.
* Usage is:
- * int deprecated foo(void)
- * and then gcc will emit a warning for each usage of the function.
+ * int __deprecated foo(void)
*/
-#if __GNUC__ >= 3
+#if ( __GNUC__ == 3 && __GNUC_MINOR > 0 ) || __GNUC__ > 3
#define __deprecated __attribute__((deprecated))
#else
#define __deprecated
diff --git a/include/linux/i2c-dev.h b/include/linux/i2c-dev.h
index ee6ddba913bb..84bede1ed6ac 100644
--- a/include/linux/i2c-dev.h
+++ b/include/linux/i2c-dev.h
@@ -21,9 +21,8 @@
/* $Id: i2c-dev.h,v 1.11 2002/07/07 15:42:47 mds Exp $ */
-#ifndef I2C_DEV_H
-#define I2C_DEV_H
-
+#ifndef _LINUX_I2C_DEV_H
+#define _LINUX_I2C_DEV_H
#include <linux/types.h>
#include <linux/i2c.h>
@@ -45,174 +44,4 @@ struct i2c_rdwr_ioctl_data {
int nmsgs; /* number of i2c_msgs */
};
-#ifndef __KERNEL__
-
-#include <sys/ioctl.h>
-
-static inline __s32 i2c_smbus_access(int file, char read_write, __u8 command,
- int size, union i2c_smbus_data *data)
-{
- struct i2c_smbus_ioctl_data args;
-
- args.read_write = read_write;
- args.command = command;
- args.size = size;
- args.data = data;
- return ioctl(file,I2C_SMBUS,&args);
-}
-
-
-static inline __s32 i2c_smbus_write_quick(int file, __u8 value)
-{
- return i2c_smbus_access(file,value,0,I2C_SMBUS_QUICK,NULL);
-}
-
-static inline __s32 i2c_smbus_read_byte(int file)
-{
- union i2c_smbus_data data;
- if (i2c_smbus_access(file,I2C_SMBUS_READ,0,I2C_SMBUS_BYTE,&data))
- return -1;
- else
- return 0x0FF & data.byte;
-}
-
-static inline __s32 i2c_smbus_write_byte(int file, __u8 value)
-{
- return i2c_smbus_access(file,I2C_SMBUS_WRITE,value,
- I2C_SMBUS_BYTE,NULL);
-}
-
-static inline __s32 i2c_smbus_read_byte_data(int file, __u8 command)
-{
- union i2c_smbus_data data;
- if (i2c_smbus_access(file,I2C_SMBUS_READ,command,
- I2C_SMBUS_BYTE_DATA,&data))
- return -1;
- else
- return 0x0FF & data.byte;
-}
-
-static inline __s32 i2c_smbus_write_byte_data(int file, __u8 command,
- __u8 value)
-{
- union i2c_smbus_data data;
- data.byte = value;
- return i2c_smbus_access(file,I2C_SMBUS_WRITE,command,
- I2C_SMBUS_BYTE_DATA, &data);
-}
-
-static inline __s32 i2c_smbus_read_word_data(int file, __u8 command)
-{
- union i2c_smbus_data data;
- if (i2c_smbus_access(file,I2C_SMBUS_READ,command,
- I2C_SMBUS_WORD_DATA,&data))
- return -1;
- else
- return 0x0FFFF & data.word;
-}
-
-static inline __s32 i2c_smbus_write_word_data(int file, __u8 command,
- __u16 value)
-{
- union i2c_smbus_data data;
- data.word = value;
- return i2c_smbus_access(file,I2C_SMBUS_WRITE,command,
- I2C_SMBUS_WORD_DATA, &data);
-}
-
-static inline __s32 i2c_smbus_process_call(int file, __u8 command, __u16 value)
-{
- union i2c_smbus_data data;
- data.word = value;
- if (i2c_smbus_access(file,I2C_SMBUS_WRITE,command,
- I2C_SMBUS_PROC_CALL,&data))
- return -1;
- else
- return 0x0FFFF & data.word;
-}
-
-
-/* Returns the number of read bytes */
-static inline __s32 i2c_smbus_read_block_data(int file, __u8 command,
- __u8 *values)
-{
- union i2c_smbus_data data;
- int i;
- if (i2c_smbus_access(file,I2C_SMBUS_READ,command,
- I2C_SMBUS_BLOCK_DATA,&data))
- return -1;
- else {
- for (i = 1; i <= data.block[0]; i++)
- values[i-1] = data.block[i];
- return data.block[0];
- }
-}
-
-static inline __s32 i2c_smbus_write_block_data(int file, __u8 command,
- __u8 length, __u8 *values)
-{
- union i2c_smbus_data data;
- int i;
- if (length > 32)
- length = 32;
- for (i = 1; i <= length; i++)
- data.block[i] = values[i-1];
- data.block[0] = length;
- return i2c_smbus_access(file,I2C_SMBUS_WRITE,command,
- I2C_SMBUS_BLOCK_DATA, &data);
-}
-
-/* Returns the number of read bytes */
-static inline __s32 i2c_smbus_read_i2c_block_data(int file, __u8 command,
- __u8 *values)
-{
- union i2c_smbus_data data;
- int i;
- if (i2c_smbus_access(file,I2C_SMBUS_READ,command,
- I2C_SMBUS_I2C_BLOCK_DATA,&data))
- return -1;
- else {
- for (i = 1; i <= data.block[0]; i++)
- values[i-1] = data.block[i];
- return data.block[0];
- }
-}
-
-static inline __s32 i2c_smbus_write_i2c_block_data(int file, __u8 command,
- __u8 length, __u8 *values)
-{
- union i2c_smbus_data data;
- int i;
- if (length > 32)
- length = 32;
- for (i = 1; i <= length; i++)
- data.block[i] = values[i-1];
- data.block[0] = length;
- return i2c_smbus_access(file,I2C_SMBUS_WRITE,command,
- I2C_SMBUS_I2C_BLOCK_DATA, &data);
-}
-
-/* Returns the number of read bytes */
-static inline __s32 i2c_smbus_block_process_call(int file, __u8 command,
- __u8 length, __u8 *values)
-{
- union i2c_smbus_data data;
- int i;
- if (length > 32)
- length = 32;
- for (i = 1; i <= length; i++)
- data.block[i] = values[i-1];
- data.block[0] = length;
- if (i2c_smbus_access(file,I2C_SMBUS_WRITE,command,
- I2C_SMBUS_BLOCK_PROC_CALL,&data))
- return -1;
- else {
- for (i = 1; i <= data.block[0]; i++)
- values[i-1] = data.block[i];
- return data.block[0];
- }
-}
-
-#endif /* ndef __KERNEL__ */
-
-#endif
+#endif /* _LINUX_I2C_DEV_H */
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 765a95af3a4e..c176ca672cc7 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -25,31 +25,17 @@
/* $Id: i2c.h,v 1.59 2002/07/19 20:53:45 phil Exp $ */
-#ifndef I2C_H
-#define I2C_H
+#ifndef _LINUX_I2C_H
+#define _LINUX_I2C_H
#define I2C_DATE "20020719"
#define I2C_VERSION "2.6.4"
#include <linux/i2c-id.h> /* id values of adapters et. al. */
#include <linux/types.h>
-
-
-struct i2c_msg;
-
-
-#ifdef __KERNEL__
-
-/* --- Includes and compatibility declarations ------------------------ */
-
-#include <linux/version.h>
-#ifndef KERNEL_VERSION
-#define KERNEL_VERSION(a,b,c) (((a) << 16) | ((b) << 8) | (c))
-#endif
-
-#include <asm/page.h> /* for 2.2.xx */
-#include <asm/semaphore.h>
#include <linux/config.h>
+#include <asm/semaphore.h>
+
/* --- General options ------------------------------------------------ */
@@ -59,6 +45,7 @@ struct i2c_msg;
#define I2C_CLIENT_MAX 32
#define I2C_DUMMY_MAX 4
+struct i2c_msg;
struct i2c_algorithm;
struct i2c_adapter;
struct i2c_client;
@@ -212,10 +199,6 @@ struct i2c_algorithm {
u32 (*functionality) (struct i2c_adapter *);
};
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,29)
-struct proc_dir_entry;
-#endif
-
/*
* i2c_adapter is the structure used to identify a physical i2c bus along
* with the access algorithms necessary to access it.
@@ -250,9 +233,6 @@ struct i2c_adapter {
#ifdef CONFIG_PROC_FS
/* No need to set this when you initialize the adapter */
int inode;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,29)
- struct proc_dir_entry *proc_entry;
-#endif
#endif /* def CONFIG_PROC_FS */
};
@@ -355,8 +335,6 @@ extern u32 i2c_get_functionality (struct i2c_adapter *adap);
/* Return 1 if adapter supports everything we need, 0 if not. */
extern int i2c_check_functionality (struct i2c_adapter *adap, u32 func);
-#endif /* __KERNEL__ */
-
/*
* I2C Message - used for pure i2c transaction, also from /dev interface
*/
@@ -506,8 +484,6 @@ union i2c_smbus_data {
#define I2C_MAJOR 89 /* Device major number */
-#ifdef __KERNEL__
-
# ifndef NULL
# define NULL ( (void *) 0 )
# endif
@@ -577,5 +553,4 @@ union i2c_smbus_data {
#define i2c_is_isa_adapter(adapptr) \
((adapptr)->algo->id == I2C_ALGO_ISA)
-#endif /* def __KERNEL__ */
-#endif /* I2C_H */
+#endif /* _LINUX_I2C_H */
diff --git a/include/linux/isapnp.h b/include/linux/isapnp.h
index 7008adef1677..3e03c39fbc40 100644
--- a/include/linux/isapnp.h
+++ b/include/linux/isapnp.h
@@ -24,6 +24,7 @@
#include <linux/config.h>
#include <linux/errno.h>
+#include <linux/pnp.h>
/*
* Configuration registers (TODO: change by specification)
@@ -54,79 +55,7 @@
#ifdef __KERNEL__
-#include <linux/pci.h>
-
-#define ISAPNP_PORT_FLAG_16BITADDR (1<<0)
-#define ISAPNP_PORT_FLAG_FIXED (1<<1)
-
-struct isapnp_port {
- unsigned short min; /* min base number */
- unsigned short max; /* max base number */
- unsigned char align; /* align boundary */
- unsigned char size; /* size of range */
- unsigned char flags; /* port flags */
- unsigned char pad; /* pad */
- struct isapnp_resources *res; /* parent */
- struct isapnp_port *next; /* next port */
-};
-
-struct isapnp_irq {
- unsigned short map; /* bitmaks for IRQ lines */
- unsigned char flags; /* IRQ flags */
- unsigned char pad; /* pad */
- struct isapnp_resources *res; /* parent */
- struct isapnp_irq *next; /* next IRQ */
-};
-
-struct isapnp_dma {
- unsigned char map; /* bitmask for DMA channels */
- unsigned char flags; /* DMA flags */
- struct isapnp_resources *res; /* parent */
- struct isapnp_dma *next; /* next port */
-};
-
-struct isapnp_mem {
- unsigned int min; /* min base number */
- unsigned int max; /* max base number */
- unsigned int align; /* align boundary */
- unsigned int size; /* size of range */
- unsigned char flags; /* memory flags */
- unsigned char pad; /* pad */
- struct isapnp_resources *res; /* parent */
- struct isapnp_mem *next; /* next memory resource */
-};
-
-struct isapnp_mem32 {
- /* TODO */
- unsigned char data[17];
- struct isapnp_resources *res; /* parent */
- struct isapnp_mem32 *next; /* next 32-bit memory resource */
-};
-
-struct isapnp_fixup {
- unsigned short vendor; /* matching vendor */
- unsigned short device; /* matching device */
- void (*quirk_function)(struct pci_dev *dev); /* fixup function */
-};
-
-
-#define ISAPNP_RES_PRIORITY_PREFERRED 0
-#define ISAPNP_RES_PRIORITY_ACCEPTABLE 1
-#define ISAPNP_RES_PRIORITY_FUNCTIONAL 2
-#define ISAPNP_RES_PRIORITY_INVALID 65535
-
-struct isapnp_resources {
- unsigned short priority; /* priority */
- unsigned short dependent; /* dependent resources */
- struct isapnp_port *port; /* first port */
- struct isapnp_irq *irq; /* first IRQ */
- struct isapnp_dma *dma; /* first DMA */
- struct isapnp_mem *mem; /* first memory resource */
- struct isapnp_mem32 *mem32; /* first 32-bit memory */
- struct pci_dev *dev; /* parent */
- struct isapnp_resources *alt; /* alternative resource (aka dependent resources) */
- struct isapnp_resources *next; /* next resource */
-};
+#define DEVICE_COUNT_COMPATIBLE 4
#define ISAPNP_ANY_ID 0xffff
#define ISAPNP_CARD_DEVS 8
@@ -162,14 +91,6 @@ struct isapnp_device_id {
unsigned long driver_data; /* data private to the driver */
};
-struct isapnp_driver {
- struct list_head node;
- char *name;
- const struct isapnp_device_id *id_table; /* NULL if wants all devices */
- int (*probe) (struct pci_dev *dev, const struct isapnp_device_id *id); /* New device inserted */
- void (*remove) (struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */
-};
-
#if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE) && defined(MODULE))
#define __ISAPNP__
@@ -188,7 +109,6 @@ void isapnp_wake(unsigned char csn);
void isapnp_device(unsigned char device);
void isapnp_activate(unsigned char device);
void isapnp_deactivate(unsigned char device);
-void isapnp_fixup_device(struct pci_dev *dev);
void *isapnp_alloc(long size);
#ifdef CONFIG_PROC_FS
@@ -199,40 +119,8 @@ static inline isapnp_proc_init(void) { return 0; }
static inline isapnp_proc_done(void) { return 0; }
#endif
-/* misc */
-void isapnp_resource_change(struct resource *resource,
- unsigned long start,
- unsigned long size);
/* init/main.c */
int isapnp_init(void);
-/* manager */
-static inline struct pci_bus *isapnp_find_card(unsigned short vendor,
- unsigned short device,
- struct pci_bus *from) { return NULL; }
-static inline struct pci_dev *isapnp_find_dev(struct pci_bus *card,
- unsigned short vendor,
- unsigned short function,
- struct pci_dev *from) { return NULL; }
-static inline int isapnp_probe_cards(const struct isapnp_card_id *ids,
- int (*probe)(struct pci_bus *card,
- const struct isapnp_card_id *id)) { return -ENODEV; }
-static inline int isapnp_probe_devs(const struct isapnp_device_id *ids,
- int (*probe)(struct pci_dev *dev,
- const struct isapnp_device_id *id)) { return -ENODEV; }
-static inline int isapnp_activate_dev(struct pci_dev *dev, const char *name) { return -ENODEV; }
-
-static inline int isapnp_register_driver(struct isapnp_driver *drv) { return 0; }
-
-static inline void isapnp_unregister_driver(struct isapnp_driver *drv) { }
-
-extern struct list_head isapnp_cards;
-extern struct list_head isapnp_devices;
-extern struct pnp_protocol isapnp_protocol;
-
-#define isapnp_for_each_card(card) \
- for(card = to_pnp_card(isapnp_cards.next); card != to_pnp_card(&isapnp_cards); card = to_pnp_card(card->node.next))
-#define isapnp_for_each_dev(dev) \
- for(dev = protocol_to_pnp_dev(isapnp_protocol.devices.next); dev != protocol_to_pnp_dev(&isapnp_protocol.devices); dev = protocol_to_pnp_dev(dev->dev_list.next))
#else /* !CONFIG_ISAPNP */
@@ -250,28 +138,6 @@ static inline void isapnp_wake(unsigned char csn) { ; }
static inline void isapnp_device(unsigned char device) { ; }
static inline void isapnp_activate(unsigned char device) { ; }
static inline void isapnp_deactivate(unsigned char device) { ; }
-/* manager */
-static inline struct pci_bus *isapnp_find_card(unsigned short vendor,
- unsigned short device,
- struct pci_bus *from) { return NULL; }
-static inline struct pci_dev *isapnp_find_dev(struct pci_bus *card,
- unsigned short vendor,
- unsigned short function,
- struct pci_dev *from) { return NULL; }
-static inline int isapnp_probe_cards(const struct isapnp_card_id *ids,
- int (*probe)(struct pci_bus *card,
- const struct isapnp_card_id *id)) { return -ENODEV; }
-static inline int isapnp_probe_devs(const struct isapnp_device_id *ids,
- int (*probe)(struct pci_dev *dev,
- const struct isapnp_device_id *id)) { return -ENODEV; }
-static inline void isapnp_resource_change(struct resource *resource,
- unsigned long start,
- unsigned long size) { ; }
-static inline int isapnp_activate_dev(struct pci_dev *dev, const char *name) { return -ENODEV; }
-
-static inline int isapnp_register_driver(struct isapnp_driver *drv) { return 0; }
-
-static inline void isapnp_unregister_driver(struct isapnp_driver *drv) { }
#endif /* CONFIG_ISAPNP */
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h
index dcba85045308..d2a90b7766a1 100644
--- a/include/linux/kallsyms.h
+++ b/include/linux/kallsyms.h
@@ -12,7 +12,7 @@
const char *kallsyms_lookup(unsigned long addr,
unsigned long *symbolsize,
unsigned long *offset,
- char **modname);
+ char **modname, char *namebuf);
/* Replace "%s" in format with address, if found */
extern void __print_symbol(const char *fmt, unsigned long address);
@@ -22,7 +22,7 @@ extern void __print_symbol(const char *fmt, unsigned long address);
static inline const char *kallsyms_lookup(unsigned long addr,
unsigned long *symbolsize,
unsigned long *offset,
- char **modname)
+ char **modname, char *namebuf)
{
return NULL;
}
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h
index a15a7ac2f6a3..9e2f1923ce5c 100644
--- a/include/linux/ncp_fs.h
+++ b/include/linux/ncp_fs.h
@@ -248,7 +248,7 @@ int ncp_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
/* linux/fs/ncpfs/sock.c */
int ncp_request2(struct ncp_server *server, int function,
void* reply, int max_reply_size);
-static int inline ncp_request(struct ncp_server *server, int function) {
+static inline int ncp_request(struct ncp_server *server, int function) {
return ncp_request2(server, function, server->packet, server->packet_size);
}
int ncp_connect(struct ncp_server *server);
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 9d4e269ac1db..7b693e39425f 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -362,7 +362,7 @@ enum pci_mmap_state {
#define PCI_ANY_ID (~0)
/*
- * The pci_dev structure is used to describe both PCI and ISAPnP devices.
+ * The pci_dev structure is used to describe PCI devices.
*/
struct pci_dev {
struct list_head global_list; /* node in list of all PCI devices */
@@ -410,16 +410,9 @@ struct pci_dev {
struct resource irq_resource[DEVICE_COUNT_IRQ];
char slot_name[8]; /* slot name */
- int active; /* ISAPnP: device is active */
- int ro; /* ISAPnP: read only */
- unsigned short regs; /* ISAPnP: supported registers */
/* These fields are used by common fixups */
- unsigned short transparent:1; /* Transparent PCI bridge */
-
- int (*prepare)(struct pci_dev *dev); /* ISAPnP hooks */
- int (*activate)(struct pci_dev *dev);
- int (*deactivate)(struct pci_dev *dev);
+ unsigned int transparent:1; /* Transparent PCI bridge */
};
#define pci_dev_g(n) list_entry(n, struct pci_dev, global_list)
@@ -463,13 +456,7 @@ struct pci_bus {
unsigned char subordinate; /* max number of subordinate buses */
char name[48];
- unsigned short vendor;
- unsigned short device;
- unsigned int serial; /* serial number */
- unsigned char pnpver; /* Plug & Play version */
- unsigned char productver; /* product version */
- unsigned char checksum; /* if zero - checksum passed */
- unsigned char pad1;
+
struct device * dev;
};
@@ -605,23 +592,23 @@ static inline int pci_read_config_byte(struct pci_dev *dev, int where, u8 *val)
{
return pci_bus_read_config_byte (dev->bus, dev->devfn, where, val);
}
-static int inline pci_read_config_word(struct pci_dev *dev, int where, u16 *val)
+static inline int pci_read_config_word(struct pci_dev *dev, int where, u16 *val)
{
return pci_bus_read_config_word (dev->bus, dev->devfn, where, val);
}
-static int inline pci_read_config_dword(struct pci_dev *dev, int where, u32 *val)
+static inline int pci_read_config_dword(struct pci_dev *dev, int where, u32 *val)
{
return pci_bus_read_config_dword (dev->bus, dev->devfn, where, val);
}
-static int inline pci_write_config_byte(struct pci_dev *dev, int where, u8 val)
+static inline int pci_write_config_byte(struct pci_dev *dev, int where, u8 val)
{
return pci_bus_write_config_byte (dev->bus, dev->devfn, where, val);
}
-static int inline pci_write_config_word(struct pci_dev *dev, int where, u16 val)
+static inline int pci_write_config_word(struct pci_dev *dev, int where, u16 val)
{
return pci_bus_write_config_word (dev->bus, dev->devfn, where, val);
}
-static int inline pci_write_config_dword(struct pci_dev *dev, int where, u32 val)
+static inline int pci_write_config_dword(struct pci_dev *dev, int where, u32 val)
{
return pci_bus_write_config_dword (dev->bus, dev->devfn, where, val);
}
diff --git a/include/linux/pnp.h b/include/linux/pnp.h
index d666c6a92b9f..7d4e9fd6ae0e 100644
--- a/include/linux/pnp.h
+++ b/include/linux/pnp.h
@@ -26,6 +26,7 @@
struct pnp_resource;
struct pnp_protocol;
struct pnp_id;
+struct pnp_cfg;
struct pnp_card {
char name[80];
@@ -50,11 +51,15 @@ struct pnp_card {
#define global_to_pnp_card(n) list_entry(n, struct pnp_card, global_list)
#define protocol_to_pnp_card(n) list_entry(n, struct pnp_card, protocol_list)
-#define to_pnp_card(n) list_entry(n, struct pnp_card, dev)
+#define to_pnp_card(n) container_of(n, struct pnp_card, dev)
#define pnp_for_each_card(card) \
- for(dev = global_to_pnp_card(pnp_cards.next); \
- dev != global_to_pnp_card(&cards); \
- dev = global_to_pnp_card(card>global_list.next))
+ for((card) = global_to_pnp_card(pnp_cards.next); \
+ (card) != global_to_pnp_card(&pnp_cards); \
+ (card) = global_to_pnp_card((card)->global_list.next))
+#define pnp_card_for_each_dev(card,dev) \
+ for((dev) = card_to_pnp_dev((card)->devices.next); \
+ (dev) != card_to_pnp_dev(&(card)->devices); \
+ (dev) = card_to_pnp_dev((dev)->card_list.next))
static inline void *pnpc_get_drvdata (struct pnp_card *pcard)
{
@@ -79,7 +84,6 @@ static inline void pnpc_set_protodata (struct pnp_card *pcard, void *data)
struct pnp_dev {
char name[80]; /* device name */
int active; /* status of the device */
- int ro; /* read only */
struct list_head global_list; /* node in global list of devices */
struct list_head protocol_list; /* node in list of device's protocol */
struct list_head card_list; /* node in card's list of devices */
@@ -93,6 +97,7 @@ struct pnp_dev {
unsigned short regs; /* ISAPnP: supported registers */
struct pnp_resources *res; /* possible resource information */
+ int lock_resources; /* resources are locked */
struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */
struct resource dma_resource[DEVICE_COUNT_DMA];
struct resource irq_resource[DEVICE_COUNT_IRQ];
@@ -112,6 +117,13 @@ struct pnp_dev {
dev != global_to_pnp_dev(&pnp_global); \
dev = global_to_pnp_dev(dev->global_list.next))
+static inline int pnp_dev_has_driver(struct pnp_dev *pdev)
+{
+ if (pdev->driver || (pdev->card && pdev->card->driver))
+ return 1;
+ return 0;
+}
+
static inline void *pnp_get_drvdata (struct pnp_dev *pdev)
{
return dev_get_drvdata(&pdev->dev);
@@ -160,10 +172,13 @@ struct pnp_card_id {
} devs[MAX_DEVICES]; /* logical devices */
};
+#define PNP_DRIVER_DO_NOT_ACTIVATE (1<<0)
+
struct pnp_driver {
struct list_head node;
char *name;
const struct pnp_device_id *id_table;
+ unsigned int flags;
int (*probe) (struct pnp_dev *dev, const struct pnp_device_id *dev_id);
void (*remove) (struct pnp_dev *dev);
struct device_driver driver;
@@ -171,10 +186,13 @@ struct pnp_driver {
#define to_pnp_driver(drv) container_of(drv,struct pnp_driver, driver)
+#define PNPC_DRIVER_DO_NOT_ACTIVATE (1<<0)
+
struct pnpc_driver {
struct list_head node;
char *name;
const struct pnp_card_id *id_table;
+ unsigned int flags;
int (*probe) (struct pnp_card *card, const struct pnp_card_id *card_id);
void (*remove) (struct pnp_card *card);
struct device_driver driver;
@@ -279,6 +297,12 @@ struct pnp_resources {
struct pnp_resources *dep; /* dependent resources */
};
+struct pnp_res_cfg {
+ struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */
+ struct resource dma_resource[DEVICE_COUNT_DMA];
+ struct resource irq_resource[DEVICE_COUNT_IRQ];
+};
+
#define PNP_DYNAMIC 0 /* get or set current resource */
#define PNP_STATIC 1 /* get or set resource for next boot */
@@ -287,7 +311,7 @@ struct pnp_cfg {
struct pnp_irq *irq[2];
struct pnp_dma *dma[2];
struct pnp_mem *mem[4];
- struct pnp_dev request;
+ struct pnp_res_cfg request;
};
@@ -340,9 +364,11 @@ int pnp_add_dma_resource(struct pnp_dev *dev, int depnum, struct pnp_dma *data);
int pnp_add_port_resource(struct pnp_dev *dev, int depnum, struct pnp_port *data);
int pnp_add_mem_resource(struct pnp_dev *dev, int depnum, struct pnp_mem *data);
int pnp_add_mem32_resource(struct pnp_dev *dev, int depnum, struct pnp_mem32 *data);
-int pnp_activate_dev(struct pnp_dev *dev);
+int pnp_init_res_cfg(struct pnp_res_cfg *template);
+int pnp_activate_dev(struct pnp_dev *dev, struct pnp_res_cfg *template);
int pnp_disable_dev(struct pnp_dev *dev);
-int pnp_raw_set_dev(struct pnp_dev *dev, int depnum, int mode);
+int pnp_raw_set_dev(struct pnp_dev *dev, int depnum, struct pnp_res_cfg *template, int mode);
+void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size);
/* driver */
int compare_pnp_id(struct pnp_id * pos, const char * id);
@@ -366,9 +392,10 @@ static inline int pnp_add_dma_resource(struct pnp_dev *dev, int depnum, struct p
static inline int pnp_add_port_resource(struct pnp_dev *dev, int depnum, struct pnp_irq *data) { return -ENODEV; }
static inline int pnp_add_mem_resource(struct pnp_dev *dev, int depnum, struct pnp_irq *data) { return -ENODEV; }
static inline int pnp_add_mem32_resource(struct pnp_dev *dev, int depnum, struct pnp_irq *data) { return -ENODEV; }
-static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; }
+static inline int pnp_init_res_cfg(struct pnp_res_cfg *template) { return -ENODEV; }
+static inline int pnp_activate_dev(struct pnp_dev *dev, struct pnp_res_cfg *template) { return -ENODEV; }
static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; }
-static inline int pnp_raw_set_dev(struct pnp_dev *dev, int depnum, int mode) { return -ENODEV; }
+static inline int pnp_raw_set_dev(struct pnp_dev *dev, int depnum, struct pnp_res_cfg *template, int mode) { return -ENODEV; }
static inline int compare_pnp_id(struct list_head * id_list, const char * id) { return -ENODEV; }
static inline int pnp_add_id(struct pnp_id *id, struct pnp_dev *dev) { return -ENODEV; }
static inline int pnp_register_driver(struct pnp_driver *drv) { return -ENODEV; }
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h
index 3d37e47dd968..74e53a04907e 100644
--- a/include/linux/sunrpc/cache.h
+++ b/include/linux/sunrpc/cache.h
@@ -244,7 +244,7 @@ static inline struct cache_head *cache_get(struct cache_head *h)
}
-static int inline cache_put(struct cache_head *h, struct cache_detail *cd)
+static inline int cache_put(struct cache_head *h, struct cache_detail *cd)
{
atomic_dec(&h->refcnt);
if (!atomic_read(&h->refcnt) &&
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index cb36271f1376..9408ba6dbe34 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -171,7 +171,7 @@ xdr_ressize_check(struct svc_rqst *rqstp, u32 *p)
return vec->iov_len <= PAGE_SIZE;
}
-static int inline svc_take_page(struct svc_rqst *rqstp)
+static inline int svc_take_page(struct svc_rqst *rqstp)
{
if (rqstp->rq_arghi <= rqstp->rq_argused)
return -ENOMEM;
@@ -180,7 +180,7 @@ static int inline svc_take_page(struct svc_rqst *rqstp)
return 0;
}
-static void inline svc_pushback_allpages(struct svc_rqst *rqstp)
+static inline void svc_pushback_allpages(struct svc_rqst *rqstp)
{
while (rqstp->rq_resused) {
if (rqstp->rq_respages[--rqstp->rq_resused] == NULL)
@@ -191,7 +191,7 @@ static void inline svc_pushback_allpages(struct svc_rqst *rqstp)
}
}
-static void inline svc_pushback_unused_pages(struct svc_rqst *rqstp)
+static inline void svc_pushback_unused_pages(struct svc_rqst *rqstp)
{
while (rqstp->rq_resused) {
if (rqstp->rq_respages[--rqstp->rq_resused] != NULL) {
@@ -204,7 +204,7 @@ static void inline svc_pushback_unused_pages(struct svc_rqst *rqstp)
}
}
-static void inline svc_free_allpages(struct svc_rqst *rqstp)
+static inline void svc_free_allpages(struct svc_rqst *rqstp)
{
while (rqstp->rq_resused) {
if (rqstp->rq_respages[--rqstp->rq_resused] == NULL)
diff --git a/include/linux/types.h b/include/linux/types.h
index 87985824b16e..94ceb057eb64 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -6,6 +6,8 @@
#define DECLARE_BITMAP(name,bits) \
unsigned long name[((bits)+BITS_PER_LONG-1)/BITS_PER_LONG]
+#define CLEAR_BITMAP(name,bits) \
+ memset(name, 0, ((bits)+BITS_PER_LONG-1)/8)
#endif
#include <linux/posix_types.h>
diff --git a/include/video/tgafb.h b/include/video/tgafb.h
index fbfae108a525..0e76dda6fc4d 100644
--- a/include/video/tgafb.h
+++ b/include/video/tgafb.h
@@ -31,7 +31,10 @@
#define TGA_24PLANE_FB_OFFSET 0x0804000
#define TGA_24PLUSZ_FB_OFFSET 0x1004000
+#define TGA_FOREGROUND_REG 0x0020
+#define TGA_BACKGROUND_REG 0x0024
#define TGA_PLANEMASK_REG 0x0028
+#define TGA_PIXELMASK_ONESHOT_REG 0x002c
#define TGA_MODE_REG 0x0030
#define TGA_RASTEROP_REG 0x0034
#define TGA_PIXELSHIFT_REG 0x0038
@@ -47,6 +50,14 @@
#define TGA_RAMDAC_SETUP_REG 0x00c0
#define TGA_BLOCK_COLOR0_REG 0x0140
#define TGA_BLOCK_COLOR1_REG 0x0144
+#define TGA_BLOCK_COLOR2_REG 0x0148
+#define TGA_BLOCK_COLOR3_REG 0x014c
+#define TGA_BLOCK_COLOR4_REG 0x0150
+#define TGA_BLOCK_COLOR5_REG 0x0154
+#define TGA_BLOCK_COLOR6_REG 0x0158
+#define TGA_BLOCK_COLOR7_REG 0x015c
+#define TGA_COPY64_SRC 0x0160
+#define TGA_COPY64_DST 0x0164
#define TGA_CLOCK_REG 0x01e8
#define TGA_RAMDAC_REG 0x01f0
#define TGA_CMD_STAT_REG 0x01f8
@@ -76,6 +87,22 @@
#define TGA_VALID_BLANK 0x02
#define TGA_VALID_CURSOR 0x04
+#define TGA_MODE_SBM_8BPP 0x000
+#define TGA_MODE_SBM_24BPP 0x300
+
+#define TGA_MODE_SIMPLE 0x00
+#define TGA_MODE_SIMPLEZ 0x10
+#define TGA_MODE_OPAQUE_STIPPLE 0x01
+#define TGA_MODE_OPAQUE_FILL 0x21
+#define TGA_MODE_TRANSPARENT_STIPPLE 0x03
+#define TGA_MODE_TRANSPARENT_FILL 0x23
+#define TGA_MODE_BLOCK_STIPPLE 0x0d
+#define TGA_MODE_BLOCK_FILL 0x2d
+#define TGA_MODE_COPY 0x07
+#define TGA_MODE_DMA_READ_COPY_ND 0x17
+#define TGA_MODE_DMA_READ_COPY_D 0x37
+#define TGA_MODE_DMA_WRITE_COPY 0x1f
+
/*
* Useful defines for managing the ICS1562 PLL clock