| .. | .. |
|---|
| 109 | 109 | |
|---|
| 110 | 110 | static int __init cache_debugfs_init(void) |
|---|
| 111 | 111 | { |
|---|
| 112 | | - struct dentry *dcache_dentry, *icache_dentry; |
|---|
| 113 | | - |
|---|
| 114 | | - dcache_dentry = debugfs_create_file("dcache", S_IRUSR, arch_debugfs_dir, |
|---|
| 115 | | - (unsigned int *)CACHE_TYPE_DCACHE, |
|---|
| 116 | | - &cache_debugfs_fops); |
|---|
| 117 | | - if (!dcache_dentry) |
|---|
| 118 | | - return -ENOMEM; |
|---|
| 119 | | - |
|---|
| 120 | | - icache_dentry = debugfs_create_file("icache", S_IRUSR, arch_debugfs_dir, |
|---|
| 121 | | - (unsigned int *)CACHE_TYPE_ICACHE, |
|---|
| 122 | | - &cache_debugfs_fops); |
|---|
| 123 | | - if (!icache_dentry) { |
|---|
| 124 | | - debugfs_remove(dcache_dentry); |
|---|
| 125 | | - return -ENOMEM; |
|---|
| 126 | | - } |
|---|
| 127 | | - |
|---|
| 112 | + debugfs_create_file("dcache", S_IRUSR, arch_debugfs_dir, |
|---|
| 113 | + (void *)CACHE_TYPE_DCACHE, &cache_debugfs_fops); |
|---|
| 114 | + debugfs_create_file("icache", S_IRUSR, arch_debugfs_dir, |
|---|
| 115 | + (void *)CACHE_TYPE_ICACHE, &cache_debugfs_fops); |
|---|
| 128 | 116 | return 0; |
|---|
| 129 | 117 | } |
|---|
| 130 | 118 | module_init(cache_debugfs_init); |
|---|