Whamcloud - gitweb
LU-3319 procfs: provide framework for seq_file handling
[fs/lustre-release.git] / lustre / obdecho / echo_client.c
index 5eb750a..f84a516 100644 (file)
@@ -3229,16 +3229,18 @@ int echo_client_init(void)
 
         lprocfs_echo_init_vars(&lvars);
 
-        rc = lu_kmem_init(echo_caches);
-        if (rc == 0) {
-                rc = class_register_type(&echo_client_obd_ops, NULL,
-                                         lvars.module_vars,
-                                         LUSTRE_ECHO_CLIENT_NAME,
-                                         &echo_device_type);
-                if (rc)
-                        lu_kmem_fini(echo_caches);
-        }
-        return rc;
+       rc = lu_kmem_init(echo_caches);
+       if (rc == 0) {
+               rc = class_register_type(&echo_client_obd_ops, NULL, NULL,
+#ifndef HAVE_ONLY_PROCFS_SEQ
+                                       lvars.module_vars,
+#endif
+                                       LUSTRE_ECHO_CLIENT_NAME,
+                                       &echo_device_type);
+               if (rc)
+                       lu_kmem_fini(echo_caches);
+       }
+       return rc;
 }
 
 void echo_client_exit(void)
@@ -3265,10 +3267,13 @@ static int __init obdecho_init(void)
         if (rc != 0)
                 goto failed_0;
 
-        rc = class_register_type(&echo_obd_ops, NULL, lvars.module_vars,
-                                 LUSTRE_ECHO_NAME, NULL);
-        if (rc != 0)
-                goto failed_1;
+       rc = class_register_type(&echo_obd_ops, NULL, NULL,
+#ifndef HAVE_ONLY_PROCFS_SEQ
+                               lvars.module_vars,
+#endif
+                               LUSTRE_ECHO_NAME, NULL);
+       if (rc != 0)
+               goto failed_1;
 # endif
 
         rc = echo_client_init();