aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-01-23 17:07:38 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-22 23:31:31 -0500
commit496ad9aa8ef448058e36ca7a787c61f2e63f0f54 (patch)
tree8f4abde793cd7db5bb8fde6d27ebcacd0e54379a /arch/powerpc/kernel
parent57eccb830f1cc93d4b506ba306d8dfa685e0c88f (diff)
new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/proc_powerpc.c6
-rw-r--r--arch/powerpc/kernel/rtas_flash.c16
2 files changed, 11 insertions, 11 deletions
diff --git a/arch/powerpc/kernel/proc_powerpc.c b/arch/powerpc/kernel/proc_powerpc.c
index c8ae3714e79b..f19d0bdc3241 100644
--- a/arch/powerpc/kernel/proc_powerpc.c
+++ b/arch/powerpc/kernel/proc_powerpc.c
@@ -32,7 +32,7 @@
32static loff_t page_map_seek( struct file *file, loff_t off, int whence) 32static loff_t page_map_seek( struct file *file, loff_t off, int whence)
33{ 33{
34 loff_t new; 34 loff_t new;
35 struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); 35 struct proc_dir_entry *dp = PDE(file_inode(file));
36 36
37 switch(whence) { 37 switch(whence) {
38 case 0: 38 case 0:
@@ -55,13 +55,13 @@ static loff_t page_map_seek( struct file *file, loff_t off, int whence)
55static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes, 55static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes,
56 loff_t *ppos) 56 loff_t *ppos)
57{ 57{
58 struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); 58 struct proc_dir_entry *dp = PDE(file_inode(file));
59 return simple_read_from_buffer(buf, nbytes, ppos, dp->data, dp->size); 59 return simple_read_from_buffer(buf, nbytes, ppos, dp->data, dp->size);
60} 60}
61 61
62static int page_map_mmap( struct file *file, struct vm_area_struct *vma ) 62static int page_map_mmap( struct file *file, struct vm_area_struct *vma )
63{ 63{
64 struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); 64 struct proc_dir_entry *dp = PDE(file_inode(file));
65 65
66 if ((vma->vm_end - vma->vm_start) > dp->size) 66 if ((vma->vm_end - vma->vm_start) > dp->size)
67 return -EINVAL; 67 return -EINVAL;
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c
index 8329190312c1..c642f0132988 100644
--- a/arch/powerpc/kernel/rtas_flash.c
+++ b/arch/powerpc/kernel/rtas_flash.c
@@ -191,7 +191,7 @@ static void free_flash_list(struct flash_block_list *f)
191 191
192static int rtas_flash_release(struct inode *inode, struct file *file) 192static int rtas_flash_release(struct inode *inode, struct file *file)
193{ 193{
194 struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); 194 struct proc_dir_entry *dp = PDE(file_inode(file));
195 struct rtas_update_flash_t *uf; 195 struct rtas_update_flash_t *uf;
196 196
197 uf = (struct rtas_update_flash_t *) dp->data; 197 uf = (struct rtas_update_flash_t *) dp->data;
@@ -253,7 +253,7 @@ static void get_flash_status_msg(int status, char *buf)
253static ssize_t rtas_flash_read(struct file *file, char __user *buf, 253static ssize_t rtas_flash_read(struct file *file, char __user *buf,
254 size_t count, loff_t *ppos) 254 size_t count, loff_t *ppos)
255{ 255{
256 struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); 256 struct proc_dir_entry *dp = PDE(file_inode(file));
257 struct rtas_update_flash_t *uf; 257 struct rtas_update_flash_t *uf;
258 char msg[RTAS_MSG_MAXLEN]; 258 char msg[RTAS_MSG_MAXLEN];
259 259
@@ -282,7 +282,7 @@ void rtas_block_ctor(void *ptr)
282static ssize_t rtas_flash_write(struct file *file, const char __user *buffer, 282static ssize_t rtas_flash_write(struct file *file, const char __user *buffer,
283 size_t count, loff_t *off) 283 size_t count, loff_t *off)
284{ 284{
285 struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); 285 struct proc_dir_entry *dp = PDE(file_inode(file));
286 struct rtas_update_flash_t *uf; 286 struct rtas_update_flash_t *uf;
287 char *p; 287 char *p;
288 int next_free; 288 int next_free;
@@ -374,7 +374,7 @@ static void manage_flash(struct rtas_manage_flash_t *args_buf)
374static ssize_t manage_flash_read(struct file *file, char __user *buf, 374static ssize_t manage_flash_read(struct file *file, char __user *buf,
375 size_t count, loff_t *ppos) 375 size_t count, loff_t *ppos)
376{ 376{
377 struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); 377 struct proc_dir_entry *dp = PDE(file_inode(file));
378 struct rtas_manage_flash_t *args_buf; 378 struct rtas_manage_flash_t *args_buf;
379 char msg[RTAS_MSG_MAXLEN]; 379 char msg[RTAS_MSG_MAXLEN];
380 int msglen; 380 int msglen;
@@ -391,7 +391,7 @@ static ssize_t manage_flash_read(struct file *file, char __user *buf,
391static ssize_t manage_flash_write(struct file *file, const char __user *buf, 391static ssize_t manage_flash_write(struct file *file, const char __user *buf,
392 size_t count, loff_t *off) 392 size_t count, loff_t *off)
393{ 393{
394 struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); 394 struct proc_dir_entry *dp = PDE(file_inode(file));
395 struct rtas_manage_flash_t *args_buf; 395 struct rtas_manage_flash_t *args_buf;
396 const char reject_str[] = "0"; 396 const char reject_str[] = "0";
397 const char commit_str[] = "1"; 397 const char commit_str[] = "1";
@@ -462,7 +462,7 @@ static int get_validate_flash_msg(struct rtas_validate_flash_t *args_buf,
462static ssize_t validate_flash_read(struct file *file, char __user *buf, 462static ssize_t validate_flash_read(struct file *file, char __user *buf,
463 size_t count, loff_t *ppos) 463 size_t count, loff_t *ppos)
464{ 464{
465 struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); 465 struct proc_dir_entry *dp = PDE(file_inode(file));
466 struct rtas_validate_flash_t *args_buf; 466 struct rtas_validate_flash_t *args_buf;
467 char msg[RTAS_MSG_MAXLEN]; 467 char msg[RTAS_MSG_MAXLEN];
468 int msglen; 468 int msglen;
@@ -477,7 +477,7 @@ static ssize_t validate_flash_read(struct file *file, char __user *buf,
477static ssize_t validate_flash_write(struct file *file, const char __user *buf, 477static ssize_t validate_flash_write(struct file *file, const char __user *buf,
478 size_t count, loff_t *off) 478 size_t count, loff_t *off)
479{ 479{
480 struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); 480 struct proc_dir_entry *dp = PDE(file_inode(file));
481 struct rtas_validate_flash_t *args_buf; 481 struct rtas_validate_flash_t *args_buf;
482 int rc; 482 int rc;
483 483
@@ -526,7 +526,7 @@ done:
526 526
527static int validate_flash_release(struct inode *inode, struct file *file) 527static int validate_flash_release(struct inode *inode, struct file *file)
528{ 528{
529 struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); 529 struct proc_dir_entry *dp = PDE(file_inode(file));
530 struct rtas_validate_flash_t *args_buf; 530 struct rtas_validate_flash_t *args_buf;
531 531
532 args_buf = (struct rtas_validate_flash_t *) dp->data; 532 args_buf = (struct rtas_validate_flash_t *) dp->data;