Cleanup some nonsense and codingstyle related stuff. Signed-off-by: Michael Buesch Index: hwrng.fixes/drivers/char/hw_random/core.c =================================================================== Signed-off-by: Andrew Morton --- drivers/char/hw_random/core.c | 20 ++++++-------------- 1 files changed, 6 insertions(+), 14 deletions(-) diff -puN drivers/char/hw_random/core.c~add-new-generic-hw-rng-core-cleanups drivers/char/hw_random/core.c --- devel/drivers/char/hw_random/core.c~add-new-generic-hw-rng-core-cleanups 2006-05-18 00:46:17.000000000 -0700 +++ devel-akpm/drivers/char/hw_random/core.c 2006-05-18 00:46:17.000000000 -0700 @@ -43,8 +43,8 @@ #define RNG_MODULE_NAME "hw_random" -#define PFX RNG_MODULE_NAME ": " -#define RNG_MISCDEV_MINOR 183 /* official */ +#define PFX RNG_MODULE_NAME ": " +#define RNG_MISCDEV_MINOR 183 /* official */ static struct hwrng *current_rng; @@ -52,31 +52,27 @@ static LIST_HEAD(rng_list); static DEFINE_MUTEX(rng_mutex); -static inline -int hwrng_init(struct hwrng *rng) +static inline int hwrng_init(struct hwrng *rng) { if (!rng->init) return 0; return rng->init(rng); } -static inline -void hwrng_cleanup(struct hwrng *rng) +static inline void hwrng_cleanup(struct hwrng *rng) { if (rng && rng->cleanup) rng->cleanup(rng); } -static inline -int hwrng_data_present(struct hwrng *rng) +static inline int hwrng_data_present(struct hwrng *rng) { if (!rng->data_present) return 1; return rng->data_present(rng); } -static inline -int hwrng_data_read(struct hwrng *rng, u32 *data) +static inline int hwrng_data_read(struct hwrng *rng, u32 *data) { return rng->data_read(rng, data); } @@ -174,9 +170,6 @@ static ssize_t hwrng_attr_current_store( int err; struct hwrng *rng; - if (!capable(CAP_SYS_ADMIN)) - return -EPERM; - err = mutex_lock_interruptible(&rng_mutex); if (err) return -ERESTARTSYS; @@ -359,6 +352,5 @@ void hwrng_unregister(struct hwrng *rng) EXPORT_SYMBOL_GPL(hwrng_unregister); -MODULE_AUTHOR("The Linux Kernel team"); MODULE_DESCRIPTION("H/W Random Number Generator (RNG) driver"); MODULE_LICENSE("GPL"); _