aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-proc.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/ide/ide-proc.c
parentlast_radio_log: switch to proc_create() (diff)
downloadlinux-dev-d9dda78bad879595d8c4220a067fc029d6484a16.tar.xz
linux-dev-d9dda78bad879595d8c4220a067fc029d6484a16.zip
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/ide/ide-proc.c')
-rw-r--r--drivers/ide/ide-proc.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
index 2abcc4790f12..97c070077774 100644
--- a/drivers/ide/ide-proc.c
+++ b/drivers/ide/ide-proc.c
@@ -58,7 +58,7 @@ static int ide_imodel_proc_show(struct seq_file *m, void *v)
static int ide_imodel_proc_open(struct inode *inode, struct file *file)
{
- return single_open(file, ide_imodel_proc_show, PDE(inode)->data);
+ return single_open(file, ide_imodel_proc_show, PDE_DATA(inode));
}
static const struct file_operations ide_imodel_proc_fops = {
@@ -82,7 +82,7 @@ static int ide_mate_proc_show(struct seq_file *m, void *v)
static int ide_mate_proc_open(struct inode *inode, struct file *file)
{
- return single_open(file, ide_mate_proc_show, PDE(inode)->data);
+ return single_open(file, ide_mate_proc_show, PDE_DATA(inode));
}
static const struct file_operations ide_mate_proc_fops = {
@@ -103,7 +103,7 @@ static int ide_channel_proc_show(struct seq_file *m, void *v)
static int ide_channel_proc_open(struct inode *inode, struct file *file)
{
- return single_open(file, ide_channel_proc_show, PDE(inode)->data);
+ return single_open(file, ide_channel_proc_show, PDE_DATA(inode));
}
static const struct file_operations ide_channel_proc_fops = {
@@ -143,7 +143,7 @@ static int ide_identify_proc_show(struct seq_file *m, void *v)
static int ide_identify_proc_open(struct inode *inode, struct file *file)
{
- return single_open(file, ide_identify_proc_show, PDE(inode)->data);
+ return single_open(file, ide_identify_proc_show, PDE_DATA(inode));
}
static const struct file_operations ide_identify_proc_fops = {
@@ -325,7 +325,7 @@ static int ide_settings_proc_show(struct seq_file *m, void *v)
static int ide_settings_proc_open(struct inode *inode, struct file *file)
{
- return single_open(file, ide_settings_proc_show, PDE(inode)->data);
+ return single_open(file, ide_settings_proc_show, PDE_DATA(inode));
}
#define MAX_LEN 30
@@ -333,7 +333,7 @@ static int ide_settings_proc_open(struct inode *inode, struct file *file)
static ssize_t ide_settings_proc_write(struct file *file, const char __user *buffer,
size_t count, loff_t *pos)
{
- ide_drive_t *drive = (ide_drive_t *) PDE(file_inode(file))->data;
+ ide_drive_t *drive = PDE_DATA(file_inode(file));
char name[MAX_LEN + 1];
int for_real = 0, mul_factor, div_factor;
unsigned long n;
@@ -474,7 +474,7 @@ static int ide_geometry_proc_show(struct seq_file *m, void *v)
static int ide_geometry_proc_open(struct inode *inode, struct file *file)
{
- return single_open(file, ide_geometry_proc_show, PDE(inode)->data);
+ return single_open(file, ide_geometry_proc_show, PDE_DATA(inode));
}
const struct file_operations ide_geometry_proc_fops = {
@@ -497,7 +497,7 @@ static int ide_dmodel_proc_show(struct seq_file *seq, void *v)
static int ide_dmodel_proc_open(struct inode *inode, struct file *file)
{
- return single_open(file, ide_dmodel_proc_show, PDE(inode)->data);
+ return single_open(file, ide_dmodel_proc_show, PDE_DATA(inode));
}
static const struct file_operations ide_dmodel_proc_fops = {
@@ -525,7 +525,7 @@ static int ide_driver_proc_show(struct seq_file *m, void *v)
static int ide_driver_proc_open(struct inode *inode, struct file *file)
{
- return single_open(file, ide_driver_proc_show, PDE(inode)->data);
+ return single_open(file, ide_driver_proc_show, PDE_DATA(inode));
}
static int ide_replace_subdriver(ide_drive_t *drive, const char *driver)
@@ -558,7 +558,7 @@ static int ide_replace_subdriver(ide_drive_t *drive, const char *driver)
static ssize_t ide_driver_proc_write(struct file *file, const char __user *buffer,
size_t count, loff_t *pos)
{
- ide_drive_t *drive = (ide_drive_t *) PDE(file_inode(file))->data;
+ ide_drive_t *drive = PDE_DATA(file_inode(file));
char name[32];
if (!capable(CAP_SYS_ADMIN))
@@ -601,7 +601,7 @@ static int ide_media_proc_show(struct seq_file *m, void *v)
static int ide_media_proc_open(struct inode *inode, struct file *file)
{
- return single_open(file, ide_media_proc_show, PDE(inode)->data);
+ return single_open(file, ide_media_proc_show, PDE_DATA(inode));
}
static const struct file_operations ide_media_proc_fops = {