Merge branch 'topic/ice1724-pm' into for-linus
[pandora-kernel.git] / fs / ntfs / sysctl.c
index 1c23138..9ef85e6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * sysctl.c - Code for sysctl handling in NTFS Linux kernel driver. Part of
  *           the Linux-NTFS project. Adapted from the old NTFS driver,
- *           Copyright (C) 1997 Martin von Löwis, Régis Duchesne
+ *           Copyright (C) 1997 Martin von Löwis, Régis Duchesne
  *
  * Copyright (c) 2002-2005 Anton Altaparmakov
  *
 #include "sysctl.h"
 #include "debug.h"
 
-#define FS_NTFS        1
-
 /* Definition of the ntfs sysctl. */
 static ctl_table ntfs_sysctls[] = {
-       { FS_NTFS, "ntfs-debug",                /* Binary and text IDs. */
-         &debug_msgs,sizeof(debug_msgs),       /* Data pointer and size. */
-         0644, NULL, &proc_dointvec },         /* Mode, child, proc handler. */
-       { 0 }
+       {
+               .ctl_name       = CTL_UNNUMBERED,       /* Binary and text IDs. */
+               .procname       = "ntfs-debug",
+               .data           = &debug_msgs,          /* Data pointer and size. */
+               .maxlen         = sizeof(debug_msgs),
+               .mode           = 0644,                 /* Mode, proc handler. */
+               .proc_handler   = &proc_dointvec
+       },
+       {}
 };
 
 /* Define the parent directory /proc/sys/fs. */
 static ctl_table sysctls_root[] = {
-       { CTL_FS, "fs", NULL, 0, 0555, ntfs_sysctls },
-       { 0 }
+       {
+               .ctl_name       = CTL_FS,
+               .procname       = "fs",
+               .mode           = 0555,
+               .child          = ntfs_sysctls
+       },
+       {}
 };
 
 /* Storage for the sysctls header. */
@@ -62,17 +70,9 @@ int ntfs_sysctl(int add)
 {
        if (add) {
                BUG_ON(sysctls_root_table);
-               sysctls_root_table = register_sysctl_table(sysctls_root, 0);
+               sysctls_root_table = register_sysctl_table(sysctls_root);
                if (!sysctls_root_table)
                        return -ENOMEM;
-#ifdef CONFIG_PROC_FS
-               /*
-                * If the proc filesystem is in use and we are a module, need
-                * to set the owner of our proc entry to our module. In the
-                * non-modular case, THIS_MODULE is NULL, so this is ok.
-                */
-               ntfs_sysctls[0].de->owner = THIS_MODULE;
-#endif
        } else {
                BUG_ON(!sysctls_root_table);
                unregister_sysctl_table(sysctls_root_table);