diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-06 20:02:07 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-06 20:02:07 -0500 |
| commit | 40d7ee5d162203b40b5f4fbb312ab016edddb97f (patch) | |
| tree | 432db33df85f7f244676127a189a828dfbf2877b /include/linux | |
| parent | 5fec8bdbf9a1c4df4ad3f20e52aa2d8caed490c8 (diff) | |
| parent | b8ac9fc0e8cda9f9776019c5b0464b0c6d2d4c90 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (60 commits)
uio: make uio_info's name and version const
UIO: Documentation for UIO ioport info handling
UIO: Pass information about ioports to userspace (V2)
UIO: uio_pdrv_genirq: allow custom irq_flags
UIO: use pci_ioremap_bar() in drivers/uio
arm: struct device - replace bus_id with dev_name(), dev_set_name()
libata: struct device - replace bus_id with dev_name(), dev_set_name()
avr: struct device - replace bus_id with dev_name(), dev_set_name()
block: struct device - replace bus_id with dev_name(), dev_set_name()
chris: struct device - replace bus_id with dev_name(), dev_set_name()
dmi: struct device - replace bus_id with dev_name(), dev_set_name()
gadget: struct device - replace bus_id with dev_name(), dev_set_name()
gpio: struct device - replace bus_id with dev_name(), dev_set_name()
gpu: struct device - replace bus_id with dev_name(), dev_set_name()
hwmon: struct device - replace bus_id with dev_name(), dev_set_name()
i2o: struct device - replace bus_id with dev_name(), dev_set_name()
IA64: struct device - replace bus_id with dev_name(), dev_set_name()
i7300_idle: struct device - replace bus_id with dev_name(), dev_set_name()
infiniband: struct device - replace bus_id with dev_name(), dev_set_name()
ISDN: struct device - replace bus_id with dev_name(), dev_set_name()
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/device.h | 39 | ||||
| -rw-r--r-- | include/linux/kernel.h | 8 | ||||
| -rw-r--r-- | include/linux/klist.h | 2 | ||||
| -rw-r--r-- | include/linux/mtd/concat.h | 2 | ||||
| -rw-r--r-- | include/linux/pci.h | 1 | ||||
| -rw-r--r-- | include/linux/platform_device.h | 1 | ||||
| -rw-r--r-- | include/linux/pm.h | 88 | ||||
| -rw-r--r-- | include/linux/uio_driver.h | 30 |
8 files changed, 89 insertions, 82 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 1a3686d15f98..7d9da4b4993f 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #define BUS_ID_SIZE 20 | 28 | #define BUS_ID_SIZE 20 |
| 29 | 29 | ||
| 30 | struct device; | 30 | struct device; |
| 31 | struct device_private; | ||
| 31 | struct device_driver; | 32 | struct device_driver; |
| 32 | struct driver_private; | 33 | struct driver_private; |
| 33 | struct class; | 34 | struct class; |
| @@ -65,7 +66,7 @@ struct bus_type { | |||
| 65 | int (*resume_early)(struct device *dev); | 66 | int (*resume_early)(struct device *dev); |
| 66 | int (*resume)(struct device *dev); | 67 | int (*resume)(struct device *dev); |
| 67 | 68 | ||
| 68 | struct pm_ext_ops *pm; | 69 | struct dev_pm_ops *pm; |
| 69 | 70 | ||
| 70 | struct bus_type_private *p; | 71 | struct bus_type_private *p; |
| 71 | }; | 72 | }; |
| @@ -133,7 +134,7 @@ struct device_driver { | |||
| 133 | int (*resume) (struct device *dev); | 134 | int (*resume) (struct device *dev); |
| 134 | struct attribute_group **groups; | 135 | struct attribute_group **groups; |
| 135 | 136 | ||
| 136 | struct pm_ops *pm; | 137 | struct dev_pm_ops *pm; |
| 137 | 138 | ||
| 138 | struct driver_private *p; | 139 | struct driver_private *p; |
| 139 | }; | 140 | }; |
| @@ -198,7 +199,7 @@ struct class { | |||
| 198 | int (*suspend)(struct device *dev, pm_message_t state); | 199 | int (*suspend)(struct device *dev, pm_message_t state); |
| 199 | int (*resume)(struct device *dev); | 200 | int (*resume)(struct device *dev); |
| 200 | 201 | ||
| 201 | struct pm_ops *pm; | 202 | struct dev_pm_ops *pm; |
| 202 | struct class_private *p; | 203 | struct class_private *p; |
| 203 | }; | 204 | }; |
| 204 | 205 | ||
| @@ -291,7 +292,7 @@ struct device_type { | |||
| 291 | int (*suspend)(struct device *dev, pm_message_t state); | 292 | int (*suspend)(struct device *dev, pm_message_t state); |
| 292 | int (*resume)(struct device *dev); | 293 | int (*resume)(struct device *dev); |
| 293 | 294 | ||
| 294 | struct pm_ops *pm; | 295 | struct dev_pm_ops *pm; |
| 295 | }; | 296 | }; |
| 296 | 297 | ||
| 297 | /* interface for exporting device attributes */ | 298 | /* interface for exporting device attributes */ |
| @@ -365,17 +366,15 @@ struct device_dma_parameters { | |||
| 365 | }; | 366 | }; |
| 366 | 367 | ||
| 367 | struct device { | 368 | struct device { |
| 368 | struct klist klist_children; | ||
| 369 | struct klist_node knode_parent; /* node in sibling list */ | ||
| 370 | struct klist_node knode_driver; | ||
| 371 | struct klist_node knode_bus; | ||
| 372 | struct device *parent; | 369 | struct device *parent; |
| 373 | 370 | ||
| 371 | struct device_private *p; | ||
| 372 | |||
| 374 | struct kobject kobj; | 373 | struct kobject kobj; |
| 375 | char bus_id[BUS_ID_SIZE]; /* position on parent bus */ | 374 | char bus_id[BUS_ID_SIZE]; /* position on parent bus */ |
| 375 | unsigned uevent_suppress:1; | ||
| 376 | const char *init_name; /* initial name of the device */ | 376 | const char *init_name; /* initial name of the device */ |
| 377 | struct device_type *type; | 377 | struct device_type *type; |
| 378 | unsigned uevent_suppress:1; | ||
| 379 | 378 | ||
| 380 | struct semaphore sem; /* semaphore to synchronize calls to | 379 | struct semaphore sem; /* semaphore to synchronize calls to |
| 381 | * its driver. | 380 | * its driver. |
| @@ -408,12 +407,13 @@ struct device { | |||
| 408 | /* arch specific additions */ | 407 | /* arch specific additions */ |
| 409 | struct dev_archdata archdata; | 408 | struct dev_archdata archdata; |
| 410 | 409 | ||
| 410 | dev_t devt; /* dev_t, creates the sysfs "dev" */ | ||
| 411 | |||
| 411 | spinlock_t devres_lock; | 412 | spinlock_t devres_lock; |
| 412 | struct list_head devres_head; | 413 | struct list_head devres_head; |
| 413 | 414 | ||
| 414 | struct klist_node knode_class; | 415 | struct klist_node knode_class; |
| 415 | struct class *class; | 416 | struct class *class; |
| 416 | dev_t devt; /* dev_t, creates the sysfs "dev" */ | ||
| 417 | struct attribute_group **groups; /* optional groups */ | 417 | struct attribute_group **groups; /* optional groups */ |
| 418 | 418 | ||
| 419 | void (*release)(struct device *dev); | 419 | void (*release)(struct device *dev); |
| @@ -483,6 +483,17 @@ extern int device_rename(struct device *dev, char *new_name); | |||
| 483 | extern int device_move(struct device *dev, struct device *new_parent); | 483 | extern int device_move(struct device *dev, struct device *new_parent); |
| 484 | 484 | ||
| 485 | /* | 485 | /* |
| 486 | * Root device objects for grouping under /sys/devices | ||
| 487 | */ | ||
| 488 | extern struct device *__root_device_register(const char *name, | ||
| 489 | struct module *owner); | ||
| 490 | static inline struct device *root_device_register(const char *name) | ||
| 491 | { | ||
| 492 | return __root_device_register(name, THIS_MODULE); | ||
| 493 | } | ||
| 494 | extern void root_device_unregister(struct device *root); | ||
| 495 | |||
| 496 | /* | ||
| 486 | * Manual binding of a device to driver. See drivers/base/bus.c | 497 | * Manual binding of a device to driver. See drivers/base/bus.c |
| 487 | * for information on use. | 498 | * for information on use. |
| 488 | */ | 499 | */ |
| @@ -553,13 +564,13 @@ extern const char *dev_driver_string(const struct device *dev); | |||
| 553 | #define dev_info(dev, format, arg...) \ | 564 | #define dev_info(dev, format, arg...) \ |
| 554 | dev_printk(KERN_INFO , dev , format , ## arg) | 565 | dev_printk(KERN_INFO , dev , format , ## arg) |
| 555 | 566 | ||
| 556 | #if defined(CONFIG_DYNAMIC_PRINTK_DEBUG) | 567 | #if defined(DEBUG) |
| 568 | #define dev_dbg(dev, format, arg...) \ | ||
| 569 | dev_printk(KERN_DEBUG , dev , format , ## arg) | ||
| 570 | #elif defined(CONFIG_DYNAMIC_PRINTK_DEBUG) | ||
| 557 | #define dev_dbg(dev, format, ...) do { \ | 571 | #define dev_dbg(dev, format, ...) do { \ |
| 558 | dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \ | 572 | dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \ |
| 559 | } while (0) | 573 | } while (0) |
| 560 | #elif defined(DEBUG) | ||
| 561 | #define dev_dbg(dev, format, arg...) \ | ||
| 562 | dev_printk(KERN_DEBUG , dev , format , ## arg) | ||
| 563 | #else | 574 | #else |
| 564 | #define dev_dbg(dev, format, arg...) \ | 575 | #define dev_dbg(dev, format, arg...) \ |
| 565 | ({ if (0) dev_printk(KERN_DEBUG, dev, format, ##arg); 0; }) | 576 | ({ if (0) dev_printk(KERN_DEBUG, dev, format, ##arg); 0; }) |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 721984844c94..6b8e2027165e 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -355,13 +355,13 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
| 355 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | 355 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) |
| 356 | 356 | ||
| 357 | /* If you are writing a driver, please use dev_dbg instead */ | 357 | /* If you are writing a driver, please use dev_dbg instead */ |
| 358 | #if defined(CONFIG_DYNAMIC_PRINTK_DEBUG) | 358 | #if defined(DEBUG) |
| 359 | #define pr_debug(fmt, ...) \ | ||
| 360 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
| 361 | #elif defined(CONFIG_DYNAMIC_PRINTK_DEBUG) | ||
| 359 | #define pr_debug(fmt, ...) do { \ | 362 | #define pr_debug(fmt, ...) do { \ |
| 360 | dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \ | 363 | dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \ |
| 361 | } while (0) | 364 | } while (0) |
| 362 | #elif defined(DEBUG) | ||
| 363 | #define pr_debug(fmt, ...) \ | ||
| 364 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
| 365 | #else | 365 | #else |
| 366 | #define pr_debug(fmt, ...) \ | 366 | #define pr_debug(fmt, ...) \ |
| 367 | ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) | 367 | ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) |
diff --git a/include/linux/klist.h b/include/linux/klist.h index 8ea98db223e5..d5a27af9dba5 100644 --- a/include/linux/klist.h +++ b/include/linux/klist.h | |||
| @@ -13,7 +13,6 @@ | |||
| 13 | #define _LINUX_KLIST_H | 13 | #define _LINUX_KLIST_H |
| 14 | 14 | ||
| 15 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
| 16 | #include <linux/completion.h> | ||
| 17 | #include <linux/kref.h> | 16 | #include <linux/kref.h> |
| 18 | #include <linux/list.h> | ||
