]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/random.c
saner FASYNC handling on file close
[linux-2.6-omap-h63xx.git] / drivers / char / random.c
index 9ce80213007ba4e9437ebf2aae4a4efad3c452b1..675076f5fca881d0ab3752b44c8356766dac1c3a 100644 (file)
@@ -558,12 +558,7 @@ struct timer_rand_state {
        unsigned dont_count_entropy:1;
 };
 
-#ifdef CONFIG_HAVE_DYN_ARRAY
-static struct timer_rand_state **irq_timer_state;
-DEFINE_DYN_ARRAY(irq_timer_state, sizeof(struct timer_rand_state *), nr_irqs, PAGE_SIZE, NULL);
-#else
 static struct timer_rand_state *irq_timer_state[NR_IRQS];
-#endif
 
 static struct timer_rand_state *get_timer_rand_state(unsigned int irq)
 {
@@ -1144,18 +1139,12 @@ static int random_fasync(int fd, struct file *filp, int on)
        return fasync_helper(fd, filp, on, &fasync);
 }
 
-static int random_release(struct inode *inode, struct file *filp)
-{
-       return fasync_helper(-1, filp, 0, &fasync);
-}
-
 const struct file_operations random_fops = {
        .read  = random_read,
        .write = random_write,
        .poll  = random_poll,
        .unlocked_ioctl = random_ioctl,
        .fasync = random_fasync,
-       .release = random_release,
 };
 
 const struct file_operations urandom_fops = {
@@ -1163,7 +1152,6 @@ const struct file_operations urandom_fops = {
        .write = random_write,
        .unlocked_ioctl = random_ioctl,
        .fasync = random_fasync,
-       .release = random_release,
 };
 
 /***************************************************************
@@ -1236,7 +1224,7 @@ static int proc_do_uuid(ctl_table *table, int write, struct file *filp,
        return proc_dostring(&fake_table, write, filp, buffer, lenp, ppos);
 }
 
-static int uuid_strategy(ctl_table *table, int __user *name, int nlen,
+static int uuid_strategy(ctl_table *table,
                         void __user *oldval, size_t __user *oldlenp,
                         void __user *newval, size_t newlen)
 {