aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/hw_random
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2008-03-23 15:28:24 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-19 22:10:28 -0400
commitb844eba292b477cda14582bfc6f535deed57a82d (patch)
treeb2418a9a4fc672654f4592ae0a3e2853d82271c3 /drivers/char/hw_random
parent138fe4e069798d9aa948a5402ff15e58f483ee4e (diff)
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>
Diffstat (limited to 'drivers/char/hw_random')
-rw-r--r--drivers/char/hw_random/core.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index 349b6edc5794..662d60e44e9a 100644
--- a/drivers/char/hw_random/core.c
+++ b/drivers/char/hw_random/core.c
@@ -238,11 +238,11 @@ static DEVICE_ATTR(rng_available, S_IRUGO,
238 NULL); 238 NULL);
239 239
240 240
241static void unregister_miscdev(bool suspended) 241static void unregister_miscdev(void)
242{ 242{
243 device_remove_file(rng_miscdev.this_device, &dev_attr_rng_available); 243 device_remove_file(rng_miscdev.this_device, &dev_attr_rng_available);
244 device_remove_file(rng_miscdev.this_device, &dev_attr_rng_current); 244 device_remove_file(rng_miscdev.this_device, &dev_attr_rng_current);
245 __misc_deregister(&rng_miscdev, suspended); 245 misc_deregister(&rng_miscdev);
246} 246}
247 247
248static int register_miscdev(void) 248static int register_miscdev(void)
@@ -317,7 +317,7 @@ out:
317} 317}
318EXPORT_SYMBOL_GPL(hwrng_register); 318EXPORT_SYMBOL_GPL(hwrng_register);
319 319
320void __hwrng_unregister(struct hwrng *rng, bool suspended) 320void hwrng_unregister(struct hwrng *rng)
321{ 321{
322 int err; 322 int err;
323 323
@@ -336,11 +336,11 @@ void __hwrng_unregister(struct hwrng *rng, bool suspended)
336 } 336 }
337 } 337 }
338 if (list_empty(&rng_list)) 338 if (list_empty(&rng_list))
339 unregister_miscdev(suspended); 339 unregister_miscdev();
340 340
341 mutex_unlock(&rng_mutex); 341 mutex_unlock(&rng_mutex);
342} 342}
343EXPORT_SYMBOL_GPL(__hwrng_unregister); 343EXPORT_SYMBOL_GPL(hwrng_unregister);
344 344
345 345
346MODULE_DESCRIPTION("H/W Random Number Generator (RNG) driver"); 346MODULE_DESCRIPTION("H/W Random Number Generator (RNG) driver");