@@ -194,7 +194,7 @@ struct dpu_debugfs_regset32 {
194
194
struct dpu_kms * dpu_kms ;
195
195
};
196
196
197
- static int _dpu_debugfs_show_regset32 (struct seq_file * s , void * data )
197
+ static int dpu_regset32_show (struct seq_file * s , void * data )
198
198
{
199
199
struct dpu_debugfs_regset32 * regset = s -> private ;
200
200
struct dpu_kms * dpu_kms = regset -> dpu_kms ;
@@ -227,19 +227,7 @@ static int _dpu_debugfs_show_regset32(struct seq_file *s, void *data)
227
227
228
228
return 0 ;
229
229
}
230
-
231
- static int dpu_debugfs_open_regset32 (struct inode * inode ,
232
- struct file * file )
233
- {
234
- return single_open (file , _dpu_debugfs_show_regset32 , inode -> i_private );
235
- }
236
-
237
- static const struct file_operations dpu_fops_regset32 = {
238
- .open = dpu_debugfs_open_regset32 ,
239
- .read = seq_read ,
240
- .llseek = seq_lseek ,
241
- .release = single_release ,
242
- };
230
+ DEFINE_SHOW_ATTRIBUTE (dpu_regset32 );
243
231
244
232
void dpu_debugfs_create_regset32 (const char * name , umode_t mode ,
245
233
void * parent ,
@@ -259,7 +247,7 @@ void dpu_debugfs_create_regset32(const char *name, umode_t mode,
259
247
regset -> blk_len = length ;
260
248
regset -> dpu_kms = dpu_kms ;
261
249
262
- debugfs_create_file (name , mode , parent , regset , & dpu_fops_regset32 );
250
+ debugfs_create_file (name , mode , parent , regset , & dpu_regset32_fops );
263
251
}
264
252
265
253
static int dpu_kms_debugfs_init (struct msm_kms * kms , struct drm_minor * minor )
0 commit comments