Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[linux-2.6-microblaze.git] / drivers / crypto / nx / nx_debugfs.c
index 03e4f03..e0d44a5 100644 (file)
  * Documentation/ABI/testing/debugfs-pfo-nx-crypto
  */
 
-int nx_debugfs_init(struct nx_crypto_driver *drv)
+void nx_debugfs_init(struct nx_crypto_driver *drv)
 {
-       struct nx_debugfs *dfs = &drv->dfs;
+       struct dentry *root;
 
-       dfs->dfs_root = debugfs_create_dir(NX_NAME, NULL);
+       root = debugfs_create_dir(NX_NAME, NULL);
+       drv->dfs_root = root;
 
-       dfs->dfs_aes_ops =
-               debugfs_create_u32("aes_ops",
-                                  S_IRUSR | S_IRGRP | S_IROTH,
-                                  dfs->dfs_root, (u32 *)&drv->stats.aes_ops);
-       dfs->dfs_sha256_ops =
-               debugfs_create_u32("sha256_ops",
-                                  S_IRUSR | S_IRGRP | S_IROTH,
-                                  dfs->dfs_root,
-                                  (u32 *)&drv->stats.sha256_ops);
-       dfs->dfs_sha512_ops =
-               debugfs_create_u32("sha512_ops",
-                                  S_IRUSR | S_IRGRP | S_IROTH,
-                                  dfs->dfs_root,
-                                  (u32 *)&drv->stats.sha512_ops);
-       dfs->dfs_aes_bytes =
-               debugfs_create_u64("aes_bytes",
-                                  S_IRUSR | S_IRGRP | S_IROTH,
-                                  dfs->dfs_root,
-                                  (u64 *)&drv->stats.aes_bytes);
-       dfs->dfs_sha256_bytes =
-               debugfs_create_u64("sha256_bytes",
-                                  S_IRUSR | S_IRGRP | S_IROTH,
-                                  dfs->dfs_root,
-                                  (u64 *)&drv->stats.sha256_bytes);
-       dfs->dfs_sha512_bytes =
-               debugfs_create_u64("sha512_bytes",
-                                  S_IRUSR | S_IRGRP | S_IROTH,
-                                  dfs->dfs_root,
-                                  (u64 *)&drv->stats.sha512_bytes);
-       dfs->dfs_errors =
-               debugfs_create_u32("errors",
-                                  S_IRUSR | S_IRGRP | S_IROTH,
-                                  dfs->dfs_root, (u32 *)&drv->stats.errors);
-       dfs->dfs_last_error =
-               debugfs_create_u32("last_error",
-                                  S_IRUSR | S_IRGRP | S_IROTH,
-                                  dfs->dfs_root,
-                                  (u32 *)&drv->stats.last_error);
-       dfs->dfs_last_error_pid =
-               debugfs_create_u32("last_error_pid",
-                                  S_IRUSR | S_IRGRP | S_IROTH,
-                                  dfs->dfs_root,
-                                  (u32 *)&drv->stats.last_error_pid);
-       return 0;
+       debugfs_create_u32("aes_ops", S_IRUSR | S_IRGRP | S_IROTH,
+                          root, (u32 *)&drv->stats.aes_ops);
+       debugfs_create_u32("sha256_ops", S_IRUSR | S_IRGRP | S_IROTH,
+                          root, (u32 *)&drv->stats.sha256_ops);
+       debugfs_create_u32("sha512_ops", S_IRUSR | S_IRGRP | S_IROTH,
+                          root, (u32 *)&drv->stats.sha512_ops);
+       debugfs_create_u64("aes_bytes", S_IRUSR | S_IRGRP | S_IROTH,
+                          root, (u64 *)&drv->stats.aes_bytes);
+       debugfs_create_u64("sha256_bytes", S_IRUSR | S_IRGRP | S_IROTH,
+                          root, (u64 *)&drv->stats.sha256_bytes);
+       debugfs_create_u64("sha512_bytes", S_IRUSR | S_IRGRP | S_IROTH,
+                          root, (u64 *)&drv->stats.sha512_bytes);
+       debugfs_create_u32("errors", S_IRUSR | S_IRGRP | S_IROTH,
+                          root, (u32 *)&drv->stats.errors);
+       debugfs_create_u32("last_error", S_IRUSR | S_IRGRP | S_IROTH,
+                          root, (u32 *)&drv->stats.last_error);
+       debugfs_create_u32("last_error_pid", S_IRUSR | S_IRGRP | S_IROTH,
+                          root, (u32 *)&drv->stats.last_error_pid);
 }
 
 void
 nx_debugfs_fini(struct nx_crypto_driver *drv)
 {
-       debugfs_remove_recursive(drv->dfs.dfs_root);
+       debugfs_remove_recursive(drv->dfs_root);
 }
 
 #endif