mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 12:10:52 -04:00
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 <[email protected]>
This commit is contained in:
parent
8510e30b46
commit
d9dda78bad
95 changed files with 243 additions and 302 deletions
|
|
@ -194,7 +194,7 @@ static int acpi_ac_seq_show(struct seq_file *seq, void *offset)
|
|||
|
||||
static int acpi_ac_open_fs(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, acpi_ac_seq_show, PDE(inode)->data);
|
||||
return single_open(file, acpi_ac_seq_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static int acpi_ac_add_fs(struct acpi_device *device)
|
||||
|
|
|
|||
|
|
@ -929,7 +929,7 @@ static int acpi_battery_read_##_name(struct seq_file *seq, void *offset) \
|
|||
} \
|
||||
static int acpi_battery_##_name##_open_fs(struct inode *inode, struct file *file) \
|
||||
{ \
|
||||
return single_open(file, acpi_battery_read_##_name, PDE(inode)->data); \
|
||||
return single_open(file, acpi_battery_read_##_name, PDE_DATA(inode)); \
|
||||
}
|
||||
|
||||
DECLARE_FILE_FUNCTIONS(info);
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
|
|||
|
||||
static int acpi_button_state_open_fs(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, acpi_button_state_seq_show, PDE(inode)->data);
|
||||
return single_open(file, acpi_button_state_seq_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations acpi_button_state_fops = {
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ static int acpi_system_alarm_seq_show(struct seq_file *seq, void *offset)
|
|||
|
||||
static int acpi_system_alarm_open_fs(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, acpi_system_alarm_seq_show, PDE(inode)->data);
|
||||
return single_open(file, acpi_system_alarm_seq_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static int get_date_field(char **p, u32 * value)
|
||||
|
|
@ -397,7 +397,7 @@ static int
|
|||
acpi_system_wakeup_device_open_fs(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, acpi_system_wakeup_device_seq_show,
|
||||
PDE(inode)->data);
|
||||
PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations acpi_system_wakeup_device_fops = {
|
||||
|
|
|
|||
|
|
@ -584,7 +584,7 @@ static int acpi_battery_read_info(struct seq_file *seq, void *offset)
|
|||
|
||||
static int acpi_battery_info_open_fs(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, acpi_battery_read_info, PDE(inode)->data);
|
||||
return single_open(file, acpi_battery_read_info, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static int acpi_battery_read_state(struct seq_file *seq, void *offset)
|
||||
|
|
@ -623,7 +623,7 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset)
|
|||
|
||||
static int acpi_battery_state_open_fs(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, acpi_battery_read_state, PDE(inode)->data);
|
||||
return single_open(file, acpi_battery_read_state, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static int acpi_battery_read_alarm(struct seq_file *seq, void *offset)
|
||||
|
|
@ -688,7 +688,7 @@ acpi_battery_write_alarm(struct file *file, const char __user * buffer,
|
|||
|
||||
static int acpi_battery_alarm_open_fs(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, acpi_battery_read_alarm, PDE(inode)->data);
|
||||
return single_open(file, acpi_battery_read_alarm, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations acpi_battery_info_fops = {
|
||||
|
|
@ -736,7 +736,7 @@ static int acpi_ac_read_state(struct seq_file *seq, void *offset)
|
|||
|
||||
static int acpi_ac_state_open_fs(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, acpi_ac_read_state, PDE(inode)->data);
|
||||
return single_open(file, acpi_ac_read_state, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations acpi_ac_state_fops = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue