diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-03-31 18:16:14 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-09 14:13:32 -0400 |
commit | d9dda78bad879595d8c4220a067fc029d6484a16 (patch) | |
tree | 376c47ed566b719009e753e917104b150a639b11 /kernel/irq | |
parent | 8510e30b46cd5467b2f930bef68a276dbc2c7d7c (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 'kernel/irq')
-rw-r--r-- | kernel/irq/proc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c index 397db02209ed..d59ae3751a33 100644 --- a/kernel/irq/proc.c +++ b/kernel/irq/proc.c | |||
@@ -76,7 +76,7 @@ static int irq_affinity_list_proc_show(struct seq_file *m, void *v) | |||
76 | static ssize_t write_irq_affinity(int type, struct file *file, | 76 | static ssize_t write_irq_affinity(int type, struct file *file, |
77 | const char __user *buffer, size_t count, loff_t *pos) | 77 | const char __user *buffer, size_t count, loff_t *pos) |
78 | { | 78 | { |
79 | unsigned int irq = (int)(long)PDE(file_inode(file))->data; | 79 | unsigned int irq = (int)(long)PDE_DATA(file_inode(file)); |
80 | cpumask_var_t new_value; | 80 | cpumask_var_t new_value; |
81 | int err; | 81 | int err; |
82 | 82 | ||
@@ -131,17 +131,17 @@ static ssize_t irq_affinity_list_proc_write(struct file *file, | |||
131 | 131 | ||
132 | static int irq_affinity_proc_open(struct inode *inode, struct file *file) | 132 | static int irq_affinity_proc_open(struct inode *inode, struct file *file) |
133 | { | 133 | { |
134 | return single_open(file, irq_affinity_proc_show, PDE(inode)->data); | 134 | return single_open(file, irq_affinity_proc_show, PDE_DATA(inode)); |
135 | } | 135 | } |
136 | 136 | ||
137 | static int irq_affinity_list_proc_open(struct inode *inode, struct file *file) | 137 | static int irq_affinity_list_proc_open(struct inode *inode, struct file *file) |
138 | { | 138 | { |
139 | return single_open(file, irq_affinity_list_proc_show, PDE(inode)->data); | 139 | return single_open(file, irq_affinity_list_proc_show, PDE_DATA(inode)); |
140 | } | 140 | } |
141 | 141 | ||
142 | static int irq_affinity_hint_proc_open(struct inode *inode, struct file *file) | 142 | static int irq_affinity_hint_proc_open(struct inode *inode, struct file *file) |
143 | { | 143 | { |
144 | return single_open(file, irq_affinity_hint_proc_show, PDE(inode)->data); | 144 | return single_open(file, irq_affinity_hint_proc_show, PDE_DATA(inode)); |
145 | } | 145 | } |
146 | 146 | ||
147 | static const struct file_operations irq_affinity_proc_fops = { | 147 | static const struct file_operations irq_affinity_proc_fops = { |
@@ -212,7 +212,7 @@ out: | |||
212 | 212 | ||
213 | static int default_affinity_open(struct inode *inode, struct file *file) | 213 | static int default_affinity_open(struct inode *inode, struct file *file) |
214 | { | 214 | { |
215 | return single_open(file, default_affinity_show, PDE(inode)->data); | 215 | return single_open(file, default_affinity_show, PDE_DATA(inode)); |
216 | } | 216 | } |
217 | 217 | ||
218 | static const struct file_operations default_affinity_proc_fops = { | 218 | 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) | |||
233 | 233 | ||
234 | static int irq_node_proc_open(struct inode *inode, struct file *file) | 234 | static int irq_node_proc_open(struct inode *inode, struct file *file) |
235 | { | 235 | { |
236 | return single_open(file, irq_node_proc_show, PDE(inode)->data); | 236 | return single_open(file, irq_node_proc_show, PDE_DATA(inode)); |
237 | } | 237 | } |
238 | 238 | ||
239 | static const struct file_operations irq_node_proc_fops = { | 239 | 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) | |||
256 | 256 | ||
257 | static int irq_spurious_proc_open(struct inode *inode, struct file *file) | 257 | static int irq_spurious_proc_open(struct inode *inode, struct file *file) |
258 | { | 258 | { |
259 | return single_open(file, irq_spurious_proc_show, PDE(inode)->data); | 259 | return single_open(file, irq_spurious_proc_show, PDE_DATA(inode)); |
260 | } | 260 | } |
261 | 261 | ||
262 | static const struct file_operations irq_spurious_proc_fops = { | 262 | static const struct file_operations irq_spurious_proc_fops = { |