diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-03-31 22:16:14 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-09 18:13:32 (GMT) |
commit | d9dda78bad879595d8c4220a067fc029d6484a16 (patch) | |
tree | 376c47ed566b719009e753e917104b150a639b11 /drivers/acpi | |
parent | 8510e30b46cd5467b2f930bef68a276dbc2c7d7c (diff) | |
download | linux-d9dda78bad879595d8c4220a067fc029d6484a16.tar.xz |
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>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/ac.c | 2 | ||||
-rw-r--r-- | drivers/acpi/battery.c | 2 | ||||
-rw-r--r-- | drivers/acpi/button.c | 2 | ||||
-rw-r--r-- | drivers/acpi/proc.c | 4 | ||||
-rw-r--r-- | drivers/acpi/sbs.c | 8 |
5 files changed, 9 insertions, 9 deletions
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index 6d5bf64..00d2efd 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c @@ -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) diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index c5cd5b5..169ced7 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -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); diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 86c7d54..5d57cd5 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c @@ -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 = { diff --git a/drivers/acpi/proc.c b/drivers/acpi/proc.c index 52ce767..aa1227a 100644 --- a/drivers/acpi/proc.c +++ b/drivers/acpi/proc.c @@ -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 = { diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index e523245..a296e08 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c @@ -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 = { |