Merge branch 'bkl-drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / drivers / char / hw_random / core.c
index 82367262f3a8b604d8d9b11a3b37f3bf18f4fdb9..e989f67bb61f14b84fd66f90f1a87008ff9117dc 100644 (file)
@@ -53,7 +53,8 @@ static struct hwrng *current_rng;
 static LIST_HEAD(rng_list);
 static DEFINE_MUTEX(rng_mutex);
 static int data_avail;
-static u8 rng_buffer[SMP_CACHE_BYTES] __cacheline_aligned;
+static u8 rng_buffer[SMP_CACHE_BYTES < 32 ? 32 : SMP_CACHE_BYTES]
+       __cacheline_aligned;
 
 static inline int hwrng_init(struct hwrng *rng)
 {
@@ -75,7 +76,6 @@ static int rng_dev_open(struct inode *inode, struct file *filp)
                return -EINVAL;
        if (filp->f_mode & FMODE_WRITE)
                return -EINVAL;
-       cycle_kernel_lock();
        return 0;
 }
 
@@ -174,7 +174,7 @@ static const struct file_operations rng_chrdev_ops = {
 static struct miscdevice rng_miscdev = {
        .minor          = RNG_MISCDEV_MINOR,
        .name           = RNG_MODULE_NAME,
-       .devnode        = "hwrng",
+       .nodename       = "hwrng",
        .fops           = &rng_chrdev_ops,
 };