]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/socket.c
h63xx: tsc2101 alsa sound support
[linux-2.6-omap-h63xx.git] / net / socket.c
index 0dde6dade2b17b60afac9ffc937f724f3ba9f6b3..a00851f981dbfcb17b26f64d7bfc2a5e64e31a5d 100644 (file)
@@ -900,6 +900,13 @@ static long sock_ioctl(struct file *file, unsigned cmd, unsigned long arg)
                        break;
                default:
                        err = sock->ops->ioctl(sock, cmd, arg);
+
+                       /*
+                        * If this ioctl is unknown try to hand it down
+                        * to the NIC driver.
+                        */
+                       if (err == -ENOIOCTLCMD)
+                               err = dev_ioctl(cmd, argp);
                        break;
        }
        return err;
@@ -986,7 +993,7 @@ static int sock_fasync(int fd, struct file *filp, int on)
 
        if (on)
        {
-               fna=(struct fasync_struct *)kmalloc(sizeof(struct fasync_struct), GFP_KERNEL);
+               fna = kmalloc(sizeof(struct fasync_struct), GFP_KERNEL);
                if(fna==NULL)
                        return -ENOMEM;
        }
@@ -2071,7 +2078,7 @@ void socket_seq_show(struct seq_file *seq)
        int cpu;
        int counter = 0;
 
-       for (cpu = 0; cpu < NR_CPUS; cpu++)
+       for_each_cpu(cpu)
                counter += per_cpu(sockets_in_use, cpu);
 
        /* It can be negative, by the way. 8) */