diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/atalk.h | 26 | ||||
-rw-r--r-- | include/linux/device.h | 64 | ||||
-rw-r--r-- | include/linux/fs.h | 46 | ||||
-rw-r--r-- | include/linux/i2c-sysfs.h | 36 | ||||
-rw-r--r-- | include/linux/input.h | 2 | ||||
-rw-r--r-- | include/linux/klist.h | 55 | ||||
-rw-r--r-- | include/linux/kobject.h | 8 | ||||
-rw-r--r-- | include/linux/netfilter_ipv4.h | 6 | ||||
-rw-r--r-- | include/linux/netfilter_ipv4/ip_conntrack_core.h | 3 | ||||
-rw-r--r-- | include/linux/netfilter_ipv4/ip_nat.h | 3 | ||||
-rw-r--r-- | include/linux/netfilter_ipv4/listhelp.h | 1 | ||||
-rw-r--r-- | include/linux/netfilter_ipv4/lockhelp.h | 129 | ||||
-rw-r--r-- | include/linux/netlink.h | 3 | ||||
-rw-r--r-- | include/linux/node.h | 1 | ||||
-rw-r--r-- | include/linux/pfkeyv2.h | 1 | ||||
-rw-r--r-- | include/linux/skbuff.h | 13 | ||||
-rw-r--r-- | include/linux/sysfs.h | 15 | ||||
-rw-r--r-- | include/linux/usb.h | 5 | ||||
-rw-r--r-- | include/linux/xfrm.h | 1 |
19 files changed, 206 insertions, 212 deletions
diff --git a/include/linux/atalk.h b/include/linux/atalk.h index 31d3fc25ccbd..09a1451c1159 100644 --- a/include/linux/atalk.h +++ b/include/linux/atalk.h | |||
@@ -20,7 +20,7 @@ | |||
20 | #define SIOCATALKDIFADDR (SIOCPROTOPRIVATE + 0) | 20 | #define SIOCATALKDIFADDR (SIOCPROTOPRIVATE + 0) |
21 | 21 | ||
22 | struct atalk_addr { | 22 | struct atalk_addr { |
23 | __u16 s_net; | 23 | __be16 s_net; |
24 | __u8 s_node; | 24 | __u8 s_node; |
25 | }; | 25 | }; |
26 | 26 | ||
@@ -33,8 +33,8 @@ struct sockaddr_at { | |||
33 | 33 | ||
34 | struct atalk_netrange { | 34 | struct atalk_netrange { |
35 | __u8 nr_phase; | 35 | __u8 nr_phase; |
36 | __u16 nr_firstnet; | 36 | __be16 nr_firstnet; |
37 | __u16 nr_lastnet; | 37 | __be16 nr_lastnet; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | #ifdef __KERNEL__ | 40 | #ifdef __KERNEL__ |
@@ -70,8 +70,8 @@ struct atalk_iface { | |||
70 | struct atalk_sock { | 70 | struct atalk_sock { |
71 | /* struct sock has to be the first member of atalk_sock */ | 71 | /* struct sock has to be the first member of atalk_sock */ |
72 | struct sock sk; | 72 | struct sock sk; |
73 | unsigned short dest_net; | 73 | __be16 dest_net; |
74 | unsigned short src_net; | 74 | __be16 src_net; |
75 | unsigned char dest_node; | 75 | unsigned char dest_node; |
76 | unsigned char src_node; | 76 | unsigned char src_node; |
77 | unsigned char dest_port; | 77 | unsigned char dest_port; |
@@ -95,9 +95,9 @@ struct ddpehdr { | |||
95 | deh_hops:4, | 95 | deh_hops:4, |
96 | deh_len:10; | 96 | deh_len:10; |
97 | #endif | 97 | #endif |
98 | __u16 deh_sum; | 98 | __be16 deh_sum; |
99 | __u16 deh_dnet; | 99 | __be16 deh_dnet; |
100 | __u16 deh_snet; | 100 | __be16 deh_snet; |
101 | __u8 deh_dnode; | 101 | __u8 deh_dnode; |
102 | __u8 deh_snode; | 102 | __u8 deh_snode; |
103 | __u8 deh_dport; | 103 | __u8 deh_dport; |
@@ -142,24 +142,24 @@ struct ddpshdr { | |||
142 | 142 | ||
143 | /* AppleTalk AARP headers */ | 143 | /* AppleTalk AARP headers */ |
144 | struct elapaarp { | 144 | struct elapaarp { |
145 | __u16 hw_type; | 145 | __be16 hw_type; |
146 | #define AARP_HW_TYPE_ETHERNET 1 | 146 | #define AARP_HW_TYPE_ETHERNET 1 |
147 | #define AARP_HW_TYPE_TOKENRING 2 | 147 | #define AARP_HW_TYPE_TOKENRING 2 |
148 | __u16 pa_type; | 148 | __be16 pa_type; |
149 | __u8 hw_len; | 149 | __u8 hw_len; |
150 | __u8 pa_len; | 150 | __u8 pa_len; |
151 | #define AARP_PA_ALEN 4 | 151 | #define AARP_PA_ALEN 4 |
152 | __u16 function; | 152 | __be16 function; |
153 | #define AARP_REQUEST 1 | 153 | #define AARP_REQUEST 1 |
154 | #define AARP_REPLY 2 | 154 | #define AARP_REPLY 2 |
155 | #define AARP_PROBE 3 | 155 | #define AARP_PROBE 3 |
156 | __u8 hw_src[ETH_ALEN] __attribute__ ((packed)); | 156 | __u8 hw_src[ETH_ALEN] __attribute__ ((packed)); |
157 | __u8 pa_src_zero __attribute__ ((packed)); | 157 | __u8 pa_src_zero __attribute__ ((packed)); |
158 | __u16 pa_src_net __attribute__ ((packed)); | 158 | __be16 pa_src_net __attribute__ ((packed)); |
159 | __u8 pa_src_node __attribute__ ((packed)); | 159 | __u8 pa_src_node __attribute__ ((packed)); |
160 | __u8 hw_dst[ETH_ALEN] __attribute__ ((packed)); | 160 | __u8 hw_dst[ETH_ALEN] __attribute__ ((packed)); |
161 | __u8 pa_dst_zero __attribute__ ((packed)); | 161 | __u8 pa_dst_zero __attribute__ ((packed)); |
162 | __u16 pa_dst_net __attribute__ ((packed)); | 162 | __be16 pa_dst_net __attribute__ ((packed)); |
163 | __u8 pa_dst_node __attribute__ ((packed)); | 163 | __u8 pa_dst_node __attribute__ ((packed)); |
164 | }; | 164 | }; |
165 | 165 | ||
diff --git a/include/linux/device.h b/include/linux/device.h index df94c0de53f2..7b781a72b293 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/config.h> | 14 | #include <linux/config.h> |
15 | #include <linux/ioport.h> | 15 | #include <linux/ioport.h> |
16 | #include <linux/kobject.h> | 16 | #include <linux/kobject.h> |
17 | #include <linux/klist.h> | ||
17 | #include <linux/list.h> | 18 | #include <linux/list.h> |
18 | #include <linux/types.h> | 19 | #include <linux/types.h> |
19 | #include <linux/module.h> | 20 | #include <linux/module.h> |
@@ -44,14 +45,15 @@ struct device; | |||
44 | struct device_driver; | 45 | struct device_driver; |
45 | struct class; | 46 | struct class; |
46 | struct class_device; | 47 | struct class_device; |
47 | struct class_simple; | ||
48 | 48 | ||
49 | struct bus_type { | 49 | struct bus_type { |
50 | char * name; | 50 | const char * name; |
51 | 51 | ||
52 | struct subsystem subsys; | 52 | struct subsystem subsys; |
53 | struct kset drivers; | 53 | struct kset drivers; |
54 | struct kset devices; | 54 | struct kset devices; |
55 | struct klist klist_devices; | ||
56 | struct klist klist_drivers; | ||
55 | 57 | ||
56 | struct bus_attribute * bus_attrs; | 58 | struct bus_attribute * bus_attrs; |
57 | struct device_attribute * dev_attrs; | 59 | struct device_attribute * dev_attrs; |
@@ -98,17 +100,18 @@ extern int bus_create_file(struct bus_type *, struct bus_attribute *); | |||
98 | extern void bus_remove_file(struct bus_type *, struct bus_attribute *); | 100 | extern void bus_remove_file(struct bus_type *, struct bus_attribute *); |
99 | 101 | ||
100 | struct device_driver { | 102 | struct device_driver { |
101 | char * name; | 103 | const char * name; |
102 | struct bus_type * bus; | 104 | struct bus_type * bus; |
103 | 105 | ||
104 | struct completion unloaded; | 106 | struct completion unloaded; |
105 | struct kobject kobj; | 107 | struct kobject kobj; |
106 | struct list_head devices; | 108 | struct klist klist_devices; |
109 | struct klist_node knode_bus; | ||
107 | 110 | ||
108 | struct module * owner; | 111 | struct module * owner; |
109 | 112 | ||
110 | int (*probe) (struct device * dev); | 113 | int (*probe) (struct device * dev); |
111 | int (*remove) (struct device * dev); | 114 | int (*remove) (struct device * dev); |
112 | void (*shutdown) (struct device * dev); | 115 | void (*shutdown) (struct device * dev); |
113 | int (*suspend) (struct device * dev, pm_message_t state, u32 level); | 116 | int (*suspend) (struct device * dev, pm_message_t state, u32 level); |
114 | int (*resume) (struct device * dev, u32 level); | 117 | int (*resume) (struct device * dev, u32 level); |
@@ -137,12 +140,16 @@ struct driver_attribute driver_attr_##_name = __ATTR(_name,_mode,_show,_store) | |||
137 | extern int driver_create_file(struct device_driver *, struct driver_attribute *); | 140 | extern int driver_create_file(struct device_driver *, struct driver_attribute *); |
138 | extern void driver_remove_file(struct device_driver *, struct driver_attribute *); | 141 | extern void driver_remove_file(struct device_driver *, struct driver_attribute *); |
139 | 142 | ||
143 | extern int driver_for_each_device(struct device_driver * drv, struct device * start, | ||
144 | void * data, int (*fn)(struct device *, void *)); | ||
145 | |||
140 | 146 | ||
141 | /* | 147 | /* |
142 | * device classes | 148 | * device classes |
143 | */ | 149 | */ |
144 | struct class { | 150 | struct class { |
145 | char * name; | 151 | const char * name; |
152 | struct module * owner; | ||
146 | 153 | ||
147 | struct subsystem subsys; | 154 | struct subsystem subsys; |
148 | struct list_head children; | 155 | struct list_head children; |
@@ -185,6 +192,7 @@ struct class_device { | |||
185 | struct kobject kobj; | 192 | struct kobject kobj; |
186 | struct class * class; /* required */ | 193 | struct class * class; /* required */ |
187 | dev_t devt; /* dev_t, creates the sysfs "dev" */ | 194 | dev_t devt; /* dev_t, creates the sysfs "dev" */ |
195 | struct class_device_attribute *devt_attr; | ||
188 | struct device * dev; /* not necessary, but nice to have */ | 196 | struct device * dev; /* not necessary, but nice to have */ |
189 | void * class_data; /* class-specific data */ | 197 | void * class_data; /* class-specific data */ |
190 | 198 | ||
@@ -245,26 +253,28 @@ struct class_interface { | |||
245 | extern int class_interface_register(struct class_interface *); | 253 | extern int class_interface_register(struct class_interface *); |
246 | extern void class_interface_unregister(struct class_interface *); | 254 | extern void class_interface_unregister(struct class_interface *); |
247 | 255 | ||
248 | /* interface for class simple stuff */ | 256 | extern struct class *class_create(struct module *owner, char *name); |
249 | extern struct class_simple *class_simple_create(struct module *owner, char *name); | 257 | extern void class_destroy(struct class *cls); |
250 | extern void class_simple_destroy(struct class_simple *cs); | 258 | extern struct class_device *class_device_create(struct class *cls, dev_t devt, |
251 | extern struct class_device *class_simple_device_add(struct class_simple *cs, dev_t dev, struct device *device, const char *fmt, ...) | 259 | struct device *device, char *fmt, ...) |
252 | __attribute__((format(printf,4,5))); | 260 | __attribute__((format(printf,4,5))); |
253 | extern int class_simple_set_hotplug(struct class_simple *, | 261 | extern void class_device_destroy(struct class *cls, dev_t devt); |
254 | int (*hotplug)(struct class_device *dev, char **envp, int num_envp, char *buffer, int buffer_size)); | ||
255 | extern void class_simple_device_remove(dev_t dev); | ||
256 | 262 | ||
257 | 263 | ||
258 | struct device { | 264 | struct device { |
259 | struct list_head node; /* node in sibling list */ | 265 | struct klist klist_children; |
260 | struct list_head bus_list; /* node in bus's list */ | 266 | struct klist_node knode_parent; /* node in sibling list */ |
261 | struct list_head driver_list; | 267 | struct klist_node knode_driver; |
262 | struct list_head children; | 268 | struct klist_node knode_bus; |
263 | struct device * parent; | 269 | struct device * parent; |
264 | 270 | ||
265 | struct kobject kobj; | 271 | struct kobject kobj; |
266 | char bus_id[BUS_ID_SIZE]; /* position on parent bus */ | 272 | char bus_id[BUS_ID_SIZE]; /* position on parent bus */ |
267 | 273 | ||
274 | struct semaphore sem; /* semaphore to synchronize calls to | ||
275 | * its driver. | ||
276 | */ | ||
277 | |||
268 | struct bus_type * bus; /* type of bus device is on */ | 278 | struct bus_type * bus; /* type of bus device is on */ |
269 | struct device_driver *driver; /* which driver has allocated this | 279 | struct device_driver *driver; /* which driver has allocated this |
270 | device */ | 280 | device */ |
@@ -288,12 +298,6 @@ struct device { | |||
288 | void (*release)(struct device * dev); | 298 | void (*release)(struct device * dev); |
289 | }; | 299 | }; |
290 | 300 | ||
291 | static inline struct device * | ||
292 | list_to_dev(struct list_head *node) | ||
293 | { | ||
294 | return list_entry(node, struct device, node); | ||
295 | } | ||
296 | |||
297 | static inline void * | 301 | static inline void * |
298 | dev_get_drvdata (struct device *dev) | 302 | dev_get_drvdata (struct device *dev) |
299 | { | 303 | { |
@@ -321,7 +325,6 @@ extern int device_for_each_child(struct device *, void *, | |||
321 | * Manual binding of a device to driver. See drivers/base/bus.c | 325 | * Manual binding of a device to driver. See drivers/base/bus.c |
322 | * for information on use. | 326 | * for information on use. |
323 | */ | 327 | */ |
324 | extern int driver_probe_device(struct device_driver * drv, struct device * dev); | ||
325 | extern void device_bind_driver(struct device * dev); | 328 | extern void device_bind_driver(struct device * dev); |
326 | extern void device_release_driver(struct device * dev); | 329 | extern void device_release_driver(struct device * dev); |
327 | extern int device_attach(struct device * dev); | 330 | extern int device_attach(struct device * dev); |
@@ -332,8 +335,10 @@ extern void driver_attach(struct device_driver * drv); | |||
332 | 335 | ||
333 | struct device_attribute { | 336 | struct device_attribute { |
334 | struct attribute attr; | 337 | struct attribute attr; |
335 | ssize_t (*show)(struct device * dev, char * buf); | 338 | ssize_t (*show)(struct device *dev, struct device_attribute *attr, |
336 | ssize_t (*store)(struct device * dev, const char * buf, size_t count); | 339 | char *buf); |
340 | ssize_t (*store)(struct device *dev, struct device_attribute *attr, | ||
341 | const char *buf, size_t count); | ||
337 | }; | 342 | }; |
338 | 343 | ||
339 | #define DEVICE_ATTR(_name,_mode,_show,_store) \ | 344 | #define DEVICE_ATTR(_name,_mode,_show,_store) \ |
@@ -360,13 +365,12 @@ extern int (*platform_notify_remove)(struct device * dev); | |||
360 | */ | 365 | */ |
361 | extern struct device * get_device(struct device * dev); | 366 | extern struct device * get_device(struct device * dev); |
362 | extern void put_device(struct device * dev); | 367 | extern void put_device(struct device * dev); |
363 | extern struct device *device_find(const char *name, struct bus_type *bus); | ||
364 | 368 | ||
365 | 369 | ||
366 | /* drivers/base/platform.c */ | 370 | /* drivers/base/platform.c */ |
367 | 371 | ||
368 | struct platform_device { | 372 | struct platform_device { |
369 | char * name; | 373 | const char * name; |
370 | u32 id; | 374 | u32 id; |
371 | struct device dev; | 375 | struct device dev; |
372 | u32 num_resources; | 376 | u32 num_resources; |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 0180102dace1..9b8b696d4f15 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1657,6 +1657,52 @@ static inline void simple_transaction_set(struct file *file, size_t n) | |||
1657 | ar->size = n; | 1657 | ar->size = n; |
1658 | } | 1658 | } |
1659 | 1659 | ||
1660 | /* | ||
1661 | * simple attribute files | ||
1662 | * | ||
1663 | * These attributes behave similar to those in sysfs: | ||
1664 | * | ||
1665 | * Writing to an attribute immediately sets a value, an open file can be | ||
1666 | * written to multiple times. | ||
1667 | * | ||
1668 | * Reading from an attribute creates a buffer from the value that might get | ||
1669 | * read with multiple read calls. When the attribute has been read | ||
1670 | * completely, no further read calls are possible until the file is opened | ||
1671 | * again. | ||
1672 | * | ||
1673 | * All attributes contain a text representation of a numeric value | ||
1674 | * that are accessed with the get() and set() functions. | ||
1675 | */ | ||
1676 | #define DEFINE_SIMPLE_ATTRIBUTE(__fops, __get, __set, __fmt) \ | ||
1677 | static int __fops ## _open(struct inode *inode, struct file *file) \ | ||
1678 | { \ | ||
1679 | __simple_attr_check_format(__fmt, 0ull); \ | ||
1680 | return simple_attr_open(inode, file, __get, __set, __fmt); \ | ||
1681 | } \ | ||
1682 | static struct file_operations __fops = { \ | ||
1683 | .owner = THIS_MODULE, \ | ||
1684 | .open = __fops ## _open, \ | ||
1685 | .release = simple_attr_close, \ | ||
1686 | .read = simple_attr_read, \ | ||
1687 | .write = simple_attr_write, \ | ||
1688 | }; | ||
1689 | |||
1690 | static inline void __attribute__((format(printf, 1, 2))) | ||
1691 | __simple_attr_check_format(const char *fmt, ...) | ||
1692 | { | ||
1693 | /* don't do anything, just let the compiler check the arguments; */ | ||
1694 | } | ||
1695 | |||
1696 | int simple_attr_open(struct inode *inode, struct file *file, | ||
1697 | u64 (*get)(void *), void (*set)(void *, u64), | ||
1698 | const char *fmt); | ||
1699 | int simple_attr_close(struct inode *inode, struct file *file); | ||
1700 | ssize_t simple_attr_read(struct file *file, char __user *buf, | ||
1701 | size_t len, loff_t *ppos); | ||
1702 | ssize_t simple_attr_write(struct file *file, const char __user *buf, | ||
1703 | size_t len, loff_t *ppos); | ||
1704 | |||
1705 | |||
1660 | #ifdef CONFIG_SECURITY | 1706 | #ifdef CONFIG_SECURITY |
1661 | static inline char *alloc_secdata(void) | 1707 | static inline char *alloc_secdata(void) |
1662 | { | 1708 | { |
diff --git a/include/linux/i2c-sysfs.h b/include/linux/i2c-sysfs.h new file mode 100644 index 000000000000..d7bf6ce11679 --- /dev/null +++ b/include/linux/i2c-sysfs.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * i2c-sysfs.h - i2c chip driver sysfs defines | ||
3 | * | ||
4 | * Copyright (C) 2005 Yani Ioannou <yani.ioannou@gmail.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | ||
20 | #ifndef _LINUX_I2C_SYSFS_H | ||
21 | #define _LINUX_I2C_SYSFS_H | ||
22 | |||
23 | struct sensor_device_attribute{ | ||
24 | struct device_attribute dev_attr; | ||
25 | int index; | ||
26 | }; | ||
27 | #define to_sensor_dev_attr(_dev_attr) \ | ||
28 | container_of(_dev_attr, struct sensor_device_attribute, dev_attr) | ||
29 | |||
30 | #define SENSOR_DEVICE_ATTR(_name,_mode,_show,_store,_index) \ | ||
31 | struct sensor_device_attribute sensor_dev_attr_##_name = { \ | ||
32 | .dev_attr = __ATTR(_name,_mode,_show,_store), \ | ||
33 | .index = _index, \ | ||
34 | } | ||
35 | |||
36 | #endif /* _LINUX_I2C_SYSFS_H */ | ||
diff --git a/include/linux/input.h b/include/linux/input.h index 72731d7d189e..9d9598ed760d 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -1015,7 +1015,7 @@ static inline void input_set_abs_params(struct input_dev *dev, int axis, int min | |||
1015 | dev->absbit[LONG(axis)] |= BIT(axis); | 1015 | dev->absbit[LONG(axis)] |= BIT(axis); |
1016 | } | 1016 | } |
1017 | 1017 | ||
1018 | extern struct class_simple *input_class; | 1018 | extern struct class *input_class; |
1019 | 1019 | ||
1020 | #endif | 1020 | #endif |
1021 | #endif | 1021 | #endif |
diff --git a/include/linux/klist.h b/include/linux/klist.h new file mode 100644 index 000000000000..eebf5e5696ec --- /dev/null +++ b/include/linux/klist.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * klist.h - Some generic list helpers, extending struct list_head a bit. | ||
3 | * | ||
4 | * Implementations are found in lib/klist.c | ||
5 | * | ||
6 | * | ||
7 | * Copyright (C) 2005 Patrick Mochel | ||
8 | * | ||
9 | * This file is rleased under the GPL v2. | ||
10 | */ | ||
11 | |||
12 | #include <linux/spinlock.h> | ||
13 | #include <linux/completion.h> | ||
14 | #include <linux/kref.h> | ||
15 | #include <linux/list.h> | ||
16 | |||
17 | |||
18 | struct klist { | ||
19 | spinlock_t k_lock; | ||
20 | struct list_head k_list; | ||
21 | }; | ||
22 | |||
23 | |||
24 | extern void klist_init(struct klist * k); | ||
25 | |||
26 | |||
27 | struct klist_node { | ||
28 | struct klist * n_klist; | ||
29 | struct list_head n_node; | ||
30 | struct kref n_ref; | ||
31 | struct completion n_removed; | ||
32 | }; | ||
33 | |||
34 | extern void klist_add_tail(struct klist * k, struct klist_node * n); | ||
35 | extern void klist_add_head(struct klist * k, struct klist_node * n); | ||
36 | |||
37 | extern void klist_del(struct klist_node * n); | ||
38 | extern void klist_remove(struct klist_node * n); | ||
39 | |||
40 | extern int klist_node_attached(struct klist_node * n); | ||
41 | |||
42 | |||
43 | struct klist_iter { | ||
44 | struct klist * i_klist; | ||
45 | struct list_head * i_head; | ||
46 | struct klist_node * i_cur; | ||
47 | }; | ||
48 | |||
49 | |||
50 | extern void klist_iter_init(struct klist * k, struct klist_iter * i); | ||
51 | extern void klist_iter_init_node(struct klist * k, struct klist_iter * i, | ||
52 | struct klist_node * n); | ||
53 | extern void klist_iter_exit(struct klist_iter * i); | ||
54 | extern struct klist_node * klist_next(struct klist_iter * i); | ||
55 | |||
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 765d660d3bea..3b22304f12fd 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -33,7 +33,7 @@ | |||
33 | extern u64 hotplug_seqnum; | 33 | extern u64 hotplug_seqnum; |
34 | 34 | ||
35 | struct kobject { | 35 | struct kobject { |
36 | char * k_name; | 36 | const char * k_name; |
37 | char name[KOBJ_NAME_LEN]; | 37 | char name[KOBJ_NAME_LEN]; |
38 | struct kref kref; | 38 | struct kref kref; |
39 | struct list_head entry; | 39 | struct list_head entry; |
@@ -46,7 +46,7 @@ struct kobject { | |||
46 | extern int kobject_set_name(struct kobject *, const char *, ...) | 46 | extern int kobject_set_name(struct kobject *, const char *, ...) |
47 | __attribute__((format(printf,2,3))); | 47 | __attribute__((format(printf,2,3))); |
48 | 48 | ||
49 | static inline char * kobject_name(struct kobject * kobj) | 49 | static inline const char * kobject_name(const struct kobject * kobj) |
50 | { | 50 | { |
51 | return kobj->k_name; | 51 | return kobj->k_name; |
52 | } | 52 | } |
@@ -57,7 +57,7 @@ extern void kobject_cleanup(struct kobject *); | |||
57 | extern int kobject_add(struct kobject *); | 57 | extern int kobject_add(struct kobject *); |
58 | extern void kobject_del(struct kobject *); | 58 | extern void kobject_del(struct kobject *); |
59 | 59 | ||
60 | extern int kobject_rename(struct kobject *, char *new_name); | 60 | extern int kobject_rename(struct kobject *, const char *new_name); |
61 | 61 | ||
62 | extern int kobject_register(struct kobject *); | 62 | extern int kobject_register(struct kobject *); |
63 | extern void kobject_unregister(struct kobject *); | 63 | extern void kobject_unregister(struct kobject *); |
@@ -94,7 +94,7 @@ struct kobj_type { | |||
94 | */ | 94 | */ |
95 | struct kset_hotplug_ops { | 95 | struct kset_hotplug_ops { |
96 | int (*filter)(struct kset *kset, struct kobject *kobj); | 96 | int (*filter)(struct kset *kset, struct kobject *kobj); |
97 | char *(*name)(struct kset *kset, struct kobject *kobj); | 97 | const char *(*name)(struct kset *kset, struct kobject *kobj); |
98 | int (*hotplug)(struct kset *kset, struct kobject *kobj, char **envp, | 98 | int (*hotplug)(struct kset *kset, struct kobject *kobj, char **envp, |
99 | int num_envp, char *buffer, int buffer_size); | 99 | int num_envp, char *buffer, int buffer_size); |
100 | }; | 100 | }; |
diff --git a/include/linux/netfilter_ipv4.h b/include/linux/netfilter_ipv4.h index 9e5750079e09..3ebc36afae1a 100644 --- a/include/linux/netfilter_ipv4.h +++ b/include/linux/netfilter_ipv4.h | |||
@@ -75,12 +75,6 @@ enum nf_ip_hook_priorities { | |||
75 | #define SO_ORIGINAL_DST 80 | 75 | #define SO_ORIGINAL_DST 80 |
76 | 76 | ||
77 | #ifdef __KERNEL__ | 77 | #ifdef __KERNEL__ |
78 | #ifdef CONFIG_NETFILTER_DEBUG | ||
79 | void nf_debug_ip_local_deliver(struct sk_buff *skb); | ||
80 | void nf_debug_ip_loopback_xmit(struct sk_buff *newskb); | ||
81 | void nf_debug_ip_finish_output2(struct sk_buff *skb); | ||
82 | #endif /*CONFIG_NETFILTER_DEBUG*/ | ||
83 | |||
84 | extern int ip_route_me_harder(struct sk_buff **pskb); | 78 | extern int ip_route_me_harder(struct sk_buff **pskb); |
85 | 79 | ||
86 | /* Call this before modifying an existing IP packet: ensures it is | 80 | /* Call this before modifying an existing IP packet: ensures it is |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_core.h b/include/linux/netfilter_ipv4/ip_conntrack_core.h index d84be02cb4fc..694aec9b4784 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_core.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_core.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _IP_CONNTRACK_CORE_H | 1 | #ifndef _IP_CONNTRACK_CORE_H |
2 | #define _IP_CONNTRACK_CORE_H | 2 | #define _IP_CONNTRACK_CORE_H |
3 | #include <linux/netfilter.h> | 3 | #include <linux/netfilter.h> |
4 | #include <linux/netfilter_ipv4/lockhelp.h> | ||
5 | 4 | ||
6 | /* This header is used to share core functionality between the | 5 | /* This header is used to share core functionality between the |
7 | standalone connection tracking module, and the compatibility layer's use | 6 | standalone connection tracking module, and the compatibility layer's use |
@@ -47,6 +46,6 @@ static inline int ip_conntrack_confirm(struct sk_buff **pskb) | |||
47 | 46 | ||
48 | extern struct list_head *ip_conntrack_hash; | 47 | extern struct list_head *ip_conntrack_hash; |
49 | extern struct list_head ip_conntrack_expect_list; | 48 | extern struct list_head ip_conntrack_expect_list; |
50 | DECLARE_RWLOCK_EXTERN(ip_conntrack_lock); | 49 | extern rwlock_t ip_conntrack_lock; |
51 | #endif /* _IP_CONNTRACK_CORE_H */ | 50 | #endif /* _IP_CONNTRACK_CORE_H */ |
52 | 51 | ||
diff --git a/include/linux/netfilter_ipv4/ip_nat.h b/include/linux/netfilter_ipv4/ip_nat.h index 2b72b86176f0..e201ec6e9905 100644 --- a/include/linux/netfilter_ipv4/ip_nat.h +++ b/include/linux/netfilter_ipv4/ip_nat.h | |||
@@ -50,10 +50,9 @@ struct ip_nat_multi_range_compat | |||
50 | 50 | ||
51 | #ifdef __KERNEL__ | 51 | #ifdef __KERNEL__ |
52 | #include <linux/list.h> | 52 | #include <linux/list.h> |
53 | #include <linux/netfilter_ipv4/lockhelp.h> | ||
54 | 53 | ||
55 | /* Protects NAT hash tables, and NAT-private part of conntracks. */ | 54 | /* Protects NAT hash tables, and NAT-private part of conntracks. */ |
56 | DECLARE_RWLOCK_EXTERN(ip_nat_lock); | 55 | extern rwlock_t ip_nat_lock; |
57 | 56 | ||
58 | /* The structure embedded in the conntrack structure. */ | 57 | /* The structure embedded in the conntrack structure. */ |
59 | struct ip_nat_info | 58 | struct ip_nat_info |
diff --git a/include/linux/netfilter_ipv4/listhelp.h b/include/linux/netfilter_ipv4/listhelp.h index f2ae7c5e57bb..360429f48737 100644 --- a/include/linux/netfilter_ipv4/listhelp.h +++ b/include/linux/netfilter_ipv4/listhelp.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define _LISTHELP_H | 2 | #define _LISTHELP_H |
3 | #include <linux/config.h> | 3 | #include <linux/config.h> |
4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
5 | #include <linux/netfilter_ipv4/lockhelp.h> | ||
6 | 5 | ||
7 | /* Header to do more comprehensive job than linux/list.h; assume list | 6 | /* Header to do more comprehensive job than linux/list.h; assume list |
8 | is first entry in structure. */ | 7 | is first entry in structure. */ |
diff --git a/include/linux/netfilter_ipv4/lockhelp.h b/include/linux/netfilter_ipv4/lockhelp.h deleted file mode 100644 index a3288633ab46..000000000000 --- a/include/linux/netfilter_ipv4/lockhelp.h +++ /dev/null | |||
@@ -1,129 +0,0 @@ | |||
1 | #ifndef _LOCKHELP_H | ||
2 | #define _LOCKHELP_H | ||
3 | #include <linux/config.h> | ||
4 | |||
5 | #include <linux/spinlock.h> | ||
6 | #include <asm/atomic.h> | ||
7 | #include <linux/interrupt.h> | ||
8 | #include <linux/smp.h> | ||
9 | |||
10 | /* Header to do help in lock debugging. */ | ||
11 | |||
12 | #ifdef CONFIG_NETFILTER_DEBUG | ||
13 | struct spinlock_debug | ||
14 | { | ||
15 | spinlock_t l; | ||
16 | atomic_t locked_by; | ||
17 | }; | ||
18 | |||
19 | struct rwlock_debug | ||
20 | { | ||
21 | rwlock_t l; | ||
22 | long read_locked_map; | ||
23 | long write_locked_map; | ||
24 | }; | ||
25 | |||
26 | #define DECLARE_LOCK(l) \ | ||
27 | struct spinlock_debug l = { SPIN_LOCK_UNLOCKED, ATOMIC_INIT(-1) } | ||
28 | #define DECLARE_LOCK_EXTERN(l) \ | ||
29 | extern struct spinlock_debug l | ||
30 | #define DECLARE_RWLOCK(l) \ | ||
31 | struct rwlock_debug l = { RW_LOCK_UNLOCKED, 0, 0 } | ||
32 | #define DECLARE_RWLOCK_EXTERN(l) \ | ||
33 | extern struct rwlock_debug l | ||
34 | |||
35 | #define MUST_BE_LOCKED(l) \ | ||
36 | do { if (atomic_read(&(l)->locked_by) != smp_processor_id()) \ | ||
37 | printk("ASSERT %s:%u %s unlocked\n", __FILE__, __LINE__, #l); \ | ||
38 | } while(0) | ||
39 | |||
40 | #define MUST_BE_UNLOCKED(l) \ | ||
41 | do { if (atomic_read(&(l)->locked_by) == smp_processor_id()) \ | ||
42 | printk("ASSERT %s:%u %s locked\n", __FILE__, __LINE__, #l); \ | ||
43 | } while(0) | ||
44 | |||
45 | /* Write locked OK as well. */ | ||
46 | #define MUST_BE_READ_LOCKED(l) \ | ||
47 | do { if (!((l)->read_locked_map & (1UL << smp_processor_id())) \ | ||
48 | && !((l)->write_locked_map & (1UL << smp_processor_id()))) \ | ||
49 | printk("ASSERT %s:%u %s not readlocked\n", __FILE__, __LINE__, #l); \ | ||
50 | } while(0) | ||
51 | |||
52 | #define MUST_BE_WRITE_LOCKED(l) \ | ||
53 | do { if (!((l)->write_locked_map & (1UL << smp_processor_id()))) \ | ||
54 | printk("ASSERT %s:%u %s not writelocked\n", __FILE__, __LINE__, #l); \ | ||
55 | } while(0) | ||
56 | |||
57 | #define MUST_BE_READ_WRITE_UNLOCKED(l) \ | ||
58 | do { if ((l)->read_locked_map & (1UL << smp_processor_id())) \ | ||
59 | printk("ASSERT %s:%u %s readlocked\n", __FILE__, __LINE__, #l); \ | ||
60 | else if ((l)->write_locked_map & (1UL << smp_processor_id())) \ | ||
61 | printk("ASSERT %s:%u %s writelocked\n", __FILE__, __LINE__, #l); \ | ||
62 | } while(0) | ||
63 | |||
64 | #define LOCK_BH(lk) \ | ||
65 | do { \ | ||
66 | MUST_BE_UNLOCKED(lk); \ | ||
67 | spin_lock_bh(&(lk)->l); \ | ||
68 | atomic_set(&(lk)->locked_by, smp_processor_id()); \ | ||
69 | } while(0) | ||
70 | |||
71 | #define UNLOCK_BH(lk) \ | ||
72 | do { \ | ||
73 | MUST_BE_LOCKED(lk); \ | ||
74 | atomic_set(&(lk)->locked_by, -1); \ | ||
75 | spin_unlock_bh(&(lk)->l); \ | ||
76 | } while(0) | ||
77 | |||
78 | #define READ_LOCK(lk) \ | ||
79 | do { \ | ||
80 | MUST_BE_READ_WRITE_UNLOCKED(lk); \ | ||
81 | read_lock_bh(&(lk)->l); \ | ||
82 | set_bit(smp_processor_id(), &(lk)->read_locked_map); \ | ||
83 | } while(0) | ||
84 | |||
85 | #define WRITE_LOCK(lk) \ | ||
86 | do { \ | ||
87 | MUST_BE_READ_WRITE_UNLOCKED(lk); \ | ||
88 | write_lock_bh(&(lk)->l); \ | ||
89 | set_bit(smp_processor_id(), &(lk)->write_locked_map); \ | ||
90 | } while(0) | ||
91 | |||
92 | #define READ_UNLOCK(lk) \ | ||
93 | do { \ | ||
94 | if (!((lk)->read_locked_map & (1UL << smp_processor_id()))) \ | ||
95 | printk("ASSERT: %s:%u %s not readlocked\n", \ | ||
96 | __FILE__, __LINE__, #lk); \ | ||
97 | clear_bit(smp_processor_id(), &(lk)->read_locked_map); \ | ||
98 | read_unlock_bh(&(lk)->l); \ | ||
99 | } while(0) | ||
100 | |||
101 | #define WRITE_UNLOCK(lk) \ | ||
102 | do { \ | ||
103 | MUST_BE_WRITE_LOCKED(lk); \ | ||
104 | clear_bit(smp_processor_id(), &(lk)->write_locked_map); \ | ||
105 | write_unlock_bh(&(lk)->l); \ | ||
106 | } while(0) | ||
107 | |||
108 | #else | ||
109 | #define DECLARE_LOCK(l) spinlock_t l = SPIN_LOCK_UNLOCKED | ||
110 | #define DECLARE_LOCK_EXTERN(l) extern spinlock_t l | ||
111 | #define DECLARE_RWLOCK(l) rwlock_t l = RW_LOCK_UNLOCKED | ||
112 | #define DECLARE_RWLOCK_EXTERN(l) extern rwlock_t l | ||
113 | |||
114 | #define MUST_BE_LOCKED(l) | ||
115 | #define MUST_BE_UNLOCKED(l) | ||
116 | #define MUST_BE_READ_LOCKED(l) | ||
117 | #define MUST_BE_WRITE_LOCKED(l) | ||
118 | #define MUST_BE_READ_WRITE_UNLOCKED(l) | ||
119 | |||
120 | #define LOCK_BH(l) spin_lock_bh(l) | ||
121 | #define UNLOCK_BH(l) spin_unlock_bh(l) | ||
122 | |||
123 | #define READ_LOCK(l) read_lock_bh(l) | ||
124 | #define WRITE_LOCK(l) write_lock_bh(l) | ||
125 | #define READ_UNLOCK(l) read_unlock_bh(l) | ||
126 | #define WRITE_UNLOCK(l) write_unlock_bh(l) | ||
127 | #endif /*CONFIG_NETFILTER_DEBUG*/ | ||
128 | |||
129 | #endif /* _LOCKHELP_H */ | ||
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index e38407a23d04..3029cad63a01 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #define NETLINK_SELINUX 7 /* SELinux event notifications */ | 14 | #define NETLINK_SELINUX 7 /* SELinux event notifications */ |
15 | #define NETLINK_ARPD 8 | 15 | #define NETLINK_ARPD 8 |
16 | #define NETLINK_AUDIT 9 /* auditing */ | 16 | #define NETLINK_AUDIT 9 /* auditing */ |
17 | #define NETLINK_FIB_LOOKUP 10 | ||
17 | #define NETLINK_ROUTE6 11 /* af_inet6 route comm channel */ | 18 | #define NETLINK_ROUTE6 11 /* af_inet6 route comm channel */ |
18 | #define NETLINK_IP6_FW 13 | 19 | #define NETLINK_IP6_FW 13 |
19 | #define NETLINK_DNRTMSG 14 /* DECnet routing messages */ | 20 | #define NETLINK_DNRTMSG 14 /* DECnet routing messages */ |
@@ -146,7 +147,7 @@ struct netlink_callback | |||
146 | int (*dump)(struct sk_buff * skb, struct netlink_callback *cb); | 147 | int (*dump)(struct sk_buff * skb, struct netlink_callback *cb); |
147 | int (*done)(struct netlink_callback *cb); | 148 | int (*done)(struct netlink_callback *cb); |
148 | int family; | 149 | int family; |
149 | long args[4]; | 150 | long args[5]; |
150 | }; | 151 | }; |
151 | 152 | ||
152 | struct netlink_notify | 153 | struct netlink_notify |
diff --git a/include/linux/node.h b/include/linux/node.h index 6e0a697e594e..254dc3de650b 100644 --- a/include/linux/node.h +++ b/include/linux/node.h | |||
@@ -27,6 +27,7 @@ struct node { | |||
27 | }; | 27 | }; |
28 | 28 | ||
29 | extern int register_node(struct node *, int, struct node *); | 29 | extern int register_node(struct node *, int, struct node *); |
30 | extern void unregister_node(struct node *node); | ||
30 | 31 | ||
31 | #define to_node(sys_device) container_of(sys_device, struct node, sysdev) | 32 | #define to_node(sys_device) container_of(sys_device, struct node, sysdev) |
32 | 33 | ||
diff --git a/include/linux/pfkeyv2.h b/include/linux/pfkeyv2.h index e6b519220245..724066778aff 100644 --- a/include/linux/pfkeyv2.h +++ b/include/linux/pfkeyv2.h | |||
@@ -245,6 +245,7 @@ struct sadb_x_nat_t_port { | |||
245 | 245 | ||
246 | /* Security Association flags */ | 246 | /* Security Association flags */ |
247 | #define SADB_SAFLAGS_PFS 1 | 247 | #define SADB_SAFLAGS_PFS 1 |
248 | #define SADB_SAFLAGS_NOPMTUDISC 0x20000000 | ||
248 | #define SADB_SAFLAGS_DECAP_DSCP 0x40000000 | 249 | #define SADB_SAFLAGS_DECAP_DSCP 0x40000000 |
249 | #define SADB_SAFLAGS_NOECN 0x80000000 | 250 | #define SADB_SAFLAGS_NOECN 0x80000000 |
250 | 251 | ||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index cc04f5cd2286..d7c839a21842 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -193,7 +193,6 @@ struct skb_shared_info { | |||
193 | * @nfcache: Cache info | 193 | * @nfcache: Cache info |
194 | * @nfct: Associated connection, if any | 194 | * @nfct: Associated connection, if any |
195 | * @nfctinfo: Relationship of this skb to the connection | 195 | * @nfctinfo: Relationship of this skb to the connection |
196 | * @nf_debug: Netfilter debugging | ||
197 | * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c | 196 | * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c |
198 | * @private: Data which is private to the HIPPI implementation | 197 | * @private: Data which is private to the HIPPI implementation |
199 | * @tc_index: Traffic control index | 198 | * @tc_index: Traffic control index |
@@ -264,9 +263,6 @@ struct sk_buff { | |||
264 | __u32 nfcache; | 263 | __u32 nfcache; |
265 | __u32 nfctinfo; | 264 | __u32 nfctinfo; |
266 | struct nf_conntrack *nfct; | 265 | struct nf_conntrack *nfct; |
267 | #ifdef CONFIG_NETFILTER_DEBUG | ||
268 | unsigned int nf_debug; | ||
269 | #endif | ||
270 | #ifdef CONFIG_BRIDGE_NETFILTER | 266 | #ifdef CONFIG_BRIDGE_NETFILTER |
271 | struct nf_bridge_info *nf_bridge; | 267 | struct nf_bridge_info *nf_bridge; |
272 | #endif | 268 | #endif |
@@ -1219,15 +1215,6 @@ static inline void nf_reset(struct sk_buff *skb) | |||
1219 | { | 1215 | { |
1220 | nf_conntrack_put(skb->nfct); | 1216 | nf_conntrack_put(skb->nfct); |
1221 | skb->nfct = NULL; | 1217 | skb->nfct = NULL; |
1222 | #ifdef CONFIG_NETFILTER_DEBUG | ||
1223 | skb->nf_debug = 0; | ||
1224 | #endif | ||
1225 | } | ||
1226 | static inline void nf_reset_debug(struct sk_buff *skb) | ||
1227 | { | ||
1228 | #ifdef CONFIG_NETFILTER_DEBUG | ||
1229 | skb->nf_debug = 0; | ||
1230 | #endif | ||
1231 | } | 1218 | } |
1232 | 1219 | ||
1233 | #ifdef CONFIG_BRIDGE_NETFILTER | 1220 | #ifdef CONFIG_BRIDGE_NETFILTER |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 38b58b30814a..392da5a6dacb 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -16,13 +16,13 @@ struct kobject; | |||
16 | struct module; | 16 | struct module; |
17 | 17 | ||
18 | struct attribute { | 18 | struct attribute { |
19 | char * name; | 19 | const char * name; |
20 | struct module * owner; | 20 | struct module * owner; |
21 | mode_t mode; | 21 | mode_t mode; |
22 | }; | 22 | }; |
23 | 23 | ||
24 | struct attribute_group { | 24 | struct attribute_group { |
25 | char * name; | 25 | const char * name; |
26 | struct attribute ** attrs; | 26 | struct attribute ** attrs; |
27 | }; | 27 | }; |
28 | 28 | ||
@@ -73,6 +73,7 @@ struct sysfs_dirent { | |||
73 | int s_type; | 73 | int s_type; |
74 | umode_t s_mode; | 74 | umode_t s_mode; |
75 | struct dentry * s_dentry; | 75 | struct dentry * s_dentry; |
76 | struct iattr * s_iattr; | ||
76 | }; | 77 | }; |
77 | 78 | ||
78 | #define SYSFS_ROOT 0x0001 | 79 | #define SYSFS_ROOT 0x0001 |
@@ -105,11 +106,11 @@ sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, mode_t mode); | |||
105 | extern void | 106 | extern void |
106 | sysfs_remove_file(struct kobject *, const struct attribute *); | 107 | sysfs_remove_file(struct kobject *, const struct attribute *); |
107 | 108 | ||
108 | extern int | 109 | extern int |
109 | sysfs_create_link(struct kobject * kobj, struct kobject * target, char * name); | 110 | sysfs_create_link(struct kobject * kobj, struct kobject * target, const char * name); |
110 | 111 | ||
111 | extern void | 112 | extern void |
112 | sysfs_remove_link(struct kobject *, char * name); | 113 | sysfs_remove_link(struct kobject *, const char * name); |
113 | 114 | ||
114 | int sysfs_create_bin_file(struct kobject * kobj, struct bin_attribute * attr); | 115 | int sysfs_create_bin_file(struct kobject * kobj, struct bin_attribute * attr); |
115 | int sysfs_remove_bin_file(struct kobject * kobj, struct bin_attribute * attr); | 116 | int sysfs_remove_bin_file(struct kobject * kobj, struct bin_attribute * attr); |
@@ -153,12 +154,12 @@ static inline void sysfs_remove_file(struct kobject * k, const struct attribute | |||
153 | ; | 154 | ; |
154 | } | 155 | } |
155 | 156 | ||
156 | static inline int sysfs_create_link(struct kobject * k, struct kobject * t, char * n) | 157 | static inline int sysfs_create_link(struct kobject * k, struct kobject * t, const char * n) |
157 | { | 158 | { |
158 | return 0; | 159 | return 0; |
159 | } | 160 | } |
160 | 161 | ||
161 | static inline void sysfs_remove_link(struct kobject * k, char * name) | 162 | static inline void sysfs_remove_link(struct kobject * k, const char * name) |
162 | { | 163 | { |
163 | ; | 164 | ; |
164 | } | 165 | } |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 2d1ac5058534..3d508bf08402 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -287,15 +287,14 @@ struct usb_bus { | |||
287 | 287 | ||
288 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the bus */ | 288 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the bus */ |
289 | 289 | ||
290 | struct class_device class_dev; /* class device for this bus */ | 290 | struct class_device *class_dev; /* class device for this bus */ |
291 | struct kref kref; /* handles reference counting this bus */ | ||
291 | void (*release)(struct usb_bus *bus); /* function to destroy this bus's memory */ | 292 | void (*release)(struct usb_bus *bus); /* function to destroy this bus's memory */ |
292 | #if defined(CONFIG_USB_MON) || defined(CONFIG_USB_MON_MODULE) | 293 | #if defined(CONFIG_USB_MON) || defined(CONFIG_USB_MON_MODULE) |
293 | struct mon_bus *mon_bus; /* non-null when associated */ | 294 | struct mon_bus *mon_bus; /* non-null when associated */ |
294 | int monitored; /* non-zero when monitored */ | 295 | int monitored; /* non-zero when monitored */ |
295 | #endif | 296 | #endif |
296 | }; | 297 | }; |
297 | #define to_usb_bus(d) container_of(d, struct usb_bus, class_dev) | ||
298 | |||
299 | 298 | ||
300 | /* -------------------------------------------------------------------------- */ | 299 | /* -------------------------------------------------------------------------- */ |
301 | 300 | ||
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index d68391a9b9f3..f0d423300d84 100644 --- a/include/linux/xfrm.h +++ b/include/linux/xfrm.h | |||
@@ -196,6 +196,7 @@ struct xfrm_usersa_info { | |||
196 | __u8 flags; | 196 | __u8 flags; |
197 | #define XFRM_STATE_NOECN 1 | 197 | #define XFRM_STATE_NOECN 1 |
198 | #define XFRM_STATE_DECAP_DSCP 2 | 198 | #define XFRM_STATE_DECAP_DSCP 2 |
199 | #define XFRM_STATE_NOPMTUDISC 4 | ||
199 | }; | 200 | }; |
200 | 201 | ||
201 | struct xfrm_usersa_id { | 202 | struct xfrm_usersa_id { |