summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acpi.h2
-rw-r--r--include/linux/cyclades.h2
-rw-r--r--include/linux/dcache.h2
-rw-r--r--include/linux/ethtool.h4
-rw-r--r--include/linux/fs.h6
-rw-r--r--include/linux/ghash.h218
-rw-r--r--include/linux/i2c-proc.h3
-rw-r--r--include/linux/if.h2
-rw-r--r--include/linux/ipmi.h2
-rw-r--r--include/linux/jiffies.h2
-rw-r--r--include/linux/mm.h12
-rw-r--r--include/linux/n_r3964.h2
-rw-r--r--include/linux/net.h32
-rw-r--r--include/linux/rwsem-spinlock.h2
-rw-r--r--include/linux/sdla_x25.h2
-rw-r--r--include/linux/serial.h1
-rw-r--r--include/linux/serial_core.h11
-rw-r--r--include/linux/telephony.h2
-rw-r--r--include/linux/time.h6
-rw-r--r--include/linux/xattr.h5
20 files changed, 56 insertions, 262 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 0e701c0c2c34..26e04ac5ebca 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -79,7 +79,7 @@ typedef struct {
struct acpi_table_rsdt {
struct acpi_table_header header;
- u32 entry[1];
+ u32 entry[8];
} __attribute__ ((packed));
/* Extended System Description Table (XSDT) */
diff --git a/include/linux/cyclades.h b/include/linux/cyclades.h
index 4d6235fb96cf..85fa5a42642d 100644
--- a/include/linux/cyclades.h
+++ b/include/linux/cyclades.h
@@ -141,7 +141,7 @@ struct CYZ_BOOT_CTRL {
/****************** ****************** *******************/
/*
* The data types defined below are used in all ZFIRM interface
- * data structures. They accomodate differences between HW
+ * data structures. They accommodate differences between HW
* architectures and compilers.
*/
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 339a770eedbd..bb9e6b8b15c2 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -262,6 +262,8 @@ extern char * d_path(struct dentry *, struct vfsmount *, char *, int);
static __inline__ struct dentry * dget(struct dentry *dentry)
{
if (dentry) {
+ if (!atomic_read(&dentry->d_count))
+ BUG();
atomic_inc(&dentry->d_count);
dentry->d_vfs_flags |= DCACHE_REFERENCED;
}
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index e672ac588767..9856a89ee414 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -22,7 +22,7 @@ struct ethtool_cmd {
u8 duplex; /* Duplex, half or full */
u8 port; /* Which connector port */
u8 phy_address;
- u8 transceiver; /* Which tranceiver to use */
+ u8 transceiver; /* Which transceiver to use */
u8 autoneg; /* Enable or disable autonegotiation */
u32 maxtxpkt; /* Tx pkts before generating tx int */
u32 maxrxpkt; /* Rx pkts before generating rx int */
@@ -336,7 +336,7 @@ struct ethtool_stats {
#define PORT_FIBRE 0x03
#define PORT_BNC 0x04
-/* Which tranceiver to use. */
+/* Which transceiver to use. */
#define XCVR_INTERNAL 0x00
#define XCVR_EXTERNAL 0x01
#define XCVR_DUMMY1 0x02
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 8a59101ca774..51d5ab2c19a5 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -743,9 +743,9 @@ struct inode_operations {
int (*setattr) (struct dentry *, struct iattr *);
int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
- ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t,int);
- ssize_t (*listxattr) (struct dentry *, char *, size_t, int);
- int (*removexattr) (struct dentry *, const char *, int);
+ ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
+ ssize_t (*listxattr) (struct dentry *, char *, size_t);
+ int (*removexattr) (struct dentry *, const char *);
};
struct seq_file;
diff --git a/include/linux/ghash.h b/include/linux/ghash.h
deleted file mode 100644
index 278f6c2f630d..000000000000
--- a/include/linux/ghash.h
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * include/linux/ghash.h -- generic hashing with fuzzy retrieval
- *
- * (C) 1997 Thomas Schoebel-Theuer
- *
- * The algorithms implemented here seem to be a completely new invention,
- * and I'll publish the fundamentals in a paper.
- */
-
-#ifndef _GHASH_H
-#define _GHASH_H
-/* HASHSIZE _must_ be a power of two!!! */
-
-
-#define DEF_HASH_FUZZY_STRUCTS(NAME,HASHSIZE,TYPE) \
-\
-struct NAME##_table {\
- TYPE * hashtable[HASHSIZE];\
- TYPE * sorted_list;\
- int nr_entries;\
-};\
-\
-struct NAME##_ptrs {\
- TYPE * next_hash;\
- TYPE * prev_hash;\
- TYPE * next_sorted;\
- TYPE * prev_sorted;\
-};
-
-#define DEF_HASH_FUZZY(LINKAGE,NAME,HASHSIZE,TYPE,PTRS,KEYTYPE,KEY,KEYCMP,KEYEQ,HASHFN)\
-\
-LINKAGE void insert_##NAME##_hash(struct NAME##_table * tbl, TYPE * elem)\
-{\
- int ix = HASHFN(elem->KEY);\
- TYPE ** base = &tbl->hashtable[ix];\
- TYPE * ptr = *base;\
- TYPE * prev = NULL;\
-\
- tbl->nr_entries++;\
- while(ptr && KEYCMP(ptr->KEY, elem->KEY)) {\
- base = &ptr->PTRS.next_hash;\
- prev = ptr;\
- ptr = *base;\
- }\
- elem->PTRS.next_hash = ptr;\
- elem->PTRS.prev_hash = prev;\
- if(ptr) {\
- ptr->PTRS.prev_hash = elem;\
- }\
- *base = elem;\
-\
- ptr = prev;\
- if(!ptr) {\
- ptr = tbl->sorted_list;\
- prev = NULL;\
- } else {\
- prev = ptr->PTRS.prev_sorted;\
- }\
- while(ptr) {\
- TYPE * next = ptr->PTRS.next_hash;\
- if(next && KEYCMP(next->KEY, elem->KEY)) {\
- prev = ptr;\
- ptr = next;\
- } else if(KEYCMP(ptr->KEY, elem->KEY)) {\
- prev = ptr;\
- ptr = ptr->PTRS.next_sorted;\
- } else\
- break;\
- }\
- elem->PTRS.next_sorted = ptr;\
- elem->PTRS.prev_sorted = prev;\
- if(ptr) {\
- ptr->PTRS.prev_sorted = elem;\
- }\
- if(prev) {\
- prev->PTRS.next_sorted = elem;\
- } else {\
- tbl->sorted_list = elem;\
- }\
-}\
-\
-LINKAGE void remove_##NAME##_hash(struct NAME##_table * tbl, TYPE * elem)\
-{\
- TYPE * next = elem->PTRS.next_hash;\
- TYPE * prev = elem->PTRS.prev_hash;\
-\
- tbl->nr_entries--;\
- if(next)\
- next->PTRS.prev_hash = prev;\
- if(prev)\
- prev->PTRS.next_hash = next;\
- else {\
- int ix = HASHFN(elem->KEY);\
- tbl->hashtable[ix] = next;\
- }\
-\
- next = elem->PTRS.next_sorted;\
- prev = elem->PTRS.prev_sorted;\
- if(next)\
- next->PTRS.prev_sorted = prev;\
- if(prev)\
- prev->PTRS.next_sorted = next;\
- else\
- tbl->sorted_list = next;\
-}\
-\
-LINKAGE TYPE * find_##NAME##_hash(struct NAME##_table * tbl, KEYTYPE pos)\
-{\
- int ix = hashfn(pos);\
- TYPE * ptr = tbl->hashtable[ix];\
- while(ptr && KEYCMP(ptr->KEY, pos))\
- ptr = ptr->PTRS.next_hash;\
- if(ptr && !KEYEQ(ptr->KEY, pos))\
- ptr = NULL;\
- return ptr;\
-}\
-\
-LINKAGE TYPE * find_##NAME##_hash_fuzzy(struct NAME##_table * tbl, KEYTYPE pos)\
-{\
- int ix;\
- int offset;\
- TYPE * ptr;\
- TYPE * next;\
-\
- ptr = tbl->sorted_list;\
- if(!ptr || KEYCMP(pos, ptr->KEY))\
- return NULL;\
- ix = HASHFN(pos);\
- offset = HASHSIZE;\
- do {\
- offset >>= 1;\
- next = tbl->hashtable[(ix+offset) & ((HASHSIZE)-1)];\
- if(next && (KEYCMP(next->KEY, pos) || KEYEQ(next->KEY, pos))\
- && KEYCMP(ptr->KEY, next->KEY))\
- ptr = next;\
- } while(offset);\
-\
- for(;;) {\
- next = ptr->PTRS.next_hash;\
- if(next) {\
- if(KEYCMP(next->KEY, pos)) {\
- ptr = next;\
- continue;\
- }\
- }\
- next = ptr->PTRS.next_sorted;\
- if(next && KEYCMP(next->KEY, pos)) {\
- ptr = next;\
- continue;\
- }\
- return ptr;\
- }\
- return NULL;\
-}
-
-#define DEF_HASH_STRUCTS(NAME,HASHSIZE,TYPE) \
-\
-struct NAME##_table {\
- TYPE * hashtable[HASHSIZE];\
- int nr_entries;\
-};\
-\
-struct NAME##_ptrs {\
- TYPE * next_hash;\
- TYPE * prev_hash;\
-};
-
-#define DEF_HASH(LINKAGE,NAME,HASHSIZE,TYPE,PTRS,KEYTYPE,KEY,KEYCMP,KEYEQ,HASHFN)\
-\
-LINKAGE void insert_##NAME##_hash(struct NAME##_table * tbl, TYPE * elem)\
-{\
- int ix = HASHFN(elem->KEY);\
- TYPE ** base = &tbl->hashtable[ix];\
- TYPE * ptr = *base;\
- TYPE * prev = NULL;\
-\
- tbl->nr_entries++;\
- while(ptr && KEYCMP(ptr->KEY, elem->KEY)) {\
- base = &ptr->PTRS.next_hash;\
- prev = ptr;\
- ptr = *base;\
- }\
- elem->PTRS.next_hash = ptr;\
- elem->PTRS.prev_hash = prev;\
- if(ptr) {\
- ptr->PTRS.prev_hash = elem;\
- }\
- *base = elem;\
-}\
-\
-LINKAGE void remove_##NAME##_hash(struct NAME##_table * tbl, TYPE * elem)\
-{\
- TYPE * next = elem->PTRS.next_hash;\
- TYPE * prev = elem->PTRS.prev_hash;\
-\
- tbl->nr_entries--;\
- if(next)\
- next->PTRS.prev_hash = prev;\
- if(prev)\
- prev->PTRS.next_hash = next;\
- else {\
- int ix = HASHFN(elem->KEY);\
- tbl->hashtable[ix] = next;\
- }\
-}\
-\
-LINKAGE TYPE * find_##NAME##_hash(struct NAME##_table * tbl, KEYTYPE pos)\
-{\
- int ix = hashfn(pos);\
- TYPE * ptr = tbl->hashtable[ix];\
- while(ptr && KEYCMP(ptr->KEY, pos))\
- ptr = ptr->PTRS.next_hash;\
- if(ptr && !KEYEQ(ptr->KEY, pos))\
- ptr = NULL;\
- return ptr;\
-}
-
-#endif
diff --git a/include/linux/i2c-proc.h b/include/linux/i2c-proc.h
index c1433e5f916b..618734230d46 100644
--- a/include/linux/i2c-proc.h
+++ b/include/linux/i2c-proc.h
@@ -69,8 +69,7 @@ extern int i2c_proc_real(ctl_table * ctl, int write, struct file *filp,
these functions must be updated! */
extern int i2c_register_entry(struct i2c_client *client,
const char *prefix,
- ctl_table * ctl_template,
- struct module *controlling_mod);
+ ctl_table * ctl_template);
extern void i2c_deregister_entry(int id);
diff --git a/include/linux/if.h b/include/linux/if.h
index 734578911ba8..898cfdf1bb14 100644
--- a/include/linux/if.h
+++ b/include/linux/if.h
@@ -59,7 +59,7 @@
#define IF_IFACE_X21 0x1002 /* X.21 serial interface */
#define IF_IFACE_T1 0x1003 /* T1 telco serial interface */
#define IF_IFACE_E1 0x1004 /* E1 telco serial interface */
-#define IF_IFACE_SYNC_SERIAL 0x1005 /* cant'b be set by software */
+#define IF_IFACE_SYNC_SERIAL 0x1005 /* can't be set by software */
/* For definitions see hdlc.h */
#define IF_PROTO_HDLC 0x2000 /* raw HDLC protocol */
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h
index e14d3f10872e..9479a550b924 100644
--- a/include/linux/ipmi.h
+++ b/include/linux/ipmi.h
@@ -166,7 +166,7 @@ struct ipmi_msg
typedef struct ipmi_user *ipmi_user_t;
/*
- * Stuff coming from the recieve interface comes as one of these.
+ * Stuff coming from the receive interface comes as one of these.
* They are allocated, the receiver must free them with
* ipmi_free_recv_msg() when done with the message. The link is not
* used after the message is delivered, so the upper layer may use the
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h
index bb1e0128228c..96dc2be6a496 100644
--- a/include/linux/jiffies.h
+++ b/include/linux/jiffies.h
@@ -28,7 +28,7 @@ static inline u64 get_jiffies_64(void)
* These inlines deal with timer wrapping correctly. You are
* strongly encouraged to use them
* 1. Because people otherwise forget
- * 2. Because if the timer wrap changes in future you wont have to
+ * 2. Because if the timer wrap changes in future you won't have to
* alter your driver code.
*
* time_after(a,b) returns true if the time a is after time b.
diff --git a/include/linux/mm.h b/include/linux/mm.h
index c68771c27d88..5cef04a2623e 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -232,11 +232,15 @@ static inline void get_page(struct page *page)
static inline void put_page(struct page *page)
{
if (PageCompound(page)) {
- page = (struct page *)page->lru.next;
- if (page->lru.prev) { /* destructor? */
- (*(void (*)(struct page *))page->lru.prev)(page);
- return;
+ if (put_page_testzero(page)) {
+ page = (struct page *)page->lru.next;
+ if (page->lru.prev) { /* destructor? */
+ (*(void (*)(struct page *))page->lru.prev)(page);
+ } else {
+ __page_cache_release(page);
+ }
}
+ return;
}
if (!PageReserved(page) && put_page_testzero(page))
__page_cache_release(page);
diff --git a/include/linux/n_r3964.h b/include/linux/n_r3964.h
index 0b063cd07af2..2352bcd31a06 100644
--- a/include/linux/n_r3964.h
+++ b/include/linux/n_r3964.h
@@ -165,7 +165,7 @@ struct r3964_block_header
{
unsigned int length; /* length in chars without header */
unsigned char *data; /* usually data is located
- immediatly behind this struct */
+ immediately behind this struct */
unsigned int locks; /* only used in rx_buffer */
struct r3964_block_header *next;
diff --git a/include/linux/net.h b/include/linux/net.h
index cecc941476a7..0576c4713cf3 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -210,23 +210,23 @@ SOCKCALL_WRAP(name, mmap, (struct file *file, struct socket *sock, struct vm_are
(file, sock, vma)) \
\
static struct proto_ops name##_ops = { \
- family: fam, \
+ .family = fam, \
\
- release: __lock_##name##_release, \
- bind: __lock_##name##_bind, \
- connect: __lock_##name##_connect, \
- socketpair: __lock_##name##_socketpair, \
- accept: __lock_##name##_accept, \
- getname: __lock_##name##_getname, \
- poll: __lock_##name##_poll, \
- ioctl: __lock_##name##_ioctl, \
- listen: __lock_##name##_listen, \
- shutdown: __lock_##name##_shutdown, \
- setsockopt: __lock_##name##_setsockopt, \
- getsockopt: __lock_##name##_getsockopt, \
- sendmsg: __lock_##name##_sendmsg, \
- recvmsg: __lock_##name##_recvmsg, \
- mmap: __lock_##name##_mmap, \
+ .release = __lock_##name##_release, \
+ .bind = __lock_##name##_bind, \
+ .connect = __lock_##name##_connect, \
+ .socketpair = __lock_##name##_socketpair, \
+ .accept = __lock_##name##_accept, \
+ .getname = __lock_##name##_getname, \
+ .poll = __lock_##name##_poll, \
+ .ioctl = __lock_##name##_ioctl, \
+ .listen = __lock_##name##_listen, \
+ .shutdown = __lock_##name##_shutdown, \
+ .setsockopt = __lock_##name##_setsockopt, \
+ .getsockopt = __lock_##name##_getsockopt, \
+ .sendmsg = __lock_##name##_sendmsg, \
+ .recvmsg = __lock_##name##_recvmsg, \
+ .mmap = __lock_##name##_mmap, \
};
#endif
diff --git a/include/linux/rwsem-spinlock.h b/include/linux/rwsem-spinlock.h
index f4ac435bf141..b52a2af25f1f 100644
--- a/include/linux/rwsem-spinlock.h
+++ b/include/linux/rwsem-spinlock.h
@@ -9,7 +9,7 @@
#define _LINUX_RWSEM_SPINLOCK_H
#ifndef _LINUX_RWSEM_H
-#error please dont include linux/rwsem-spinlock.h directly, use linux/rwsem.h instead
+#error "please don't include linux/rwsem-spinlock.h directly, use linux/rwsem.h instead"
#endif
#include <linux/spinlock.h>
diff --git a/include/linux/sdla_x25.h b/include/linux/sdla_x25.h
index c110c1a835f7..57db980e27ad 100644
--- a/include/linux/sdla_x25.h
+++ b/include/linux/sdla_x25.h
@@ -154,7 +154,7 @@ typedef struct X25Cmd
#define X25RES_INVAL_CALL_ARG 0x3A /* errorneous call arguments */
#define X25RES_INVAL_CALL_DATA 0x3B /* errorneous call user data */
#define X25RES_ASYNC_PACKET 0x40 /* asynchronous packet received */
-#define X25RES_PROTO_VIOLATION 0x41 /* protocol violation occured */
+#define X25RES_PROTO_VIOLATION 0x41 /* protocol violation occurred */
#define X25RES_PKT_TIMEOUT 0x42 /* X.25 packet time out */
#define X25RES_PKT_RETRY_LIMIT 0x43 /* X.25 packet retry limit exceeded */
/*----- Command-dependent results -----*/
diff --git a/include/linux/serial.h b/include/linux/serial.h
index b0469a236a13..aceee0c46cd8 100644
--- a/include/linux/serial.h
+++ b/include/linux/serial.h
@@ -91,6 +91,7 @@ struct serial_uart_config {
#define UART_CLEAR_FIFO 0x01
#define UART_USE_FIFO 0x02
#define UART_STARTECH 0x04
+#define UART_NATSEMI 0x08
/*
* Definitions for async_struct (and serial_struct) flags field
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index a3422e7a903a..3412f8b7f2ce 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -37,7 +37,8 @@
#define PORT_16654 11
#define PORT_16850 12
#define PORT_RSA 13
-#define PORT_MAX_8250 13 /* max port ID */
+#define PORT_NS16550A 14
+#define PORT_MAX_8250 14 /* max port ID */
/*
* ARM specific type numbers. These are not currently guaranteed
@@ -172,6 +173,7 @@ struct uart_port {
#define UPF_LOW_LATENCY (1 << 13)
#define UPF_BUGGY_UART (1 << 14)
#define UPF_AUTOPROBE (1 << 15)
+#define UPF_MAGIC_MULTIPLIER (1 << 16)
#define UPF_BOOT_ONLYMCA (1 << 22)
#define UPF_CONS_FLOW (1 << 23)
#define UPF_SHARE_IRQ (1 << 24)
@@ -179,7 +181,7 @@ struct uart_port {
#define UPF_RESOURCES (1 << 30)
#define UPF_IOREMAP (1 << 31)
-#define UPF_CHANGE_MASK (0x7fff)
+#define UPF_CHANGE_MASK (0x17fff)
#define UPF_USR_MASK (UPF_SPD_MASK|UPF_LOW_LATENCY)
unsigned int mctrl; /* current modem ctrl settings */
@@ -279,12 +281,11 @@ void uart_write_wakeup(struct uart_port *port);
* Baud rate helpers.
*/
void uart_update_timeout(struct uart_port *port, unsigned int cflag,
- unsigned int quot);
+ unsigned int baud);
unsigned int uart_get_baud_rate(struct uart_port *port, struct termios *termios,
struct termios *old, unsigned int min,
unsigned int max);
-unsigned int uart_get_divisor(struct uart_port *port, struct termios *termios,
- struct termios *old_termios);
+unsigned int uart_get_divisor(struct uart_port *port, unsigned int baud);
/*
* Console helpers.
diff --git a/include/linux/telephony.h b/include/linux/telephony.h
index 3843eeeca41b..0d0cf2a1e7bc 100644
--- a/include/linux/telephony.h
+++ b/include/linux/telephony.h
@@ -68,7 +68,7 @@
* device installed in your system. The PHONECTL_CAPABILITIES ioctl
* returns an integer value indicating the number of capabilities the
* device has. The PHONECTL_CAPABILITIES_LIST will fill an array of
-* capability structs with all of it's capabilities. The
+* capability structs with all of its capabilities. The
* PHONECTL_CAPABILITIES_CHECK takes a single capability struct and returns
* a TRUE if the device has that capability, otherwise it returns false.
*
diff --git a/include/linux/time.h b/include/linux/time.h
index 542e00330d22..7f5be084e342 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -28,6 +28,12 @@ struct timezone {
#include <linux/seqlock.h>
/*
+ * Have the 32 bit jiffies value wrap 5 minutes after boot
+ * so jiffies wrap bugs show up earlier.
+ */
+#define INITIAL_JIFFIES ((unsigned int) (-300*HZ))
+
+/*
* Change timeval to jiffies, trying to avoid the
* most obvious overflows..
*
diff --git a/include/linux/xattr.h b/include/linux/xattr.h
index 77ef0c304849..9e967b58ee2e 100644
--- a/include/linux/xattr.h
+++ b/include/linux/xattr.h
@@ -9,8 +9,7 @@
#ifndef _LINUX_XATTR_H
#define _LINUX_XATTR_H
-#define XATTR_CREATE 0x1 /* fail if attr already exists */
-#define XATTR_REPLACE 0x2 /* fail if attr does not exist */
-#define XATTR_KERNEL_CONTEXT 0x4 /* called from kernel context */
+#define XATTR_CREATE 0x1 /* set value, fail if attr already exists */
+#define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */
#endif /* _LINUX_XATTR_H */