diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2011-04-26 04:22:15 -0400 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2011-04-26 04:22:59 -0400 |
| commit | 07f9479a40cc778bc1462ada11f95b01360ae4ff (patch) | |
| tree | 0676cf38df3844004bb3ebfd99dfa67a4a8998f5 /include/linux/sysdev.h | |
| parent | 9d5e6bdb3013acfb311ab407eeca0b6a6a3dedbf (diff) | |
| parent | cd2e49e90f1cae7726c9a2c54488d881d7f1cd1c (diff) | |
Merge branch 'master' into for-next
Fast-forwarded to current state of Linus' tree as there are patches to be
applied for files that didn't exist on the old branch.
Diffstat (limited to 'include/linux/sysdev.h')
| -rw-r--r-- | include/linux/sysdev.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index 1154c29f4101..dfb078db8ebb 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h | |||
| @@ -7,13 +7,13 @@ | |||
| 7 | * We still have a notion of a driver for a system device, because we still | 7 | * We still have a notion of a driver for a system device, because we still |
| 8 | * want to perform basic operations on these devices. | 8 | * want to perform basic operations on these devices. |
| 9 | * | 9 | * |
| 10 | * We also support auxillary drivers binding to devices of a certain class. | 10 | * We also support auxiliary drivers binding to devices of a certain class. |
| 11 | * | 11 | * |
| 12 | * This allows configurable drivers to register themselves for devices of | 12 | * This allows configurable drivers to register themselves for devices of |
| 13 | * a certain type. And, it allows class definitions to reside in generic | 13 | * a certain type. And, it allows class definitions to reside in generic |
| 14 | * code while arch-specific code can register specific drivers. | 14 | * code while arch-specific code can register specific drivers. |
| 15 | * | 15 | * |
| 16 | * Auxillary drivers registered with a NULL cls are registered as drivers | 16 | * Auxiliary drivers registered with a NULL cls are registered as drivers |
| 17 | * for all system devices, and get notification calls for each device. | 17 | * for all system devices, and get notification calls for each device. |
| 18 | */ | 18 | */ |
| 19 | 19 | ||
| @@ -33,12 +33,13 @@ struct sysdev_class { | |||
| 33 | const char *name; | 33 | const char *name; |
| 34 | struct list_head drivers; | 34 | struct list_head drivers; |
| 35 | struct sysdev_class_attribute **attrs; | 35 | struct sysdev_class_attribute **attrs; |
| 36 | 36 | struct kset kset; | |
| 37 | #ifndef CONFIG_ARCH_NO_SYSDEV_OPS | ||
| 37 | /* Default operations for these types of devices */ | 38 | /* Default operations for these types of devices */ |
| 38 | int (*shutdown)(struct sys_device *); | 39 | int (*shutdown)(struct sys_device *); |
| 39 | int (*suspend)(struct sys_device *, pm_message_t state); | 40 | int (*suspend)(struct sys_device *, pm_message_t state); |
| 40 | int (*resume)(struct sys_device *); | 41 | int (*resume)(struct sys_device *); |
| 41 | struct kset kset; | 42 | #endif |
| 42 | }; | 43 | }; |
| 43 | 44 | ||
| 44 | struct sysdev_class_attribute { | 45 | struct sysdev_class_attribute { |
| @@ -69,16 +70,18 @@ extern int sysdev_class_create_file(struct sysdev_class *, | |||
| 69 | extern void sysdev_class_remove_file(struct sysdev_class *, | 70 | extern void sysdev_class_remove_file(struct sysdev_class *, |
| 70 | struct sysdev_class_attribute *); | 71 | struct sysdev_class_attribute *); |
| 71 | /** | 72 | /** |
| 72 | * Auxillary system device drivers. | 73 | * Auxiliary system device drivers. |
| 73 | */ | 74 | */ |
| 74 | 75 | ||
| 75 | struct sysdev_driver { | 76 | struct sysdev_driver { |
| 76 | struct list_head entry; | 77 | struct list_head entry; |
| 77 | int (*add)(struct sys_device *); | 78 | int (*add)(struct sys_device *); |
| 78 | int (*remove)(struct sys_device *); | 79 | int (*remove)(struct sys_device *); |
| 80 | #ifndef CONFIG_ARCH_NO_SYSDEV_OPS | ||
| 79 | int (*shutdown)(struct sys_device *); | 81 | int (*shutdown)(struct sys_device *); |
| 80 | int (*suspend)(struct sys_device *, pm_message_t state); | 82 | int (*suspend)(struct sys_device *, pm_message_t state); |
| 81 | int (*resume)(struct sys_device *); | 83 | int (*resume)(struct sys_device *); |
| 84 | #endif | ||
| 82 | }; | 85 | }; |
| 83 | 86 | ||
| 84 | 87 | ||
