mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -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
|
|
@ -76,7 +76,7 @@ static int irq_affinity_list_proc_show(struct seq_file *m, void *v)
|
|||
static ssize_t write_irq_affinity(int type, struct file *file,
|
||||
const char __user *buffer, size_t count, loff_t *pos)
|
||||
{
|
||||
unsigned int irq = (int)(long)PDE(file_inode(file))->data;
|
||||
unsigned int irq = (int)(long)PDE_DATA(file_inode(file));
|
||||
cpumask_var_t new_value;
|
||||
int err;
|
||||
|
||||
|
|
@ -131,17 +131,17 @@ static ssize_t irq_affinity_list_proc_write(struct file *file,
|
|||
|
||||
static int irq_affinity_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, irq_affinity_proc_show, PDE(inode)->data);
|
||||
return single_open(file, irq_affinity_proc_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static int irq_affinity_list_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, irq_affinity_list_proc_show, PDE(inode)->data);
|
||||
return single_open(file, irq_affinity_list_proc_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static int irq_affinity_hint_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, irq_affinity_hint_proc_show, PDE(inode)->data);
|
||||
return single_open(file, irq_affinity_hint_proc_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations irq_affinity_proc_fops = {
|
||||
|
|
@ -212,7 +212,7 @@ out:
|
|||
|
||||
static int default_affinity_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, default_affinity_show, PDE(inode)->data);
|
||||
return single_open(file, default_affinity_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations default_affinity_proc_fops = {
|
||||
|
|
@ -233,7 +233,7 @@ static int irq_node_proc_show(struct seq_file *m, void *v)
|
|||
|
||||
static int irq_node_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, irq_node_proc_show, PDE(inode)->data);
|
||||
return single_open(file, irq_node_proc_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations irq_node_proc_fops = {
|
||||
|
|
@ -256,7 +256,7 @@ static int irq_spurious_proc_show(struct seq_file *m, void *v)
|
|||
|
||||
static int irq_spurious_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, irq_spurious_proc_show, PDE(inode)->data);
|
||||
return single_open(file, irq_spurious_proc_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations irq_spurious_proc_fops = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue