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 /arch/xtensa | |
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 'arch/xtensa')
-rw-r--r-- | arch/xtensa/platforms/iss/simdisk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/xtensa/platforms/iss/simdisk.c b/arch/xtensa/platforms/iss/simdisk.c index 47ccef7839c9..4a06d70ddf5e 100644 --- a/arch/xtensa/platforms/iss/simdisk.c +++ b/arch/xtensa/platforms/iss/simdisk.c | |||
@@ -217,7 +217,7 @@ static int simdisk_detach(struct simdisk *dev) | |||
217 | static ssize_t proc_read_simdisk(struct file *file, char __user *buf, | 217 | static ssize_t proc_read_simdisk(struct file *file, char __user *buf, |
218 | size_t size, loff_t *ppos) | 218 | size_t size, loff_t *ppos) |
219 | { | 219 | { |
220 | struct simdisk *dev = PDE(file_inode(file))->data; | 220 | struct simdisk *dev = PDE_DATA(file_inode(file)); |
221 | char *s = dev->filename; | 221 | char *s = dev->filename; |
222 | if (s) { | 222 | if (s) { |
223 | ssize_t n = simple_read_from_buffer(buf, size, ppos, | 223 | ssize_t n = simple_read_from_buffer(buf, size, ppos, |
@@ -234,7 +234,7 @@ static ssize_t proc_write_simdisk(struct file *file, const char __user *buf, | |||
234 | size_t size, loff_t *ppos) | 234 | size_t size, loff_t *ppos) |
235 | { | 235 | { |
236 | char *tmp = kmalloc(count + 1, GFP_KERNEL); | 236 | char *tmp = kmalloc(count + 1, GFP_KERNEL); |
237 | struct simdisk *dev = PDE(file_inode(file))->data; | 237 | struct simdisk *dev = PDE_DATA(file_inode(file)); |
238 | int err; | 238 | int err; |
239 | 239 | ||
240 | if (tmp == NULL) | 240 | if (tmp == NULL) |