]> err.no Git - linux-2.6/blobdiff - arch/i386/kernel/apm.c
[PATCH] mark struct file_operations const 9
[linux-2.6] / arch / i386 / kernel / apm.c
index b75cff25de4b105b7c4c510d4de9752f053c2488..db99a8948dae1abad5b16357841b54efe969c9d7 100644 (file)
@@ -785,7 +785,11 @@ static int apm_do_idle(void)
        polling = !!(current_thread_info()->status & TS_POLLING);
        if (polling) {
                current_thread_info()->status &= ~TS_POLLING;
-               smp_mb__after_clear_bit();
+               /*
+                * TS_POLLING-cleared state must be visible before we
+                * test NEED_RESCHED:
+                */
+               smp_mb();
        }
        if (!need_resched()) {
                idled = 1;
@@ -1890,7 +1894,7 @@ static int __init apm_setup(char *str)
 __setup("apm=", apm_setup);
 #endif
 
-static struct file_operations apm_bios_fops = {
+static const struct file_operations apm_bios_fops = {
        .owner          = THIS_MODULE,
        .read           = do_read,
        .poll           = do_poll,