.. | .. |
---|
118 | 118 | |
---|
119 | 119 | static int __init spinlock_test(void) |
---|
120 | 120 | { |
---|
121 | | - struct dentry *d; |
---|
122 | | - |
---|
123 | | - if (!mips_debugfs_dir) |
---|
124 | | - return -ENODEV; |
---|
125 | | - |
---|
126 | | - d = debugfs_create_file("spin_single", S_IRUGO, |
---|
127 | | - mips_debugfs_dir, NULL, |
---|
128 | | - &fops_ss); |
---|
129 | | - if (!d) |
---|
130 | | - return -ENOMEM; |
---|
131 | | - |
---|
132 | | - d = debugfs_create_file("spin_multi", S_IRUGO, |
---|
133 | | - mips_debugfs_dir, NULL, |
---|
134 | | - &fops_multi); |
---|
135 | | - if (!d) |
---|
136 | | - return -ENOMEM; |
---|
137 | | - |
---|
| 121 | + debugfs_create_file("spin_single", S_IRUGO, mips_debugfs_dir, NULL, |
---|
| 122 | + &fops_ss); |
---|
| 123 | + debugfs_create_file("spin_multi", S_IRUGO, mips_debugfs_dir, NULL, |
---|
| 124 | + &fops_multi); |
---|
138 | 125 | return 0; |
---|
139 | 126 | } |
---|
140 | 127 | device_initcall(spinlock_test); |
---|