]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/mips/kernel/kspd.c
[MIPS] RTLX: Harden against compiler reordering and optimization.
[linux-2.6-omap-h63xx.git] / arch / mips / kernel / kspd.c
index f06a144c788118b935434321c6972facdfb06d3b..241ee7a2906e413c6d367cf4e4d7356e68419106 100644 (file)
@@ -70,6 +70,7 @@ static int sp_stopping = 0;
 #define MTSP_SYSCALL_GETTIME   (MTSP_SYSCALL_BASE + 7)
 #define MTSP_SYSCALL_PIPEFREQ  (MTSP_SYSCALL_BASE + 8)
 #define MTSP_SYSCALL_GETTOD    (MTSP_SYSCALL_BASE + 9)
+#define MTSP_SYSCALL_IOCTL     (MTSP_SYSCALL_BASE + 10)
 
 #define MTSP_O_RDONLY          0x0000
 #define MTSP_O_WRONLY          0x0001
@@ -110,7 +111,8 @@ struct apsp_table syscall_command_table[] = {
        { MTSP_SYSCALL_CLOSE, __NR_close },
        { MTSP_SYSCALL_READ, __NR_read },
        { MTSP_SYSCALL_WRITE, __NR_write },
-       { MTSP_SYSCALL_LSEEK32, __NR_lseek }
+       { MTSP_SYSCALL_LSEEK32, __NR_lseek },
+       { MTSP_SYSCALL_IOCTL, __NR_ioctl }
 };
 
 static int sp_syscall(int num, int arg0, int arg1, int arg2, int arg3)
@@ -301,7 +303,7 @@ static void sp_cleanup(void)
        for (;;) {
                unsigned long set;
                i = j * __NFDBITS;
-               if (i >= fdt->max_fdset || i >= fdt->max_fds)
+               if (i >= fdt->max_fds)
                        break;
                set = fdt->open_fds->fds_bits[j++];
                while (set) {
@@ -319,7 +321,7 @@ static void sp_cleanup(void)
 static int channel_open = 0;
 
 /* the work handler */
-static void sp_work(void *data)
+static void sp_work(struct work_struct *unused)
 {
        if (!channel_open) {
                if( rtlx_open(RTLX_CHANNEL_SYSIO, 1) != 0) {
@@ -354,7 +356,7 @@ static void startwork(int vpe)
                        return;
                }
 
-               INIT_WORK(&work, sp_work, NULL);
+               INIT_WORK(&work, sp_work);
                queue_work(workqueue, &work);
        } else
                queue_work(workqueue, &work);