aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/sbs.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-03-31 18:16:14 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-04-09 14:13:32 -0400
commitd9dda78bad879595d8c4220a067fc029d6484a16 (patch)
tree376c47ed566b719009e753e917104b150a639b11 /drivers/acpi/sbs.c
parent8510e30b46cd5467b2f930bef68a276dbc2c7d7c (diff)
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/sbs.c')
-rw-r--r--drivers/acpi/sbs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
index e523245643ac..a296e08d76b6 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)
584 584
585static int acpi_battery_info_open_fs(struct inode *inode, struct file *file) 585static int acpi_battery_info_open_fs(struct inode *inode, struct file *file)
586{ 586{
587 return single_open(file, acpi_battery_read_info, PDE(inode)->data); 587 return single_open(file, acpi_battery_read_info, PDE_DATA(inode));
588} 588}
589 589
590static int acpi_battery_read_state(struct seq_file *seq, void *offset) 590static 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)
623 623
624static int acpi_battery_state_open_fs(struct inode *inode, struct file *file) 624static int acpi_battery_state_open_fs(struct inode *inode, struct file *file)
625{ 625{
626 return single_open(file, acpi_battery_read_state, PDE(inode)->data); 626 return single_open(file, acpi_battery_read_state, PDE_DATA(inode));
627} 627}
628 628
629static int acpi_battery_read_alarm(struct seq_file *seq, void *offset) 629static 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,
688 688
689static int acpi_battery_alarm_open_fs(struct inode *inode, struct file *file) 689static int acpi_battery_alarm_open_fs(struct inode *inode, struct file *file)
690{ 690{
691 return single_open(file, acpi_battery_read_alarm, PDE(inode)->data); 691 return single_open(file, acpi_battery_read_alarm, PDE_DATA(inode));
692} 692}
693 693
694static const struct file_operations acpi_battery_info_fops = { 694static const struct file_operations acpi_battery_info_fops = {
@@ -736,7 +736,7 @@ static int acpi_ac_read_state(struct seq_file *seq, void *offset)
736 736
737static int acpi_ac_state_open_fs(struct inode *inode, struct file *file) 737static int acpi_ac_state_open_fs(struct inode *inode, struct file *file)
738{ 738{
739 return single_open(file, acpi_ac_read_state, PDE(inode)->data); 739 return single_open(file, acpi_ac_read_state, PDE_DATA(inode));
740} 740}
741 741
742static const struct file_operations acpi_ac_state_fops = { 742static const struct file_operations acpi_ac_state_fops = {