diff options
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r-- | drivers/base/core.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index adbc01788447..0262fc7c45fc 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
@@ -1163,35 +1163,6 @@ void device_destroy(struct class *class, dev_t devt) | |||
1163 | } | 1163 | } |
1164 | EXPORT_SYMBOL_GPL(device_destroy); | 1164 | EXPORT_SYMBOL_GPL(device_destroy); |
1165 | 1165 | ||
1166 | #ifdef CONFIG_PM_SLEEP | ||
1167 | /** | ||
1168 | * destroy_suspended_device - asks the PM core to remove a suspended device | ||
1169 | * @class: pointer to the struct class that this device was registered with | ||
1170 | * @devt: the dev_t of the device that was previously registered | ||
1171 | * | ||
1172 | * This call notifies the PM core of the necessity to unregister a suspended | ||
1173 | * device created with a call to device_create() (devices cannot be | ||
1174 | * unregistered directly while suspended, since the PM core holds their | ||
1175 | * semaphores at that time). | ||
1176 | * | ||
1177 | * It can only be called within the scope of a system sleep transition. In | ||
1178 | * practice this means it has to be directly or indirectly invoked either by | ||
1179 | * a suspend or resume method, or by the PM core (e.g. via | ||
1180 | * disable_nonboot_cpus() or enable_nonboot_cpus()). | ||
1181 | */ | ||
1182 | void destroy_suspended_device(struct class *class, dev_t devt) | ||
1183 | { | ||
1184 | struct device *dev; | ||
1185 | |||
1186 | dev = class_find_device(class, &devt, __match_devt); | ||
1187 | if (dev) { | ||
1188 | device_pm_schedule_removal(dev); | ||
1189 | put_device(dev); | ||
1190 | } | ||
1191 | } | ||
1192 | EXPORT_SYMBOL_GPL(destroy_suspended_device); | ||
1193 | #endif /* CONFIG_PM_SLEEP */ | ||
1194 | |||
1195 | /** | 1166 | /** |
1196 | * device_rename - renames a device | 1167 | * device_rename - renames a device |
1197 | * @dev: the pointer to the struct device to be renamed | 1168 | * @dev: the pointer to the struct device to be renamed |