aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
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 /sound/core
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 'sound/core')
-rw-r--r--sound/core/info.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/core/info.c b/sound/core/info.c
index a4e2de6874df..3aa88640808e 100644
--- a/sound/core/info.c
+++ b/sound/core/info.c
@@ -310,12 +310,10 @@ static int snd_info_entry_open(struct inode *inode, struct file *file)
310 struct snd_info_entry *entry; 310 struct snd_info_entry *entry;
311 struct snd_info_private_data *data; 311 struct snd_info_private_data *data;
312 struct snd_info_buffer *buffer; 312 struct snd_info_buffer *buffer;
313 struct proc_dir_entry *p;
314 int mode, err; 313 int mode, err;
315 314
316 mutex_lock(&info_mutex); 315 mutex_lock(&info_mutex);
317 p = PDE(inode); 316 entry = PDE_DATA(inode);
318 entry = p == NULL ? NULL : (struct snd_info_entry *)p->data;
319 if (entry == NULL || ! entry->p) { 317 if (entry == NULL || ! entry->p) {
320 mutex_unlock(&info_mutex); 318 mutex_unlock(&info_mutex);
321 return -ENODEV; 319 return -ENODEV;