procfs: new helper - PDE_DATA(inode)
The only part of proc_dir_entry the code outside of fs/proc really cares about is PDE(inode)->data. Provide a helper for that; static inline for now, eventually will be moved to fs/proc, along with the knowledge of struct proc_dir_entry layout. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Цей коміт міститься в:
@@ -1599,98 +1599,98 @@ static int i2o_seq_show_sensors(struct seq_file *seq, void *v)
|
||||
|
||||
static int i2o_seq_open_hrt(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, i2o_seq_show_hrt, PDE(inode)->data);
|
||||
return single_open(file, i2o_seq_show_hrt, PDE_DATA(inode));
|
||||
};
|
||||
|
||||
static int i2o_seq_open_lct(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, i2o_seq_show_lct, PDE(inode)->data);
|
||||
return single_open(file, i2o_seq_show_lct, PDE_DATA(inode));
|
||||
};
|
||||
|
||||
static int i2o_seq_open_status(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, i2o_seq_show_status, PDE(inode)->data);
|
||||
return single_open(file, i2o_seq_show_status, PDE_DATA(inode));
|
||||
};
|
||||
|
||||
static int i2o_seq_open_hw(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, i2o_seq_show_hw, PDE(inode)->data);
|
||||
return single_open(file, i2o_seq_show_hw, PDE_DATA(inode));
|
||||
};
|
||||
|
||||
static int i2o_seq_open_ddm_table(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, i2o_seq_show_ddm_table, PDE(inode)->data);
|
||||
return single_open(file, i2o_seq_show_ddm_table, PDE_DATA(inode));
|
||||
};
|
||||
|
||||
static int i2o_seq_open_driver_store(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, i2o_seq_show_driver_store, PDE(inode)->data);
|
||||
return single_open(file, i2o_seq_show_driver_store, PDE_DATA(inode));
|
||||
};
|
||||
|
||||
static int i2o_seq_open_drivers_stored(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, i2o_seq_show_drivers_stored, PDE(inode)->data);
|
||||
return single_open(file, i2o_seq_show_drivers_stored, PDE_DATA(inode));
|
||||
};
|
||||
|
||||
static int i2o_seq_open_groups(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, i2o_seq_show_groups, PDE(inode)->data);
|
||||
return single_open(file, i2o_seq_show_groups, PDE_DATA(inode));
|
||||
};
|
||||
|
||||
static int i2o_seq_open_phys_device(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, i2o_seq_show_phys_device, PDE(inode)->data);
|
||||
return single_open(file, i2o_seq_show_phys_device, PDE_DATA(inode));
|
||||
};
|
||||
|
||||
static int i2o_seq_open_claimed(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, i2o_seq_show_claimed, PDE(inode)->data);
|
||||
return single_open(file, i2o_seq_show_claimed, PDE_DATA(inode));
|
||||
};
|
||||
|
||||
static int i2o_seq_open_users(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, i2o_seq_show_users, PDE(inode)->data);
|
||||
return single_open(file, i2o_seq_show_users, PDE_DATA(inode));
|
||||
};
|
||||
|
||||
static int i2o_seq_open_priv_msgs(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, i2o_seq_show_priv_msgs, PDE(inode)->data);
|
||||
return single_open(file, i2o_seq_show_priv_msgs, PDE_DATA(inode));
|
||||
};
|
||||
|
||||
static int i2o_seq_open_authorized_users(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, i2o_seq_show_authorized_users,
|
||||
PDE(inode)->data);
|
||||
PDE_DATA(inode));
|
||||
};
|
||||
|
||||
static int i2o_seq_open_dev_identity(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, i2o_seq_show_dev_identity, PDE(inode)->data);
|
||||
return single_open(file, i2o_seq_show_dev_identity, PDE_DATA(inode));
|
||||
};
|
||||
|
||||
static int i2o_seq_open_ddm_identity(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, i2o_seq_show_ddm_identity, PDE(inode)->data);
|
||||
return single_open(file, i2o_seq_show_ddm_identity, PDE_DATA(inode));
|
||||
};
|
||||
|
||||
static int i2o_seq_open_uinfo(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, i2o_seq_show_uinfo, PDE(inode)->data);
|
||||
return single_open(file, i2o_seq_show_uinfo, PDE_DATA(inode));
|
||||
};
|
||||
|
||||
static int i2o_seq_open_sgl_limits(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, i2o_seq_show_sgl_limits, PDE(inode)->data);
|
||||
return single_open(file, i2o_seq_show_sgl_limits, PDE_DATA(inode));
|
||||
};
|
||||
|
||||
static int i2o_seq_open_sensors(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, i2o_seq_show_sensors, PDE(inode)->data);
|
||||
return single_open(file, i2o_seq_show_sensors, PDE_DATA(inode));
|
||||
};
|
||||
|
||||
static int i2o_seq_open_dev_name(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, i2o_seq_show_dev_name, PDE(inode)->data);
|
||||
return single_open(file, i2o_seq_show_dev_name, PDE_DATA(inode));
|
||||
};
|
||||
|
||||
static const struct file_operations i2o_seq_fops_lct = {
|
||||
|
Посилання в новій задачі
Заблокувати користувача