@@ -886,10 +886,8 @@ static __poll_t scmi_dbg_raw_mode_message_poll(struct file *filp,
886
886
887
887
static int scmi_dbg_raw_mode_open (struct inode * inode , struct file * filp )
888
888
{
889
- u8 id ;
890
889
struct scmi_raw_mode_info * raw ;
891
890
struct scmi_dbg_raw_data * rd ;
892
- const char * id_str = filp -> f_path .dentry -> d_parent -> d_name .name ;
893
891
894
892
if (!inode -> i_private )
895
893
return - ENODEV ;
@@ -915,8 +913,8 @@ static int scmi_dbg_raw_mode_open(struct inode *inode, struct file *filp)
915
913
}
916
914
917
915
/* Grab channel ID from debugfs entry naming if any */
918
- if (! kstrtou8 ( id_str , 16 , & id ))
919
- rd -> chan_id = id ;
916
+ /* not set - reassing 0 we already had after kzalloc() */
917
+ rd -> chan_id = debugfs_get_aux_num ( filp ) ;
920
918
921
919
rd -> raw = raw ;
922
920
filp -> private_data = rd ;
@@ -1225,10 +1223,12 @@ void *scmi_raw_mode_init(const struct scmi_handle *handle,
1225
1223
snprintf (cdir , 8 , "0x%02X" , channels [i ]);
1226
1224
chd = debugfs_create_dir (cdir , top_chans );
1227
1225
1228
- debugfs_create_file ("message" , 0600 , chd , raw ,
1226
+ debugfs_create_file_aux_num ("message" , 0600 , chd ,
1227
+ raw , channels [i ],
1229
1228
& scmi_dbg_raw_mode_message_fops );
1230
1229
1231
- debugfs_create_file ("message_async" , 0600 , chd , raw ,
1230
+ debugfs_create_file_aux_num ("message_async" , 0600 , chd ,
1231
+ raw , channels [i ],
1232
1232
& scmi_dbg_raw_mode_message_async_fops );
1233
1233
}
1234
1234
}
0 commit comments