diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/blkdev.h | 7 | ||||
-rw-r--r-- | include/linux/blktrace_api.h | 12 | ||||
-rw-r--r-- | include/linux/device.h | 35 | ||||
-rw-r--r-- | include/linux/elevator.h | 4 | ||||
-rw-r--r-- | include/linux/fb.h | 8 | ||||
-rw-r--r-- | include/linux/ioport.h | 1 | ||||
-rw-r--r-- | include/linux/ixjuser.h | 2 | ||||
-rw-r--r-- | include/linux/jiffies.h | 2 | ||||
-rw-r--r-- | include/linux/kernel.h | 2 | ||||
-rw-r--r-- | include/linux/kobject.h | 8 | ||||
-rw-r--r-- | include/linux/miscdevice.h | 5 | ||||
-rw-r--r-- | include/linux/mmc/host.h | 8 | ||||
-rw-r--r-- | include/linux/module.h | 1 | ||||
-rw-r--r-- | include/linux/mqueue.h | 2 | ||||
-rw-r--r-- | include/linux/netdevice.h | 6 | ||||
-rw-r--r-- | include/linux/pci.h | 3 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 7 | ||||
-rw-r--r-- | include/linux/pci_regs.h | 6 | ||||
-rw-r--r-- | include/linux/platform_device.h | 6 | ||||
-rw-r--r-- | include/linux/reiserfs_fs_sb.h | 2 | ||||
-rw-r--r-- | include/linux/sysfs.h | 8 | ||||
-rw-r--r-- | include/linux/textsearch.h | 4 | ||||
-rw-r--r-- | include/linux/tty.h | 5 | ||||
-rw-r--r-- | include/linux/usb.h | 181 |
24 files changed, 275 insertions, 50 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 7bfcde2d5578..e1c7286165ff 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -678,10 +678,11 @@ extern void __blk_stop_queue(request_queue_t *q); | |||
678 | extern void blk_run_queue(request_queue_t *); | 678 | extern void blk_run_queue(request_queue_t *); |
679 | extern void blk_start_queueing(request_queue_t *); | 679 | extern void blk_start_queueing(request_queue_t *); |
680 | extern void blk_queue_activity_fn(request_queue_t *, activity_fn *, void *); | 680 | extern void blk_queue_activity_fn(request_queue_t *, activity_fn *, void *); |
681 | extern int blk_rq_map_user(request_queue_t *, struct request *, void __user *, unsigned int); | 681 | extern int blk_rq_map_user(request_queue_t *, struct request *, void __user *, unsigned long); |
682 | extern int blk_rq_unmap_user(struct bio *, unsigned int); | 682 | extern int blk_rq_unmap_user(struct request *); |
683 | extern int blk_rq_map_kern(request_queue_t *, struct request *, void *, unsigned int, gfp_t); | 683 | extern int blk_rq_map_kern(request_queue_t *, struct request *, void *, unsigned int, gfp_t); |
684 | extern int blk_rq_map_user_iov(request_queue_t *, struct request *, struct sg_iovec *, int); | 684 | extern int blk_rq_map_user_iov(request_queue_t *, struct request *, |
685 | struct sg_iovec *, int, unsigned int); | ||
685 | extern int blk_execute_rq(request_queue_t *, struct gendisk *, | 686 | extern int blk_execute_rq(request_queue_t *, struct gendisk *, |
686 | struct request *, int); | 687 | struct request *, int); |
687 | extern void blk_execute_rq_nowait(request_queue_t *, struct gendisk *, | 688 | extern void blk_execute_rq_nowait(request_queue_t *, struct gendisk *, |
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index b99a714fcac6..3680ff9a30ed 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
@@ -50,6 +50,15 @@ enum blktrace_act { | |||
50 | }; | 50 | }; |
51 | 51 | ||
52 | /* | 52 | /* |
53 | * Notify events. | ||
54 | */ | ||
55 | enum blktrace_notify { | ||
56 | __BLK_TN_PROCESS = 0, /* establish pid/name mapping */ | ||
57 | __BLK_TN_TIMESTAMP, /* include system clock */ | ||
58 | }; | ||
59 | |||
60 | |||
61 | /* | ||
53 | * Trace actions in full. Additionally, read or write is masked | 62 | * Trace actions in full. Additionally, read or write is masked |
54 | */ | 63 | */ |
55 | #define BLK_TA_QUEUE (__BLK_TA_QUEUE | BLK_TC_ACT(BLK_TC_QUEUE)) | 64 | #define BLK_TA_QUEUE (__BLK_TA_QUEUE | BLK_TC_ACT(BLK_TC_QUEUE)) |
@@ -68,6 +77,9 @@ enum blktrace_act { | |||
68 | #define BLK_TA_BOUNCE (__BLK_TA_BOUNCE) | 77 | #define BLK_TA_BOUNCE (__BLK_TA_BOUNCE) |
69 | #define BLK_TA_REMAP (__BLK_TA_REMAP | BLK_TC_ACT(BLK_TC_QUEUE)) | 78 | #define BLK_TA_REMAP (__BLK_TA_REMAP | BLK_TC_ACT(BLK_TC_QUEUE)) |
70 | 79 | ||
80 | #define BLK_TN_PROCESS (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY)) | ||
81 | #define BLK_TN_TIMESTAMP (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY)) | ||
82 | |||
71 | #define BLK_IO_TRACE_MAGIC 0x65617400 | 83 | #define BLK_IO_TRACE_MAGIC 0x65617400 |
72 | #define BLK_IO_TRACE_VERSION 0x07 | 84 | #define BLK_IO_TRACE_VERSION 0x07 |
73 | 85 | ||
diff --git a/include/linux/device.h b/include/linux/device.h index 9d4f6a963936..583a341e016c 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/pm.h> | 21 | #include <linux/pm.h> |
22 | #include <asm/semaphore.h> | 22 | #include <asm/semaphore.h> |
23 | #include <asm/atomic.h> | 23 | #include <asm/atomic.h> |
24 | #include <asm/device.h> | ||
24 | 25 | ||
25 | #define DEVICE_NAME_SIZE 50 | 26 | #define DEVICE_NAME_SIZE 50 |
26 | #define DEVICE_NAME_HALF __stringify(20) /* Less than half to accommodate slop */ | 27 | #define DEVICE_NAME_HALF __stringify(20) /* Less than half to accommodate slop */ |
@@ -42,6 +43,8 @@ struct bus_type { | |||
42 | struct klist klist_devices; | 43 | struct klist klist_devices; |
43 | struct klist klist_drivers; | 44 | struct klist klist_drivers; |
44 | 45 | ||
46 | struct blocking_notifier_head bus_notifier; | ||
47 | |||
45 | struct bus_attribute * bus_attrs; | 48 | struct bus_attribute * bus_attrs; |
46 | struct device_attribute * dev_attrs; | 49 | struct device_attribute * dev_attrs; |
47 | struct driver_attribute * drv_attrs; | 50 | struct driver_attribute * drv_attrs; |
@@ -75,6 +78,29 @@ int __must_check bus_for_each_drv(struct bus_type *bus, | |||
75 | struct device_driver *start, void *data, | 78 | struct device_driver *start, void *data, |
76 | int (*fn)(struct device_driver *, void *)); | 79 | int (*fn)(struct device_driver *, void *)); |
77 | 80 | ||
81 | /* | ||
82 | * Bus notifiers: Get notified of addition/removal of devices | ||
83 | * and binding/unbinding of drivers to devices. | ||
84 | * In the long run, it should be a replacement for the platform | ||
85 | * notify hooks. | ||
86 | */ | ||
87 | struct notifier_block; | ||
88 | |||
89 | extern int bus_register_notifier(struct bus_type *bus, | ||
90 | struct notifier_block *nb); | ||
91 | extern int bus_unregister_notifier(struct bus_type *bus, | ||
92 | struct notifier_block *nb); | ||
93 | |||
94 | /* All 4 notifers below get called with the target struct device * | ||
95 | * as an argument. Note that those functions are likely to be called | ||
96 | * with the device semaphore held in the core, so be careful. | ||
97 | */ | ||
98 | #define BUS_NOTIFY_ADD_DEVICE 0x00000001 /* device added */ | ||
99 | #define BUS_NOTIFY_DEL_DEVICE 0x00000002 /* device removed */ | ||
100 | #define BUS_NOTIFY_BOUND_DRIVER 0x00000003 /* driver bound to device */ | ||
101 | #define BUS_NOTIFY_UNBIND_DRIVER 0x00000004 /* driver about to be | ||
102 | unbound */ | ||
103 | |||
78 | /* driverfs interface for exporting bus attributes */ | 104 | /* driverfs interface for exporting bus attributes */ |
79 | 105 | ||
80 | struct bus_attribute { | 106 | struct bus_attribute { |
@@ -343,8 +369,6 @@ struct device { | |||
343 | void *driver_data; /* data private to the driver */ | 369 | void *driver_data; /* data private to the driver */ |
344 | void *platform_data; /* Platform specific data, device | 370 | void *platform_data; /* Platform specific data, device |
345 | core doesn't touch it */ | 371 | core doesn't touch it */ |
346 | void *firmware_data; /* Firmware specific data (e.g. ACPI, | ||
347 | BIOS data),reserved for device core*/ | ||
348 | struct dev_pm_info power; | 372 | struct dev_pm_info power; |
349 | 373 | ||
350 | u64 *dma_mask; /* dma mask (if dma'able device) */ | 374 | u64 *dma_mask; /* dma mask (if dma'able device) */ |
@@ -358,6 +382,8 @@ struct device { | |||
358 | 382 | ||
359 | struct dma_coherent_mem *dma_mem; /* internal for coherent mem | 383 | struct dma_coherent_mem *dma_mem; /* internal for coherent mem |
360 | override */ | 384 | override */ |
385 | /* arch specific additions */ | ||
386 | struct dev_archdata archdata; | ||
361 | 387 | ||
362 | /* class_device migration path */ | 388 | /* class_device migration path */ |
363 | struct list_head node; | 389 | struct list_head node; |
@@ -395,7 +421,10 @@ extern int __must_check device_add(struct device * dev); | |||
395 | extern void device_del(struct device * dev); | 421 | extern void device_del(struct device * dev); |
396 | extern int device_for_each_child(struct device *, void *, | 422 | extern int device_for_each_child(struct device *, void *, |
397 | int (*fn)(struct device *, void *)); | 423 | int (*fn)(struct device *, void *)); |
424 | extern struct device *device_find_child(struct device *, void *data, | ||
425 | int (*match)(struct device *, void *)); | ||
398 | extern int device_rename(struct device *dev, char *new_name); | 426 | extern int device_rename(struct device *dev, char *new_name); |
427 | extern int device_move(struct device *dev, struct device *new_parent); | ||
399 | 428 | ||
400 | /* | 429 | /* |
401 | * Manual binding of a device to driver. See drivers/base/bus.c | 430 | * Manual binding of a device to driver. See drivers/base/bus.c |
@@ -415,8 +444,6 @@ extern struct device *device_create(struct class *cls, struct device *parent, | |||
415 | __attribute__((format(printf,4,5))); | 444 | __attribute__((format(printf,4,5))); |
416 | extern void device_destroy(struct class *cls, dev_t devt); | 445 | extern void device_destroy(struct class *cls, dev_t devt); |
417 | 446 | ||
418 | extern int virtual_device_parent(struct device *dev); | ||
419 | |||
420 | /* | 447 | /* |
421 | * Platform "fixup" functions - allow the platform to have their say | 448 | * Platform "fixup" functions - allow the platform to have their say |
422 | * about devices and actions that the general device layer doesn't | 449 | * about devices and actions that the general device layer doesn't |
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 2fa9f1144228..a24931d24404 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
@@ -21,11 +21,11 @@ typedef void (elevator_completed_req_fn) (request_queue_t *, struct request *); | |||
21 | typedef int (elevator_may_queue_fn) (request_queue_t *, int); | 21 | typedef int (elevator_may_queue_fn) (request_queue_t *, int); |
22 | 22 | ||
23 | typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, gfp_t); | 23 | typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, gfp_t); |
24 | typedef void (elevator_put_req_fn) (request_queue_t *, struct request *); | 24 | typedef void (elevator_put_req_fn) (struct request *); |
25 | typedef void (elevator_activate_req_fn) (request_queue_t *, struct request *); | 25 | typedef void (elevator_activate_req_fn) (request_queue_t *, struct request *); |
26 | typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *); | 26 | typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *); |
27 | 27 | ||
28 | typedef void *(elevator_init_fn) (request_queue_t *, elevator_t *); | 28 | typedef void *(elevator_init_fn) (request_queue_t *); |
29 | typedef void (elevator_exit_fn) (elevator_t *); | 29 | typedef void (elevator_exit_fn) (elevator_t *); |
30 | 30 | ||
31 | struct elevator_ops | 31 | struct elevator_ops |
diff --git a/include/linux/fb.h b/include/linux/fb.h index 3e69241e6a81..fa23e0671bb3 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -774,8 +774,8 @@ struct fb_info { | |||
774 | #endif | 774 | #endif |
775 | 775 | ||
776 | struct fb_ops *fbops; | 776 | struct fb_ops *fbops; |
777 | struct device *device; | 777 | struct device *device; /* This is the parent */ |
778 | struct class_device *class_device; /* sysfs per device attrs */ | 778 | struct device *dev; /* This is this fb device */ |
779 | int class_flag; /* private sysfs flags */ | 779 | int class_flag; /* private sysfs flags */ |
780 | #ifdef CONFIG_FB_TILEBLITTING | 780 | #ifdef CONFIG_FB_TILEBLITTING |
781 | struct fb_tile_ops *tileops; /* Tile Blitting */ | 781 | struct fb_tile_ops *tileops; /* Tile Blitting */ |
@@ -910,8 +910,8 @@ static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, | |||
910 | /* drivers/video/fbsysfs.c */ | 910 | /* drivers/video/fbsysfs.c */ |
911 | extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev); | 911 | extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev); |
912 | extern void framebuffer_release(struct fb_info *info); | 912 | extern void framebuffer_release(struct fb_info *info); |
913 | extern int fb_init_class_device(struct fb_info *fb_info); | 913 | extern int fb_init_device(struct fb_info *fb_info); |
914 | extern void fb_cleanup_class_device(struct fb_info *head); | 914 | extern void fb_cleanup_device(struct fb_info *head); |
915 | extern void fb_bl_default_curve(struct fb_info *fb_info, u8 off, u8 min, u8 max); | 915 | extern void fb_bl_default_curve(struct fb_info *fb_info, u8 off, u8 min, u8 max); |
916 | 916 | ||
917 | /* drivers/video/fbmon.c */ | 917 | /* drivers/video/fbmon.c */ |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index d42c83399071..cf8696d4a138 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -89,6 +89,7 @@ struct resource_list { | |||
89 | #define IORESOURCE_ROM_ENABLE (1<<0) /* ROM is enabled, same as PCI_ROM_ADDRESS_ENABLE */ | 89 | #define IORESOURCE_ROM_ENABLE (1<<0) /* ROM is enabled, same as PCI_ROM_ADDRESS_ENABLE */ |
90 | #define IORESOURCE_ROM_SHADOW (1<<1) /* ROM is copy at C000:0 */ | 90 | #define IORESOURCE_ROM_SHADOW (1<<1) /* ROM is copy at C000:0 */ |
91 | #define IORESOURCE_ROM_COPY (1<<2) /* ROM is alloc'd copy, resource field overlaid */ | 91 | #define IORESOURCE_ROM_COPY (1<<2) /* ROM is alloc'd copy, resource field overlaid */ |
92 | #define IORESOURCE_ROM_BIOS_COPY (1<<3) /* ROM is BIOS copy, resource field overlaid */ | ||
92 | 93 | ||
93 | /* PC/ISA/whatever - the normal PC address spaces: IO and memory */ | 94 | /* PC/ISA/whatever - the normal PC address spaces: IO and memory */ |
94 | extern struct resource ioport_resource; | 95 | extern struct resource ioport_resource; |
diff --git a/include/linux/ixjuser.h b/include/linux/ixjuser.h index fd1756d3a47e..88b45895746d 100644 --- a/include/linux/ixjuser.h +++ b/include/linux/ixjuser.h | |||
@@ -315,7 +315,7 @@ typedef struct { | |||
315 | * structures. If the freq0 variable is non-zero, the tone table contents | 315 | * structures. If the freq0 variable is non-zero, the tone table contents |
316 | * for the tone_index are updated to the frequencies and gains defined. It | 316 | * for the tone_index are updated to the frequencies and gains defined. It |
317 | * should be noted that DTMF tones cannot be reassigned, so if DTMF tone | 317 | * should be noted that DTMF tones cannot be reassigned, so if DTMF tone |
318 | * table indexs are used in a cadence the frequency and gain variables will | 318 | * table indexes are used in a cadence the frequency and gain variables will |
319 | * be ignored. | 319 | * be ignored. |
320 | * | 320 | * |
321 | * If the array elements contain frequency parameters the driver will | 321 | * If the array elements contain frequency parameters the driver will |
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index c8d5f207c3d4..0ec6e28bccd2 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
@@ -74,7 +74,7 @@ | |||
74 | #define __jiffy_data __attribute__((section(".data"))) | 74 | #define __jiffy_data __attribute__((section(".data"))) |
75 | 75 | ||
76 | /* | 76 | /* |
77 | * The 64-bit value is not volatile - you MUST NOT read it | 77 | * The 64-bit value is not atomic - you MUST NOT read it |
78 | * without sampling the sequence number in xtime_lock. | 78 | * without sampling the sequence number in xtime_lock. |
79 | * get_jiffies_64() will do this for you as appropriate. | 79 | * get_jiffies_64() will do this for you as appropriate. |
80 | */ | 80 | */ |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index b9b5e4ba166a..6738283ac385 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -65,7 +65,7 @@ struct user; | |||
65 | * context (spinlock, irq-handler, ...). | 65 | * context (spinlock, irq-handler, ...). |
66 | * | 66 | * |
67 | * This is a useful debugging help to be able to catch problems early and not | 67 | * This is a useful debugging help to be able to catch problems early and not |
68 | * be biten later when the calling function happens to sleep when it is not | 68 | * be bitten later when the calling function happens to sleep when it is not |
69 | * supposed to. | 69 | * supposed to. |
70 | */ | 70 | */ |
71 | #ifdef CONFIG_PREEMPT_VOLUNTARY | 71 | #ifdef CONFIG_PREEMPT_VOLUNTARY |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index bcd9cd173c2c..d1c8d28fa92e 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -47,6 +47,7 @@ enum kobject_action { | |||
47 | KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices (broken) */ | 47 | KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices (broken) */ |
48 | KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* device offline */ | 48 | KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* device offline */ |
49 | KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* device online */ | 49 | KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* device online */ |
50 | KOBJ_MOVE = (__force kobject_action_t) 0x08, /* device move */ | ||
50 | }; | 51 | }; |
51 | 52 | ||
52 | struct kobject { | 53 | struct kobject { |
@@ -76,6 +77,7 @@ extern int __must_check kobject_add(struct kobject *); | |||
76 | extern void kobject_del(struct kobject *); | 77 | extern void kobject_del(struct kobject *); |
77 | 78 | ||
78 | extern int __must_check kobject_rename(struct kobject *, const char *new_name); | 79 | extern int __must_check kobject_rename(struct kobject *, const char *new_name); |
80 | extern int __must_check kobject_move(struct kobject *, struct kobject *); | ||
79 | 81 | ||
80 | extern int __must_check kobject_register(struct kobject *); | 82 | extern int __must_check kobject_register(struct kobject *); |
81 | extern void kobject_unregister(struct kobject *); | 83 | extern void kobject_unregister(struct kobject *); |
@@ -264,6 +266,8 @@ extern int __must_check subsys_create_file(struct subsystem * , | |||
264 | 266 | ||
265 | #if defined(CONFIG_HOTPLUG) | 267 | #if defined(CONFIG_HOTPLUG) |
266 | void kobject_uevent(struct kobject *kobj, enum kobject_action action); | 268 | void kobject_uevent(struct kobject *kobj, enum kobject_action action); |
269 | void kobject_uevent_env(struct kobject *kobj, enum kobject_action action, | ||
270 | char *envp[]); | ||
267 | 271 | ||
268 | int add_uevent_var(char **envp, int num_envp, int *cur_index, | 272 | int add_uevent_var(char **envp, int num_envp, int *cur_index, |
269 | char *buffer, int buffer_size, int *cur_len, | 273 | char *buffer, int buffer_size, int *cur_len, |
@@ -271,6 +275,10 @@ int add_uevent_var(char **envp, int num_envp, int *cur_index, | |||
271 | __attribute__((format (printf, 7, 8))); | 275 | __attribute__((format (printf, 7, 8))); |
272 | #else | 276 | #else |
273 | static inline void kobject_uevent(struct kobject *kobj, enum kobject_action action) { } | 277 | static inline void kobject_uevent(struct kobject *kobj, enum kobject_action action) { } |
278 | static inline void kobject_uevent_env(struct kobject *kobj, | ||
279 | enum kobject_action action, | ||
280 | char *envp[]) | ||
281 | { } | ||
274 | 282 | ||
275 | static inline int add_uevent_var(char **envp, int num_envp, int *cur_index, | 283 | static inline int add_uevent_var(char **envp, int num_envp, int *cur_index, |
276 | char *buffer, int buffer_size, int *cur_len, | 284 | char *buffer, int buffer_size, int *cur_len, |
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index b03cfb91e228..326da7d500c7 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h | |||
@@ -31,15 +31,14 @@ | |||
31 | #define HPET_MINOR 228 | 31 | #define HPET_MINOR 228 |
32 | 32 | ||
33 | struct device; | 33 | struct device; |
34 | struct class_device; | ||
35 | 34 | ||
36 | struct miscdevice { | 35 | struct miscdevice { |
37 | int minor; | 36 | int minor; |
38 | const char *name; | 37 | const char *name; |
39 | const struct file_operations *fops; | 38 | const struct file_operations *fops; |
40 | struct list_head list; | 39 | struct list_head list; |
41 | struct device *dev; | 40 | struct device *parent; |
42 | struct class_device *class; | 41 | struct device *this_device; |
43 | }; | 42 | }; |
44 | 43 | ||
45 | extern int misc_register(struct miscdevice * misc); | 44 | extern int misc_register(struct miscdevice * misc); |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 587264a58d56..528e7d3fecb1 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -74,8 +74,8 @@ struct mmc_card; | |||
74 | struct device; | 74 | struct device; |
75 | 75 | ||
76 | struct mmc_host { | 76 | struct mmc_host { |
77 | struct device *dev; | 77 | struct device *parent; |
78 | struct class_device class_dev; | 78 | struct device class_dev; |
79 | int index; | 79 | int index; |
80 | const struct mmc_host_ops *ops; | 80 | const struct mmc_host_ops *ops; |
81 | unsigned int f_min; | 81 | unsigned int f_min; |
@@ -125,8 +125,8 @@ static inline void *mmc_priv(struct mmc_host *host) | |||
125 | return (void *)host->private; | 125 | return (void *)host->private; |
126 | } | 126 | } |
127 | 127 | ||
128 | #define mmc_dev(x) ((x)->dev) | 128 | #define mmc_dev(x) ((x)->parent) |
129 | #define mmc_hostname(x) ((x)->class_dev.class_id) | 129 | #define mmc_hostname(x) ((x)->class_dev.bus_id) |
130 | 130 | ||
131 | extern int mmc_suspend_host(struct mmc_host *, pm_message_t); | 131 | extern int mmc_suspend_host(struct mmc_host *, pm_message_t); |
132 | extern int mmc_resume_host(struct mmc_host *); | 132 | extern int mmc_resume_host(struct mmc_host *); |
diff --git a/include/linux/module.h b/include/linux/module.h index d1d00ce8f4ed..9258ffd8a7f0 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -264,6 +264,7 @@ struct module | |||
264 | struct module_attribute *modinfo_attrs; | 264 | struct module_attribute *modinfo_attrs; |
265 | const char *version; | 265 | const char *version; |
266 | const char *srcversion; | 266 | const char *srcversion; |
267 | struct kobject *drivers_dir; | ||
267 | 268 | ||
268 | /* Exported symbols */ | 269 | /* Exported symbols */ |
269 | const struct kernel_symbol *syms; | 270 | const struct kernel_symbol *syms; |
diff --git a/include/linux/mqueue.h b/include/linux/mqueue.h index 8db9d75541a6..8b5a79615fbf 100644 --- a/include/linux/mqueue.h +++ b/include/linux/mqueue.h | |||
@@ -18,8 +18,6 @@ | |||
18 | #ifndef _LINUX_MQUEUE_H | 18 | #ifndef _LINUX_MQUEUE_H |
19 | #define _LINUX_MQUEUE_H | 19 | #define _LINUX_MQUEUE_H |
20 | 20 | ||
21 | #include <linux/types.h> | ||
22 | |||
23 | #define MQ_PRIO_MAX 32768 | 21 | #define MQ_PRIO_MAX 32768 |
24 | /* per-uid limit of kernel memory used by mqueue, in bytes */ | 22 | /* per-uid limit of kernel memory used by mqueue, in bytes */ |
25 | #define MQ_BYTES_MAX 819200 | 23 | #define MQ_BYTES_MAX 819200 |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 9264139bd8df..83b8c4f1d69d 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -93,8 +93,10 @@ struct netpoll_info; | |||
93 | #endif | 93 | #endif |
94 | #endif | 94 | #endif |
95 | 95 | ||
96 | #if !defined(CONFIG_NET_IPIP) && \ | 96 | #if !defined(CONFIG_NET_IPIP) && !defined(CONFIG_NET_IPIP_MODULE) && \ |
97 | !defined(CONFIG_IPV6) && !defined(CONFIG_IPV6_MODULE) | 97 | !defined(CONFIG_NET_IPGRE) && !defined(CONFIG_NET_IPGRE_MODULE) && \ |
98 | !defined(CONFIG_IPV6_SIT) && !defined(CONFIG_IPV6_SIT_MODULE) && \ | ||
99 | !defined(CONFIG_IPV6_TUNNEL) && !defined(CONFIG_IPV6_TUNNEL_MODULE) | ||
98 | #define MAX_HEADER LL_MAX_HEADER | 100 | #define MAX_HEADER LL_MAX_HEADER |
99 | #else | 101 | #else |
100 | #define MAX_HEADER (LL_MAX_HEADER + 48) | 102 | #define MAX_HEADER (LL_MAX_HEADER + 48) |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 09be0f81b27b..01c707261f9c 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <linux/list.h> | 51 | #include <linux/list.h> |
52 | #include <linux/compiler.h> | 52 | #include <linux/compiler.h> |
53 | #include <linux/errno.h> | 53 | #include <linux/errno.h> |
54 | #include <asm/atomic.h> | ||
54 | #include <linux/device.h> | 55 | #include <linux/device.h> |
55 | 56 | ||
56 | /* File state for mmap()s on /proc/bus/pci/X/Y */ | 57 | /* File state for mmap()s on /proc/bus/pci/X/Y */ |
@@ -159,7 +160,6 @@ struct pci_dev { | |||
159 | unsigned int transparent:1; /* Transparent PCI bridge */ | 160 | unsigned int transparent:1; /* Transparent PCI bridge */ |
160 | unsigned int multifunction:1;/* Part of multi-function device */ | 161 | unsigned int multifunction:1;/* Part of multi-function device */ |
161 | /* keep track of device state */ | 162 | /* keep track of device state */ |
162 | unsigned int is_enabled:1; /* pci_enable_device has been called */ | ||
163 | unsigned int is_busmaster:1; /* device is busmaster */ | 163 | unsigned int is_busmaster:1; /* device is busmaster */ |
164 | unsigned int no_msi:1; /* device may not use msi */ | 164 | unsigned int no_msi:1; /* device may not use msi */ |
165 | unsigned int no_d1d2:1; /* only allow d0 or d3 */ | 165 | unsigned int no_d1d2:1; /* only allow d0 or d3 */ |
@@ -167,6 +167,7 @@ struct pci_dev { | |||
167 | unsigned int broken_parity_status:1; /* Device generates false positive parity */ | 167 | unsigned int broken_parity_status:1; /* Device generates false positive parity */ |
168 | unsigned int msi_enabled:1; | 168 | unsigned int msi_enabled:1; |
169 | unsigned int msix_enabled:1; | 169 | unsigned int msix_enabled:1; |
170 | atomic_t enable_cnt; /* pci_enable_device has been called */ | ||
170 | 171 | ||
171 | u32 saved_config_space[16]; /* config space saved at suspend time */ | 172 | u32 saved_config_space[16]; /* config space saved at suspend time */ |
172 | struct hlist_head saved_cap_space; | 173 | struct hlist_head saved_cap_space; |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index fa4e1d799782..e060a7637947 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2211,6 +2211,13 @@ | |||
2211 | #define PCI_DEVICE_ID_INTEL_ICH8_4 0x2815 | 2211 | #define PCI_DEVICE_ID_INTEL_ICH8_4 0x2815 |
2212 | #define PCI_DEVICE_ID_INTEL_ICH8_5 0x283e | 2212 | #define PCI_DEVICE_ID_INTEL_ICH8_5 0x283e |
2213 | #define PCI_DEVICE_ID_INTEL_ICH8_6 0x2850 | 2213 | #define PCI_DEVICE_ID_INTEL_ICH8_6 0x2850 |
2214 | #define PCI_DEVICE_ID_INTEL_ICH9_0 0x2910 | ||
2215 | #define PCI_DEVICE_ID_INTEL_ICH9_1 0x2911 | ||
2216 | #define PCI_DEVICE_ID_INTEL_ICH9_2 0x2912 | ||
2217 | #define PCI_DEVICE_ID_INTEL_ICH9_3 0x2913 | ||
2218 | #define PCI_DEVICE_ID_INTEL_ICH9_4 0x2914 | ||
2219 | #define PCI_DEVICE_ID_INTEL_ICH9_5 0x2915 | ||
2220 | #define PCI_DEVICE_ID_INTEL_ICH9_6 0x2930 | ||
2214 | #define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340 | 2221 | #define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340 |
2215 | #define PCI_DEVICE_ID_INTEL_82830_HB 0x3575 | 2222 | #define PCI_DEVICE_ID_INTEL_82830_HB 0x3575 |
2216 | #define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577 | 2223 | #define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577 |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index c321316f1bc7..064b1dc71c22 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
@@ -292,6 +292,12 @@ | |||
292 | #define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */ | 292 | #define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */ |
293 | #define PCI_MSI_MASK_BIT 16 /* Mask bits register */ | 293 | #define PCI_MSI_MASK_BIT 16 /* Mask bits register */ |
294 | 294 | ||
295 | /* MSI-X registers (these are at offset PCI_MSI_FLAGS) */ | ||
296 | #define PCI_MSIX_FLAGS_QSIZE 0x7FF | ||
297 | #define PCI_MSIX_FLAGS_ENABLE (1 << 15) | ||
298 | #define PCI_MSIX_FLAGS_BIRMASK (7 << 0) | ||
299 | #define PCI_MSIX_FLAGS_BITMASK (1 << 0) | ||
300 | |||
295 | /* CompactPCI Hotswap Register */ | 301 | /* CompactPCI Hotswap Register */ |
296 | 302 | ||
297 | #define PCI_CHSWP_CSR 2 /* Control and Status Register */ | 303 | #define PCI_CHSWP_CSR 2 /* Control and Status Register */ |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 29cd6dee13db..20f47b81d3fa 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -58,6 +58,12 @@ struct platform_driver { | |||
58 | extern int platform_driver_register(struct platform_driver *); | 58 | extern int platform_driver_register(struct platform_driver *); |
59 | extern void platform_driver_unregister(struct platform_driver *); | 59 | extern void platform_driver_unregister(struct platform_driver *); |
60 | 60 | ||
61 | /* non-hotpluggable platform devices may use this so that probe() and | ||
62 | * its support may live in __init sections, conserving runtime memory. | ||
63 | */ | ||
64 | extern int platform_driver_probe(struct platform_driver *driver, | ||
65 | int (*probe)(struct platform_device *)); | ||
66 | |||
61 | #define platform_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev) | 67 | #define platform_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev) |
62 | #define platform_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data)) | 68 | #define platform_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data)) |
63 | 69 | ||
diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h index 73e0becec086..62a7169aed8b 100644 --- a/include/linux/reiserfs_fs_sb.h +++ b/include/linux/reiserfs_fs_sb.h | |||
@@ -429,7 +429,7 @@ enum reiserfs_mount_options { | |||
429 | /* -o hash={tea, rupasov, r5, detect} is meant for properly mounting | 429 | /* -o hash={tea, rupasov, r5, detect} is meant for properly mounting |
430 | ** reiserfs disks from 3.5.19 or earlier. 99% of the time, this option | 430 | ** reiserfs disks from 3.5.19 or earlier. 99% of the time, this option |
431 | ** is not required. If the normal autodection code can't determine which | 431 | ** is not required. If the normal autodection code can't determine which |
432 | ** hash to use (because both hases had the same value for a file) | 432 | ** hash to use (because both hashes had the same value for a file) |
433 | ** use this option to force a specific hash. It won't allow you to override | 433 | ** use this option to force a specific hash. It won't allow you to override |
434 | ** the existing hash on the FS, so if you have a tea hash disk, and mount | 434 | ** the existing hash on the FS, so if you have a tea hash disk, and mount |
435 | ** with -o hash=rupasov, the mount will fail. | 435 | ** with -o hash=rupasov, the mount will fail. |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 6d5c43d31dec..2129d1b6c874 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -97,6 +97,9 @@ extern int __must_check | |||
97 | sysfs_rename_dir(struct kobject *, const char *new_name); | 97 | sysfs_rename_dir(struct kobject *, const char *new_name); |
98 | 98 | ||
99 | extern int __must_check | 99 | extern int __must_check |
100 | sysfs_move_dir(struct kobject *, struct kobject *); | ||
101 | |||
102 | extern int __must_check | ||
100 | sysfs_create_file(struct kobject *, const struct attribute *); | 103 | sysfs_create_file(struct kobject *, const struct attribute *); |
101 | 104 | ||
102 | extern int __must_check | 105 | extern int __must_check |
@@ -142,6 +145,11 @@ static inline int sysfs_rename_dir(struct kobject * k, const char *new_name) | |||
142 | return 0; | 145 | return 0; |
143 | } | 146 | } |
144 | 147 | ||
148 | static inline int sysfs_move_dir(struct kobject * k, struct kobject * new_parent) | ||
149 | { | ||
150 | return 0; | ||
151 | } | ||
152 | |||
145 | static inline int sysfs_create_file(struct kobject * k, const struct attribute * a) | 153 | static inline int sysfs_create_file(struct kobject * k, const struct attribute * a) |
146 | { | 154 | { |
147 | return 0; | 155 | return 0; |
diff --git a/include/linux/textsearch.h b/include/linux/textsearch.h index 7dac8f04d28e..004808a6df1d 100644 --- a/include/linux/textsearch.h +++ b/include/linux/textsearch.h | |||
@@ -20,7 +20,7 @@ struct ts_config; | |||
20 | /** | 20 | /** |
21 | * struct ts_state - search state | 21 | * struct ts_state - search state |
22 | * @offset: offset for next match | 22 | * @offset: offset for next match |
23 | * @cb: control buffer, for persistant variables of get_next_block() | 23 | * @cb: control buffer, for persistent variables of get_next_block() |
24 | */ | 24 | */ |
25 | struct ts_state | 25 | struct ts_state |
26 | { | 26 | { |
@@ -71,7 +71,7 @@ struct ts_config | |||
71 | * Called repeatedly until 0 is returned. Must assign the | 71 | * Called repeatedly until 0 is returned. Must assign the |
72 | * head of the next block of data to &*dst and return the length | 72 | * head of the next block of data to &*dst and return the length |
73 | * of the block or 0 if at the end. consumed == 0 indicates | 73 | * of the block or 0 if at the end. consumed == 0 indicates |
74 | * a new search. May store/read persistant values in state->cb. | 74 | * a new search. May store/read persistent values in state->cb. |
75 | */ | 75 | */ |
76 | unsigned int (*get_next_block)(unsigned int consumed, | 76 | unsigned int (*get_next_block)(unsigned int consumed, |
77 | const u8 **dst, | 77 | const u8 **dst, |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 44091c0db0b4..65321f911c1e 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -276,9 +276,8 @@ extern int tty_register_ldisc(int disc, struct tty_ldisc *new_ldisc); | |||
276 | extern int tty_unregister_ldisc(int disc); | 276 | extern int tty_unregister_ldisc(int disc); |
277 | extern int tty_register_driver(struct tty_driver *driver); | 277 | extern int tty_register_driver(struct tty_driver *driver); |
278 | extern int tty_unregister_driver(struct tty_driver *driver); | 278 | extern int tty_unregister_driver(struct tty_driver *driver); |
279 | extern struct class_device *tty_register_device(struct tty_driver *driver, | 279 | extern struct device *tty_register_device(struct tty_driver *driver, |
280 | unsigned index, | 280 | unsigned index, struct device *dev); |
281 | struct device *dev); | ||
282 | extern void tty_unregister_device(struct tty_driver *driver, unsigned index); | 281 | extern void tty_unregister_device(struct tty_driver *driver, unsigned index); |
283 | extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp, | 282 | extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp, |
284 | int buflen); | 283 | int buflen); |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 5482bfb3303d..0cd73edeef13 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -313,8 +313,13 @@ struct usb_bus { | |||
313 | /* This is arbitrary. | 313 | /* This is arbitrary. |
314 | * From USB 2.0 spec Table 11-13, offset 7, a hub can | 314 | * From USB 2.0 spec Table 11-13, offset 7, a hub can |
315 | * have up to 255 ports. The most yet reported is 10. | 315 | * have up to 255 ports. The most yet reported is 10. |
316 | * | ||
317 | * Current Wireless USB host hardware (Intel i1480 for example) allows | ||
318 | * up to 22 devices to connect. Upcoming hardware might raise that | ||
319 | * limit. Because the arrays need to add a bit for hub status data, we | ||
320 | * do 31, so plus one evens out to four bytes. | ||
316 | */ | 321 | */ |
317 | #define USB_MAXCHILDREN (16) | 322 | #define USB_MAXCHILDREN (31) |
318 | 323 | ||
319 | struct usb_tt; | 324 | struct usb_tt; |
320 | 325 | ||
@@ -357,7 +362,8 @@ struct usb_device { | |||
357 | u8 portnum; /* Parent port number (origin 1) */ | 362 | u8 portnum; /* Parent port number (origin 1) */ |
358 | u8 level; /* Number of USB hub ancestors */ | 363 | u8 level; /* Number of USB hub ancestors */ |
359 | 364 | ||
360 | int have_langid; /* whether string_langid is valid */ | 365 | unsigned discon_suspended:1; /* Disconnected while suspended */ |
366 | unsigned have_langid:1; /* whether string_langid is valid */ | ||
361 | int string_langid; /* language ID for strings */ | 367 | int string_langid; /* language ID for strings */ |
362 | 368 | ||
363 | /* static strings from the device */ | 369 | /* static strings from the device */ |
@@ -410,14 +416,37 @@ extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id); | |||
410 | 416 | ||
411 | /* USB autosuspend and autoresume */ | 417 | /* USB autosuspend and autoresume */ |
412 | #ifdef CONFIG_USB_SUSPEND | 418 | #ifdef CONFIG_USB_SUSPEND |
419 | extern int usb_autopm_set_interface(struct usb_interface *intf); | ||
413 | extern int usb_autopm_get_interface(struct usb_interface *intf); | 420 | extern int usb_autopm_get_interface(struct usb_interface *intf); |
414 | extern void usb_autopm_put_interface(struct usb_interface *intf); | 421 | extern void usb_autopm_put_interface(struct usb_interface *intf); |
415 | 422 | ||
423 | static inline void usb_autopm_enable(struct usb_interface *intf) | ||
424 | { | ||
425 | intf->pm_usage_cnt = 0; | ||
426 | usb_autopm_set_interface(intf); | ||
427 | } | ||
428 | |||
429 | static inline void usb_autopm_disable(struct usb_interface *intf) | ||
430 | { | ||
431 | intf->pm_usage_cnt = 1; | ||
432 | usb_autopm_set_interface(intf); | ||
433 | } | ||
434 | |||
416 | #else | 435 | #else |
417 | #define usb_autopm_get_interface(intf) 0 | ||
418 | #define usb_autopm_put_interface(intf) do {} while (0) | ||
419 | #endif | ||
420 | 436 | ||
437 | static inline int usb_autopm_set_interface(struct usb_interface *intf) | ||
438 | { return 0; } | ||
439 | |||
440 | static inline int usb_autopm_get_interface(struct usb_interface *intf) | ||
441 | { return 0; } | ||
442 | |||
443 | static inline void usb_autopm_put_interface(struct usb_interface *intf) | ||
444 | { } | ||
445 | static inline void usb_autopm_enable(struct usb_interface *intf) | ||
446 | { } | ||
447 | static inline void usb_autopm_disable(struct usb_interface *intf) | ||
448 | { } | ||
449 | #endif | ||
421 | 450 | ||
422 | /*-------------------------------------------------------------------------*/ | 451 | /*-------------------------------------------------------------------------*/ |
423 | 452 | ||
@@ -490,17 +519,137 @@ static inline int usb_make_path (struct usb_device *dev, char *buf, | |||
490 | 519 | ||
491 | /*-------------------------------------------------------------------------*/ | 520 | /*-------------------------------------------------------------------------*/ |
492 | 521 | ||
493 | extern int usb_endpoint_dir_in(const struct usb_endpoint_descriptor *epd); | 522 | /** |
494 | extern int usb_endpoint_dir_out(const struct usb_endpoint_descriptor *epd); | 523 | * usb_endpoint_dir_in - check if the endpoint has IN direction |
495 | extern int usb_endpoint_xfer_bulk(const struct usb_endpoint_descriptor *epd); | 524 | * @epd: endpoint to be checked |
496 | extern int usb_endpoint_xfer_int(const struct usb_endpoint_descriptor *epd); | 525 | * |
497 | extern int usb_endpoint_xfer_isoc(const struct usb_endpoint_descriptor *epd); | 526 | * Returns true if the endpoint is of type IN, otherwise it returns false. |
498 | extern int usb_endpoint_is_bulk_in(const struct usb_endpoint_descriptor *epd); | 527 | */ |
499 | extern int usb_endpoint_is_bulk_out(const struct usb_endpoint_descriptor *epd); | 528 | static inline int usb_endpoint_dir_in(const struct usb_endpoint_descriptor *epd) |
500 | extern int usb_endpoint_is_int_in(const struct usb_endpoint_descriptor *epd); | 529 | { |
501 | extern int usb_endpoint_is_int_out(const struct usb_endpoint_descriptor *epd); | 530 | return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN); |
502 | extern int usb_endpoint_is_isoc_in(const struct usb_endpoint_descriptor *epd); | 531 | } |
503 | extern int usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor *epd); | 532 | |
533 | /** | ||
534 | * usb_endpoint_dir_out - check if the endpoint has OUT direction | ||
535 | * @epd: endpoint to be checked | ||
536 | * | ||
537 | * Returns true if the endpoint is of type OUT, otherwise it returns false. | ||
538 | */ | ||
539 | static inline int usb_endpoint_dir_out(const struct usb_endpoint_descriptor *epd) | ||
540 | { | ||
541 | return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT); | ||
542 | } | ||
543 | |||
544 | /** | ||
545 | * usb_endpoint_xfer_bulk - check if the endpoint has bulk transfer type | ||
546 | * @epd: endpoint to be checked | ||
547 | * | ||
548 | * Returns true if the endpoint is of type bulk, otherwise it returns false. | ||
549 | */ | ||
550 | static inline int usb_endpoint_xfer_bulk(const struct usb_endpoint_descriptor *epd) | ||
551 | { | ||
552 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
553 | USB_ENDPOINT_XFER_BULK); | ||
554 | } | ||
555 | |||
556 | /** | ||
557 | * usb_endpoint_xfer_int - check if the endpoint has interrupt transfer type | ||
558 | * @epd: endpoint to be checked | ||
559 | * | ||
560 | * Returns true if the endpoint is of type interrupt, otherwise it returns | ||
561 | * false. | ||
562 | */ | ||
563 | static inline int usb_endpoint_xfer_int(const struct usb_endpoint_descriptor *epd) | ||
564 | { | ||
565 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
566 | USB_ENDPOINT_XFER_INT); | ||
567 | } | ||
568 | |||
569 | /** | ||
570 | * usb_endpoint_xfer_isoc - check if the endpoint has isochronous transfer type | ||
571 | * @epd: endpoint to be checked | ||
572 | * | ||
573 | * Returns true if the endpoint is of type isochronous, otherwise it returns | ||
574 | * false. | ||
575 | */ | ||
576 | static inline int usb_endpoint_xfer_isoc(const struct usb_endpoint_descriptor *epd) | ||
577 | { | ||
578 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
579 | USB_ENDPOINT_XFER_ISOC); | ||
580 | } | ||
581 | |||
582 | /** | ||
583 | * usb_endpoint_is_bulk_in - check if the endpoint is bulk IN | ||
584 | * @epd: endpoint to be checked | ||
585 | * | ||
586 | * Returns true if the endpoint has bulk transfer type and IN direction, | ||
587 | * otherwise it returns false. | ||
588 | */ | ||
589 | static inline int usb_endpoint_is_bulk_in(const struct usb_endpoint_descriptor *epd) | ||
590 | { | ||
591 | return (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_in(epd)); | ||
592 | } | ||
593 | |||
594 | /** | ||
595 | * usb_endpoint_is_bulk_out - check if the endpoint is bulk OUT | ||
596 | * @epd: endpoint to be checked | ||
597 | * | ||
598 | * Returns true if the endpoint has bulk transfer type and OUT direction, | ||
599 | * otherwise it returns false. | ||
600 | */ | ||
601 | static inline int usb_endpoint_is_bulk_out(const struct usb_endpoint_descriptor *epd) | ||
602 | { | ||
603 | return (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_out(epd)); | ||
604 | } | ||
605 | |||
606 | /** | ||
607 | * usb_endpoint_is_int_in - check if the endpoint is interrupt IN | ||
608 | * @epd: endpoint to be checked | ||
609 | * | ||
610 | * Returns true if the endpoint has interrupt transfer type and IN direction, | ||
611 | * otherwise it returns false. | ||
612 | */ | ||
613 | static inline int usb_endpoint_is_int_in(const struct usb_endpoint_descriptor *epd) | ||
614 | { | ||
615 | return (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_in(epd)); | ||
616 | } | ||
617 | |||
618 | /** | ||
619 | * usb_endpoint_is_int_out - check if the endpoint is interrupt OUT | ||
620 | * @epd: endpoint to be checked | ||
621 | * | ||
622 | * Returns true if the endpoint has interrupt transfer type and OUT direction, | ||
623 | * otherwise it returns false. | ||
624 | */ | ||
625 | static inline int usb_endpoint_is_int_out(const struct usb_endpoint_descriptor *epd) | ||
626 | { | ||
627 | return (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_out(epd)); | ||
628 | } | ||
629 | |||
630 | /** | ||
631 | * usb_endpoint_is_isoc_in - check if the endpoint is isochronous IN | ||
632 | * @epd: endpoint to be checked | ||
633 | * | ||
634 | * Returns true if the endpoint has isochronous transfer type and IN direction, | ||
635 | * otherwise it returns false. | ||
636 | */ | ||
637 | static inline int usb_endpoint_is_isoc_in(const struct usb_endpoint_descriptor *epd) | ||
638 | { | ||
639 | return (usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_in(epd)); | ||
640 | } | ||
641 | |||
642 | /** | ||
643 | * usb_endpoint_is_isoc_out - check if the endpoint is isochronous OUT | ||
644 | * @epd: endpoint to be checked | ||
645 | * | ||
646 | * Returns true if the endpoint has isochronous transfer type and OUT direction, | ||
647 | * otherwise it returns false. | ||
648 | */ | ||
649 | static inline int usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor *epd) | ||
650 | { | ||
651 | return (usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_out(epd)); | ||
652 | } | ||
504 | 653 | ||
505 | /*-------------------------------------------------------------------------*/ | 654 | /*-------------------------------------------------------------------------*/ |
506 | 655 | ||