diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-26 14:17:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-26 14:17:04 -0400 |
commit | 0c93ea4064a209cdc36de8a9a3003d43d08f46f7 (patch) | |
tree | ff19952407c523a1349ef56c05993416dd28437e /drivers/base/power/main.c | |
parent | bc2fd381d8f9dbeb181f82286cdca1567e3d0def (diff) | |
parent | e6e66b02e11563abdb7f69dcb7a2efbd8d577e77 (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: (61 commits)
Dynamic debug: fix pr_fmt() build error
Dynamic debug: allow simple quoting of words
dynamic debug: update docs
dynamic debug: combine dprintk and dynamic printk
sysfs: fix some bin_vm_ops errors
kobject: don't block for each kobject_uevent
sysfs: only allow one scheduled removal callback per kobj
Driver core: Fix device_move() vs. dpm list ordering, v2
Driver core: some cleanup on drivers/base/sys.c
Driver core: implement uevent suppress in kobject
vcs: hook sysfs devices into object lifetime instead of "binding"
driver core: fix passing platform_data
driver core: move platform_data into platform_device
sysfs: don't block indefinitely for unmapped files.
driver core: move knode_bus into private structure
driver core: move knode_driver into private structure
driver core: move klist_children into private structure
driver core: create a private portion of struct device
driver core: remove polling for driver_probe_done(v5)
sysfs: reference sysfs_dirent from sysfs inodes
...
Fixed conflicts in drivers/sh/maple/maple.c manually
Diffstat (limited to 'drivers/base/power/main.c')
-rw-r--r-- | drivers/base/power/main.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 2d14f4ae6c01..e255341682c8 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c | |||
@@ -107,6 +107,50 @@ void device_pm_remove(struct device *dev) | |||
107 | } | 107 | } |
108 | 108 | ||
109 | /** | 109 | /** |
110 | * device_pm_move_before - move device in dpm_list | ||
111 | * @deva: Device to move in dpm_list | ||
112 | * @devb: Device @deva should come before | ||
113 | */ | ||
114 | void device_pm_move_before(struct device *deva, struct device *devb) | ||
115 | { | ||
116 | pr_debug("PM: Moving %s:%s before %s:%s\n", | ||
117 | deva->bus ? deva->bus->name : "No Bus", | ||
118 | kobject_name(&deva->kobj), | ||
119 | devb->bus ? devb->bus->name : "No Bus", | ||
120 | kobject_name(&devb->kobj)); | ||
121 | /* Delete deva from dpm_list and reinsert before devb. */ | ||
122 | list_move_tail(&deva->power.entry, &devb->power.entry); | ||
123 | } | ||
124 | |||
125 | /** | ||
126 | * device_pm_move_after - move device in dpm_list | ||
127 | * @deva: Device to move in dpm_list | ||
128 | * @devb: Device @deva should come after | ||
129 | */ | ||
130 | void device_pm_move_after(struct device *deva, struct device *devb) | ||
131 | { | ||
132 | pr_debug("PM: Moving %s:%s after %s:%s\n", | ||
133 | deva->bus ? deva->bus->name : "No Bus", | ||
134 | kobject_name(&deva->kobj), | ||
135 | devb->bus ? devb->bus->name : "No Bus", | ||
136 | kobject_name(&devb->kobj)); | ||
137 | /* Delete deva from dpm_list and reinsert after devb. */ | ||
138 | list_move(&deva->power.entry, &devb->power.entry); | ||
139 | } | ||
140 | |||
141 | /** | ||
142 | * device_pm_move_last - move device to end of dpm_list | ||
143 | * @dev: Device to move in dpm_list | ||
144 | */ | ||
145 | void device_pm_move_last(struct device *dev) | ||
146 | { | ||
147 | pr_debug("PM: Moving %s:%s to end of list\n", | ||
148 | dev->bus ? dev->bus->name : "No Bus", | ||
149 | kobject_name(&dev->kobj)); | ||
150 | list_move_tail(&dev->power.entry, &dpm_list); | ||
151 | } | ||
152 | |||
153 | /** | ||
110 | * pm_op - execute the PM operation appropiate for given PM event | 154 | * pm_op - execute the PM operation appropiate for given PM event |
111 | * @dev: Device. | 155 | * @dev: Device. |
112 | * @ops: PM operations to choose from. | 156 | * @ops: PM operations to choose from. |