diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-11-18 15:37:07 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-11-18 15:37:07 -0500 |
| commit | 5177dc3f2b3220b2dcfcf35eb9e6ec53ee818231 (patch) | |
| tree | 29dd80a7b33426d0890aa07b5864224557c62af7 /include/linux | |
| parent | 0bb943c7a2136716757a263f604d26309fd98042 (diff) | |
| parent | 7f0f598a0069d1ab072375965a4b69137233169c (diff) | |
Merge branch 'linus' into tracing/urgent
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/acpi.h | 48 | ||||
| -rw-r--r-- | include/linux/c2port.h | 65 | ||||
| -rw-r--r-- | include/linux/genhd.h | 4 | ||||
| -rw-r--r-- | include/linux/hrtimer.h | 5 | ||||
| -rw-r--r-- | include/linux/inotify.h | 11 | ||||
| -rw-r--r-- | include/linux/input.h | 2 | ||||
| -rw-r--r-- | include/linux/kernel.h | 42 | ||||
| -rw-r--r-- | include/linux/lockdep.h | 5 | ||||
| -rw-r--r-- | include/linux/mfd/wm8350/rtc.h | 2 | ||||
| -rw-r--r-- | include/linux/ratelimit.h | 7 | ||||
| -rw-r--r-- | include/linux/serial_core.h | 3 | ||||
| -rw-r--r-- | include/linux/slab.h | 28 | ||||
| -rw-r--r-- | include/linux/usb.h | 2 |
13 files changed, 186 insertions, 38 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index fd6a452b0ceb..fba8051fb297 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -163,8 +163,6 @@ struct acpi_pci_driver { | |||
| 163 | int acpi_pci_register_driver(struct acpi_pci_driver *driver); | 163 | int acpi_pci_register_driver(struct acpi_pci_driver *driver); |
| 164 | void acpi_pci_unregister_driver(struct acpi_pci_driver *driver); | 164 | void acpi_pci_unregister_driver(struct acpi_pci_driver *driver); |
| 165 | 165 | ||
| 166 | #ifdef CONFIG_ACPI_EC | ||
| 167 | |||
| 168 | extern int ec_read(u8 addr, u8 *val); | 166 | extern int ec_read(u8 addr, u8 *val); |
| 169 | extern int ec_write(u8 addr, u8 val); | 167 | extern int ec_write(u8 addr, u8 val); |
| 170 | extern int ec_transaction(u8 command, | 168 | extern int ec_transaction(u8 command, |
| @@ -172,8 +170,6 @@ extern int ec_transaction(u8 command, | |||
| 172 | u8 *rdata, unsigned rdata_len, | 170 | u8 *rdata, unsigned rdata_len, |
| 173 | int force_poll); | 171 | int force_poll); |
| 174 | 172 | ||
| 175 | #endif /*CONFIG_ACPI_EC*/ | ||
| 176 | |||
| 177 | #if defined(CONFIG_ACPI_WMI) || defined(CONFIG_ACPI_WMI_MODULE) | 173 | #if defined(CONFIG_ACPI_WMI) || defined(CONFIG_ACPI_WMI_MODULE) |
| 178 | 174 | ||
| 179 | typedef void (*wmi_notify_handler) (u32 value, void *context); | 175 | typedef void (*wmi_notify_handler) (u32 value, void *context); |
| @@ -194,6 +190,50 @@ extern bool wmi_has_guid(const char *guid); | |||
| 194 | 190 | ||
| 195 | #endif /* CONFIG_ACPI_WMI */ | 191 | #endif /* CONFIG_ACPI_WMI */ |
| 196 | 192 | ||
| 193 | #define ACPI_VIDEO_OUTPUT_SWITCHING 0x0001 | ||
| 194 | #define ACPI_VIDEO_DEVICE_POSTING 0x0002 | ||
| 195 | #define ACPI_VIDEO_ROM_AVAILABLE 0x0004 | ||
| 196 | #define ACPI_VIDEO_BACKLIGHT 0x0008 | ||
| 197 | #define ACPI_VIDEO_BACKLIGHT_FORCE_VENDOR 0x0010 | ||
| 198 | #define ACPI_VIDEO_BACKLIGHT_FORCE_VIDEO 0x0020 | ||
| 199 | #define ACPI_VIDEO_OUTPUT_SWITCHING_FORCE_VENDOR 0x0040 | ||
| 200 | #define ACPI_VIDEO_OUTPUT_SWITCHING_FORCE_VIDEO 0x0080 | ||
| 201 | #define ACPI_VIDEO_BACKLIGHT_DMI_VENDOR 0x0100 | ||
| 202 | #define ACPI_VIDEO_BACKLIGHT_DMI_VIDEO 0x0200 | ||
| 203 | #define ACPI_VIDEO_OUTPUT_SWITCHING_DMI_VENDOR 0x0400 | ||
| 204 | #define ACPI_VIDEO_OUTPUT_SWITCHING_DMI_VIDEO 0x0800 | ||
| 205 | |||
| 206 | #if defined(CONFIG_ACPI_VIDEO) || defined(CONFIG_ACPI_VIDEO_MODULE) | ||
| 207 | |||
| 208 | extern long acpi_video_get_capabilities(acpi_handle graphics_dev_handle); | ||
| 209 | extern long acpi_is_video_device(struct acpi_device *device); | ||
| 210 | extern int acpi_video_backlight_support(void); | ||
| 211 | extern int acpi_video_display_switch_support(void); | ||
| 212 | |||
| 213 | #else | ||
| 214 | |||
| 215 | static inline long acpi_video_get_capabilities(acpi_handle graphics_dev_handle) | ||
| 216 | { | ||
| 217 | return 0; | ||
| 218 | } | ||
| 219 | |||
| 220 | static inline long acpi_is_video_device(struct acpi_device *device) | ||
| 221 | { | ||
| 222 | return 0; | ||
| 223 | } | ||
| 224 | |||
| 225 | static inline int acpi_video_backlight_support(void) | ||
| 226 | { | ||
| 227 | return 0; | ||
| 228 | } | ||
| 229 | |||
| 230 | static inline int acpi_video_display_switch_support(void) | ||
| 231 | { | ||
| 232 | return 0; | ||
| 233 | } | ||
| 234 | |||
| 235 | #endif /* defined(CONFIG_ACPI_VIDEO) || defined(CONFIG_ACPI_VIDEO_MODULE) */ | ||
| 236 | |||
| 197 | extern int acpi_blacklisted(void); | 237 | extern int acpi_blacklisted(void); |
| 198 | #ifdef CONFIG_DMI | 238 | #ifdef CONFIG_DMI |
| 199 | extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); | 239 | extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); |
diff --git a/include/linux/c2port.h b/include/linux/c2port.h new file mode 100644 index 000000000000..7b5a2388ba67 --- /dev/null +++ b/include/linux/c2port.h | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | /* | ||
| 2 | * Silicon Labs C2 port Linux support | ||
| 3 | * | ||
| 4 | * Copyright (c) 2007 Rodolfo Giometti <giometti@linux.it> | ||
| 5 | * Copyright (c) 2007 Eurotech S.p.A. <info@eurotech.it> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify it | ||
| 8 | * under the terms of the GNU General Public License version 2 as published by | ||
| 9 | * the Free Software Foundation | ||
| 10 | */ | ||
| 11 | |||
| 12 | #include <linux/device.h> | ||
| 13 | |||
| 14 | #define C2PORT_NAME_LEN 32 | ||
| 15 | |||
| 16 | /* | ||
| 17 | * C2 port basic structs | ||
| 18 | */ | ||
| 19 | |||
| 20 | /* Main struct */ | ||
| 21 | struct c2port_ops; | ||
| 22 | struct c2port_device { | ||
| 23 | unsigned int access:1; | ||
| 24 | unsigned int flash_access:1; | ||
| 25 | |||
| 26 | int id; | ||
| 27 | char name[C2PORT_NAME_LEN]; | ||
| 28 | struct c2port_ops *ops; | ||
| 29 | struct mutex mutex; /* prevent races during read/write */ | ||
| 30 | |||
| 31 | struct device *dev; | ||
| 32 | |||
| 33 | void *private_data; | ||
| 34 | }; | ||
| 35 | |||
| 36 | /* Basic operations */ | ||
| 37 | struct c2port_ops { | ||
| 38 | /* Flash layout */ | ||
| 39 | unsigned short block_size; /* flash block size in bytes */ | ||
| 40 | unsigned short blocks_num; /* flash blocks number */ | ||
| 41 | |||
| 42 | /* Enable or disable the access to C2 port */ | ||
| 43 | void (*access)(struct c2port_device *dev, int status); | ||
| 44 | |||
| 45 | /* Set C2D data line as input/output */ | ||
| 46 | void (*c2d_dir)(struct c2port_device *dev, int dir); | ||
| 47 | |||
| 48 | /* Read/write C2D data line */ | ||
| 49 | int (*c2d_get)(struct c2port_device *dev); | ||
| 50 | void (*c2d_set)(struct c2port_device *dev, int status); | ||
| 51 | |||
| 52 | /* Write C2CK clock line */ | ||
| 53 | void (*c2ck_set)(struct c2port_device *dev, int status); | ||
| 54 | }; | ||
| 55 | |||
| 56 | /* | ||
| 57 | * Exported functions | ||
| 58 | */ | ||
| 59 | |||
| 60 | #define to_class_dev(obj) container_of((obj), struct class_device, kobj) | ||
| 61 | #define to_c2port_device(obj) container_of((obj), struct c2port_device, class) | ||
| 62 | |||
| 63 | extern struct c2port_device *c2port_device_register(char *name, | ||
| 64 | struct c2port_ops *ops, void *devdata); | ||
| 65 | extern void c2port_device_unregister(struct c2port_device *dev); | ||
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index e439e6aed832..3df7742ce246 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
| @@ -522,7 +522,9 @@ extern char *disk_name (struct gendisk *hd, int partno, char *buf); | |||
| 522 | 522 | ||
| 523 | extern int disk_expand_part_tbl(struct gendisk *disk, int target); | 523 | extern int disk_expand_part_tbl(struct gendisk *disk, int target); |
| 524 | extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); | 524 | extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); |
| 525 | extern int __must_check add_partition(struct gendisk *, int, sector_t, sector_t, int); | 525 | extern struct hd_struct * __must_check add_partition(struct gendisk *disk, |
| 526 | int partno, sector_t start, | ||
| 527 | sector_t len, int flags); | ||
| 526 | extern void delete_partition(struct gendisk *, int); | 528 | extern void delete_partition(struct gendisk *, int); |
| 527 | extern void printk_all_partitions(void); | 529 | extern void printk_all_partitions(void); |
| 528 | 530 | ||
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 07e510a3b00a..3eba43878dcb 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
| @@ -46,9 +46,6 @@ enum hrtimer_restart { | |||
| 46 | * hrtimer callback modes: | 46 | * hrtimer callback modes: |
| 47 | * | 47 | * |
| 48 | * HRTIMER_CB_SOFTIRQ: Callback must run in softirq context | 48 | * HRTIMER_CB_SOFTIRQ: Callback must run in softirq context |
| 49 | * HRTIMER_CB_IRQSAFE: Callback may run in hardirq context | ||
| 50 | * HRTIMER_CB_IRQSAFE_NO_RESTART: Callback may run in hardirq context and | ||
| 51 | * does not restart the timer | ||
| 52 | * HRTIMER_CB_IRQSAFE_PERCPU: Callback must run in hardirq context | 49 | * HRTIMER_CB_IRQSAFE_PERCPU: Callback must run in hardirq context |
| 53 | * Special mode for tick emulation and | 50 | * Special mode for tick emulation and |
| 54 | * scheduler timer. Such timers are per | 51 | * scheduler timer. Such timers are per |
| @@ -61,8 +58,6 @@ enum hrtimer_restart { | |||
| 61 | */ | 58 | */ |
| 62 | enum hrtimer_cb_mode { | 59 | enum hrtimer_cb_mode { |
| 63 | HRTIMER_CB_SOFTIRQ, | 60 | HRTIMER_CB_SOFTIRQ, |
| 64 | HRTIMER_CB_IRQSAFE, | ||
| 65 | HRTIMER_CB_IRQSAFE_NO_RESTART, | ||
| 66 | HRTIMER_CB_IRQSAFE_PERCPU, | 61 | HRTIMER_CB_IRQSAFE_PERCPU, |
| 67 | HRTIMER_CB_IRQSAFE_UNLOCKED, | 62 | HRTIMER_CB_IRQSAFE_UNLOCKED, |
| 68 | }; | 63 | }; |
diff --git a/include/linux/inotify.h b/include/linux/inotify.h index bd578578a8b9..37ea2894b3c0 100644 --- a/include/linux/inotify.h +++ b/include/linux/inotify.h | |||
| @@ -134,6 +134,8 @@ extern void inotify_remove_watch_locked(struct inotify_handle *, | |||
| 134 | struct inotify_watch *); | 134 | struct inotify_watch *); |
| 135 | extern void get_inotify_watch(struct inotify_watch *); | 135 | extern void get_inotify_watch(struct inotify_watch *); |
| 136 | extern void put_inotify_watch(struct inotify_watch *); | 136 | extern void put_inotify_watch(struct inotify_watch *); |
| 137 | extern int pin_inotify_watch(struct inotify_watch *); | ||
| 138 | extern void unpin_inotify_watch(struct inotify_watch *); | ||
| 137 | 139 | ||
| 138 | #else | 140 | #else |
| 139 | 141 | ||
| @@ -228,6 +230,15 @@ static inline void put_inotify_watch(struct inotify_watch *watch) | |||
| 228 | { | 230 | { |
| 229 | } | 231 | } |
| 230 | 232 | ||
| 233 | extern inline int pin_inotify_watch(struct inotify_watch *watch) | ||
| 234 | { | ||
| 235 | return 0; | ||
| 236 | } | ||
| 237 | |||
| 238 | extern inline void unpin_inotify_watch(struct inotify_watch *watch) | ||
| 239 | { | ||
| 240 | } | ||
| 241 | |||
| 231 | #endif /* CONFIG_INOTIFY */ | 242 | #endif /* CONFIG_INOTIFY */ |
| 232 | 243 | ||
| 233 | #endif /* __KERNEL __ */ | 244 | #endif /* __KERNEL __ */ |
diff --git a/include/linux/input.h b/include/linux/input.h index b86fb5581ce6..5341e8251f8c 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -238,6 +238,7 @@ struct input_absinfo { | |||
| 238 | #define KEY_KPEQUAL 117 | 238 | #define KEY_KPEQUAL 117 |
| 239 | #define KEY_KPPLUSMINUS 118 | 239 | #define KEY_KPPLUSMINUS 118 |
| 240 | #define KEY_PAUSE 119 | 240 | #define KEY_PAUSE 119 |
| 241 | #define KEY_SCALE 120 /* AL Compiz Scale (Expose) */ | ||
| 241 | 242 | ||
| 242 | #define KEY_KPCOMMA 121 | 243 | #define KEY_KPCOMMA 121 |
| 243 | #define KEY_HANGEUL 122 | 244 | #define KEY_HANGEUL 122 |
| @@ -322,6 +323,7 @@ struct input_absinfo { | |||
| 322 | #define KEY_PAUSECD 201 | 323 | #define KEY_PAUSECD 201 |
| 323 | #define KEY_PROG3 202 | 324 | #define KEY_PROG3 202 |
| 324 | #define KEY_PROG4 203 | 325 | #define KEY_PROG4 203 |
| 326 | #define KEY_DASHBOARD 204 /* AL Dashboard */ | ||
| 325 | #define KEY_SUSPEND 205 | 327 | #define KEY_SUSPEND 205 |
| 326 | #define KEY_CLOSE 206 /* AC Close */ | 328 | #define KEY_CLOSE 206 /* AC Close */ |
| 327 | #define KEY_PLAY 207 | 329 | #define KEY_PLAY 207 |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index fba141d3ca07..dc7e0d0a6474 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -318,32 +318,36 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
| 318 | return buf; | 318 | return buf; |
| 319 | } | 319 | } |
| 320 | 320 | ||
| 321 | #define pr_emerg(fmt, arg...) \ | 321 | #ifndef pr_fmt |
| 322 | printk(KERN_EMERG fmt, ##arg) | 322 | #define pr_fmt(fmt) fmt |
| 323 | #define pr_alert(fmt, arg...) \ | 323 | #endif |
| 324 | printk(KERN_ALERT fmt, ##arg) | 324 | |
| 325 | #define pr_crit(fmt, arg...) \ | 325 | #define pr_emerg(fmt, ...) \ |
| 326 | printk(KERN_CRIT fmt, ##arg) | 326 | printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) |
| 327 | #define pr_err(fmt, arg...) \ | 327 | #define pr_alert(fmt, ...) \ |
| 328 | printk(KERN_ERR fmt, ##arg) | 328 | printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) |
| 329 | #define pr_warning(fmt, arg...) \ | 329 | #define pr_crit(fmt, ...) \ |
| 330 | printk(KERN_WARNING fmt, ##arg) | 330 | printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) |
| 331 | #define pr_notice(fmt, arg...) \ | 331 | #define pr_err(fmt, ...) \ |
| 332 | printk(KERN_NOTICE fmt, ##arg) | 332 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) |
| 333 | #define pr_info(fmt, arg...) \ | 333 | #define pr_warning(fmt, ...) \ |
| 334 | printk(KERN_INFO fmt, ##arg) | 334 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) |
| 335 | #define pr_notice(fmt, ...) \ | ||
| 336 | printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) | ||
| 337 | #define pr_info(fmt, ...) \ | ||
| 338 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | ||
| 335 | 339 | ||
| 336 | /* If you are writing a driver, please use dev_dbg instead */ | 340 | /* If you are writing a driver, please use dev_dbg instead */ |
| 337 | #if defined(CONFIG_DYNAMIC_PRINTK_DEBUG) | 341 | #if defined(CONFIG_DYNAMIC_PRINTK_DEBUG) |
| 338 | #define pr_debug(fmt, ...) do { \ | 342 | #define pr_debug(fmt, ...) do { \ |
| 339 | dynamic_pr_debug(fmt, ##__VA_ARGS__); \ | 343 | dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \ |
| 340 | } while (0) | 344 | } while (0) |
| 341 | #elif defined(DEBUG) | 345 | #elif defined(DEBUG) |
| 342 | #define pr_debug(fmt, arg...) \ | 346 | #define pr_debug(fmt, ...) \ |
| 343 | printk(KERN_DEBUG fmt, ##arg) | 347 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) |
| 344 | #else | 348 | #else |
| 345 | #define pr_debug(fmt, arg...) \ | 349 | #define pr_debug(fmt, ...) \ |
| 346 | ({ if (0) printk(KERN_DEBUG fmt, ##arg); 0; }) | 350 | ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) |
| 347 | #endif | 351 | #endif |
| 348 | 352 | ||
| 349 | /* | 353 | /* |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 331e5f1c2d8e..29aec6e10020 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
| @@ -331,10 +331,11 @@ static inline void lockdep_on(void) | |||
| 331 | # define lock_set_subclass(l, s, i) do { } while (0) | 331 | # define lock_set_subclass(l, s, i) do { } while (0) |
| 332 | # define lockdep_init() do { } while (0) | 332 | # define lockdep_init() do { } while (0) |
| 333 | # define lockdep_info() do { } while (0) | 333 | # define lockdep_info() do { } while (0) |
| 334 | # define lockdep_init_map(lock, name, key, sub) do { (void)(key); } while (0) | 334 | # define lockdep_init_map(lock, name, key, sub) \ |
| 335 | do { (void)(name); (void)(key); } while (0) | ||
| 335 | # define lockdep_set_class(lock, key) do { (void)(key); } while (0) | 336 | # define lockdep_set_class(lock, key) do { (void)(key); } while (0) |
| 336 | # define lockdep_set_class_and_name(lock, key, name) \ | 337 | # define lockdep_set_class_and_name(lock, key, name) \ |
| 337 | do { (void)(key); } while (0) | 338 | do { (void)(key); (void)(name); } while (0) |
| 338 | #define lockdep_set_class_and_subclass(lock, key, sub) \ | 339 | #define lockdep_set_class_and_subclass(lock, key, sub) \ |
| 339 | do { (void)(key); } while (0) | 340 | do { (void)(key); } while (0) |
| 340 | #define lockdep_set_subclass(lock, sub) do { } while (0) | 341 | #define lockdep_set_subclass(lock, sub) do { } while (0) |
diff --git a/include/linux/mfd/wm8350/rtc.h b/include/linux/mfd/wm8350/rtc.h index dfda69e9f440..24add2bef6c9 100644 --- a/include/linux/mfd/wm8350/rtc.h +++ b/include/linux/mfd/wm8350/rtc.h | |||
| @@ -261,6 +261,8 @@ | |||
| 261 | 261 | ||
| 262 | struct wm8350_rtc { | 262 | struct wm8350_rtc { |
| 263 | struct platform_device *pdev; | 263 | struct platform_device *pdev; |
| 264 | struct rtc_device *rtc; | ||
| 265 | int alarm_enabled; /* used over suspend/resume */ | ||
| 264 | }; | 266 | }; |
| 265 | 267 | ||
| 266 | #endif | 268 | #endif |
diff --git a/include/linux/ratelimit.h b/include/linux/ratelimit.h index 18a5b9ba9d40..00044b856453 100644 --- a/include/linux/ratelimit.h +++ b/include/linux/ratelimit.h | |||
| @@ -17,11 +17,4 @@ struct ratelimit_state { | |||
| 17 | struct ratelimit_state name = {interval, burst,} | 17 | struct ratelimit_state name = {interval, burst,} |
| 18 | 18 | ||
| 19 | extern int __ratelimit(struct ratelimit_state *rs); | 19 | extern int __ratelimit(struct ratelimit_state *rs); |
| 20 | |||
| 21 | static inline int ratelimit(void) | ||
| 22 | { | ||
| 23 | static DEFINE_RATELIMIT_STATE(rs, DEFAULT_RATELIMIT_INTERVAL, | ||
| 24 | DEFAULT_RATELIMIT_BURST); | ||
| 25 | return __ratelimit(&rs); | ||
| 26 | } | ||
| 27 | #endif | 20 | #endif |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index e27f216361fc..4e4f1277f3bf 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
| @@ -155,6 +155,9 @@ | |||
| 155 | 155 | ||
| 156 | #define PORT_SC26XX 82 | 156 | #define PORT_SC26XX 82 |
| 157 | 157 | ||
| 158 | /* SH-SCI */ | ||
| 159 | #define PORT_SCIFA 83 | ||
| 160 | |||
| 158 | #ifdef __KERNEL__ | 161 | #ifdef __KERNEL__ |
| 159 | 162 | ||
| 160 | #include <linux/compiler.h> | 163 | #include <linux/compiler.h> |
diff --git a/include/linux/slab.h b/include/linux/slab.h index ba965c84ae06..000da12b5cf0 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
| @@ -23,6 +23,34 @@ | |||
| 23 | #define SLAB_CACHE_DMA 0x00004000UL /* Use GFP_DMA memory */ | 23 | #define SLAB_CACHE_DMA 0x00004000UL /* Use GFP_DMA memory */ |
| 24 | #define SLAB_STORE_USER 0x00010000UL /* DEBUG: Store the last owner for bug hunting */ | 24 | #define SLAB_STORE_USER 0x00010000UL /* DEBUG: Store the last owner for bug hunting */ |
| 25 | #define SLAB_PANIC 0x00040000UL /* Panic if kmem_cache_create() fails */ | 25 | #define SLAB_PANIC 0x00040000UL /* Panic if kmem_cache_create() fails */ |
| 26 | /* | ||
| 27 | * SLAB_DESTROY_BY_RCU - **WARNING** READ THIS! | ||
| 28 | * | ||
| 29 | * This delays freeing the SLAB page by a grace period, it does _NOT_ | ||
| 30 | * delay object freeing. This means that if you do kmem_cache_free() | ||
| 31 | * that memory location is free to be reused at any time. Thus it may | ||
| 32 | * be possible to see another object there in the same RCU grace period. | ||
| 33 | * | ||
| 34 | * This feature only ensures the memory location backing the object | ||
| 35 | * stays valid, the trick to using this is relying on an independent | ||
| 36 | * object validation pass. Something like: | ||
| 37 | * | ||
| 38 | * rcu_read_lock() | ||
| 39 | * again: | ||
| 40 | * obj = lockless_lookup(key); | ||
| 41 | * if (obj) { | ||
| 42 | * if (!try_get_ref(obj)) // might fail for free objects | ||
| 43 | * goto again; | ||
| 44 | * | ||
| 45 | * if (obj->key != key) { // not the object we expected | ||
| 46 | * put_ref(obj); | ||
| 47 | * goto again; | ||
| 48 | * } | ||
| 49 | * } | ||
| 50 | * rcu_read_unlock(); | ||
| 51 | * | ||
| 52 | * See also the comment on struct slab_rcu in mm/slab.c. | ||
| 53 | */ | ||
| 26 | #define SLAB_DESTROY_BY_RCU 0x00080000UL /* Defer freeing slabs to RCU */ | 54 | #define SLAB_DESTROY_BY_RCU 0x00080000UL /* Defer freeing slabs to RCU */ |
| 27 | #define SLAB_MEM_SPREAD 0x00100000UL /* Spread some memory over cpuset */ | 55 | #define SLAB_MEM_SPREAD 0x00100000UL /* Spread some memory over cpuset */ |
| 28 | #define SLAB_TRACE 0x00200000UL /* Trace allocations and frees */ | 56 | #define SLAB_TRACE 0x00200000UL /* Trace allocations and frees */ |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 8fa973bede5e..f72aa51f7bcd 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
| @@ -108,6 +108,7 @@ enum usb_interface_condition { | |||
| 108 | * (in probe()), bound to a driver, or unbinding (in disconnect()) | 108 | * (in probe()), bound to a driver, or unbinding (in disconnect()) |
| 109 | * @is_active: flag set when the interface is bound and not suspended. | 109 | * @is_active: flag set when the interface is bound and not suspended. |
| 110 | * @sysfs_files_created: sysfs attributes exist | 110 | * @sysfs_files_created: sysfs attributes exist |
| 111 | * @unregistering: flag set when the interface is being unregistered | ||
| 111 | * @needs_remote_wakeup: flag set when the driver requires remote-wakeup | 112 | * @needs_remote_wakeup: flag set when the driver requires remote-wakeup |
| 112 | * capability during autosuspend. | 113 | * capability during autosuspend. |
| 113 | * @needs_altsetting0: flag set when a set-interface request for altsetting 0 | 114 | * @needs_altsetting0: flag set when a set-interface request for altsetting 0 |
| @@ -163,6 +164,7 @@ struct usb_interface { | |||
| 163 | enum usb_interface_condition condition; /* state of binding */ | 164 | enum usb_interface_condition condition; /* state of binding */ |
| 164 | unsigned is_active:1; /* the interface is not suspended */ | 165 | unsigned is_active:1; /* the interface is not suspended */ |
| 165 | unsigned sysfs_files_created:1; /* the sysfs attributes exist */ | 166 | unsigned sysfs_files_created:1; /* the sysfs attributes exist */ |
| 167 | unsigned unregistering:1; /* unregistration is in progress */ | ||
| 166 | unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ | 168 | unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ |
| 167 | unsigned needs_altsetting0:1; /* switch to altsetting 0 is pending */ | 169 | unsigned needs_altsetting0:1; /* switch to altsetting 0 is pending */ |
| 168 | unsigned needs_binding:1; /* needs delayed unbind/rebind */ | 170 | unsigned needs_binding:1; /* needs delayed unbind/rebind */ |
