diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2008-02-05 06:30:13 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 17:44:23 (GMT) |
commit | a41e3dc4060cca2599afa14fbd4c745763746ba8 (patch) | |
tree | c97d189602b6564054f348dbfc2c865baafecd96 /include/linux | |
parent | 533354d4ac48b7df99f18f952e5d51c3f59ba56c (diff) | |
download | linux-fsl-qoriq-a41e3dc4060cca2599afa14fbd4c745763746ba8.tar.xz |
HWRNG: add possibility to remove hwrng devices during suspend/resume
Make it possible to unregister a Hardware Random Number Generator
device object in a safe way during a suspend/resume cycle.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Michael Buesch <mb@bu3sch.de>
Cc: Michael Buesch <mb@bu3sch.de>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Len Brown <lenb@kernel.org>
Cc: Greg KH <greg@kroah.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/hw_random.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/hw_random.h b/include/linux/hw_random.h index 85d1191..4213182 100644 --- a/include/linux/hw_random.h +++ b/include/linux/hw_random.h @@ -44,7 +44,15 @@ struct hwrng { /** Register a new Hardware Random Number Generator driver. */ extern int hwrng_register(struct hwrng *rng); /** Unregister a Hardware Random Number Generator driver. */ -extern void hwrng_unregister(struct hwrng *rng); +extern void __hwrng_unregister(struct hwrng *rng, bool suspended); +static inline void hwrng_unregister(struct hwrng *rng) +{ + __hwrng_unregister(rng, false); +} +static inline void hwrng_unregister_suspended(struct hwrng *rng) +{ + __hwrng_unregister(rng, true); +} #endif /* __KERNEL__ */ #endif /* LINUX_HWRANDOM_H_ */ |