PM: Remove destroy_suspended_device()

After 2.6.24 there was a plan to make the PM core acquire all device
semaphores during a suspend/hibernation to protect itself from
concurrent operations involving device objects.  That proved to be
too heavy-handed and we found a better way to achieve the goal, but
before it happened, we had introduced the functions
device_pm_schedule_removal() and destroy_suspended_device() to allow
drivers to "safely" destroy a suspended device and we had adapted some
drivers to use them.  Now that these functions are no longer necessary,
it seems reasonable to remove them and modify their users to use the
normal device unregistration instead.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Этот коммит содержится в:
Rafael J. Wysocki
2008-03-23 20:28:24 +01:00
коммит произвёл Greg Kroah-Hartman
родитель 138fe4e069
Коммит b844eba292
13 изменённых файлов: 22 добавлений и 146 удалений

Просмотреть файл

@@ -238,11 +238,11 @@ static DEVICE_ATTR(rng_available, S_IRUGO,
NULL);
static void unregister_miscdev(bool suspended)
static void unregister_miscdev(void)
{
device_remove_file(rng_miscdev.this_device, &dev_attr_rng_available);
device_remove_file(rng_miscdev.this_device, &dev_attr_rng_current);
__misc_deregister(&rng_miscdev, suspended);
misc_deregister(&rng_miscdev);
}
static int register_miscdev(void)
@@ -317,7 +317,7 @@ out:
}
EXPORT_SYMBOL_GPL(hwrng_register);
void __hwrng_unregister(struct hwrng *rng, bool suspended)
void hwrng_unregister(struct hwrng *rng)
{
int err;
@@ -336,11 +336,11 @@ void __hwrng_unregister(struct hwrng *rng, bool suspended)
}
}
if (list_empty(&rng_list))
unregister_miscdev(suspended);
unregister_miscdev();
mutex_unlock(&rng_mutex);
}
EXPORT_SYMBOL_GPL(__hwrng_unregister);
EXPORT_SYMBOL_GPL(hwrng_unregister);
MODULE_DESCRIPTION("H/W Random Number Generator (RNG) driver");