]> err.no Git - linux-2.6/blobdiff - arch/mips/kernel/kspd.c
Merge branch 'for-2.6.26' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer...
[linux-2.6] / arch / mips / kernel / kspd.c
index d2c2e00e5864ff67802e811acc74fd74a889da08..ceb62dce1c9c6872966d05e33dacdc96acd5218f 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/sched.h>
 #include <linux/unistd.h>
 #include <linux/file.h>
+#include <linux/fdtable.h>
 #include <linux/fs.h>
 #include <linux/syscalls.h>
 #include <linux/workqueue.h>
@@ -161,8 +162,7 @@ static unsigned int translate_open_flags(int flags)
        int i;
        unsigned int ret = 0;
 
-       for (i = 0; i < (sizeof(open_flags_table) / sizeof(struct apsp_table));
-            i++) {
+       for (i = 0; i < ARRAY_SIZE(open_flags_table); i++) {
                if( (flags & open_flags_table[i].sp) ) {
                        ret |= open_flags_table[i].ap;
                }
@@ -222,7 +222,7 @@ void sp_work_handle_request(void)
                }
        }
 
-       /* Run the syscall at the priviledge of the user who loaded the
+       /* Run the syscall at the privilege of the user who loaded the
           SP program */
 
        if (vpe_getuid(tclimit))