return 0;
 }
 
-DEFINE_SIMPLE_ATTRIBUTE(error_type_fops, error_type_get,
-                       error_type_set, "0x%llx\n");
+DEFINE_DEBUGFS_ATTRIBUTE(error_type_fops, error_type_get, error_type_set,
+                        "0x%llx\n");
 
 static int error_inject_set(void *data, u64 val)
 {
                error_param3, error_param4);
 }
 
-DEFINE_SIMPLE_ATTRIBUTE(error_inject_fops, NULL,
-                       error_inject_set, "%llu\n");
+DEFINE_DEBUGFS_ATTRIBUTE(error_inject_fops, NULL, error_inject_set, "%llu\n");
 
 static int einj_check_table(struct acpi_table_einj *einj_tab)
 {
        if (!fentry)
                goto err_cleanup;
 
-       fentry = debugfs_create_file("error_type", S_IRUSR | S_IWUSR,
-                                    einj_debug_dir, NULL, &error_type_fops);
+       fentry = debugfs_create_file_unsafe("error_type", 0600,
+                                           einj_debug_dir, NULL,
+                                           &error_type_fops);
        if (!fentry)
                goto err_cleanup;
-       fentry = debugfs_create_file("error_inject", S_IWUSR,
-                                    einj_debug_dir, NULL, &error_inject_fops);
+       fentry = debugfs_create_file_unsafe("error_inject", 0200,
+                                           einj_debug_dir, NULL,
+                                           &error_inject_fops);
        if (!fentry)
                goto err_cleanup;