aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--arch/alpha/kernel/srm_env.c4
-rw-r--r--arch/arm/kernel/atags_proc.c2
-rw-r--r--arch/blackfin/kernel/cplbinfo.c4
-rw-r--r--arch/ia64/kernel/salinfo.c18
-rw-r--r--arch/mips/lasat/picvue_proc.c4
-rw-r--r--arch/powerpc/kernel/proc_powerpc.c19
-rw-r--r--arch/powerpc/platforms/pseries/scanlog.c9
-rw-r--r--arch/sh/mm/alignment.c2
-rw-r--r--arch/sparc/kernel/ioport.c2
-rw-r--r--arch/tile/kernel/hardwall.c2
-rw-r--r--arch/xtensa/platforms/iss/simdisk.c4
-rw-r--r--drivers/acpi/ac.c2
-rw-r--r--drivers/acpi/battery.c2
-rw-r--r--drivers/acpi/button.c2
-rw-r--r--drivers/acpi/proc.c4
-rw-r--r--drivers/acpi/sbs.c8
-rw-r--r--drivers/block/DAC960.c8
-rw-r--r--drivers/block/cciss.c2
-rw-r--r--drivers/block/cpqarray.c2
-rw-r--r--drivers/block/drbd/drbd_proc.c2
-rw-r--r--drivers/block/pktcdvd.c2
-rw-r--r--drivers/block/ps3vram.c2
-rw-r--r--drivers/char/ipmi/ipmi_msghandler.c6
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c6
-rw-r--r--drivers/gpu/drm/drm_proc.c2
-rw-r--r--drivers/ide/ide-cd.c2
-rw-r--r--drivers/ide/ide-disk_proc.c8
-rw-r--r--drivers/ide/ide-floppy_proc.c2
-rw-r--r--drivers/ide/ide-proc.c22
-rw-r--r--drivers/ide/ide-tape.c2
-rw-r--r--drivers/isdn/gigaset/capi.c2
-rw-r--r--drivers/isdn/hardware/avm/b1.c2
-rw-r--r--drivers/isdn/hardware/avm/b1dma.c2
-rw-r--r--drivers/isdn/hardware/avm/c4.c2
-rw-r--r--drivers/isdn/hardware/eicon/divasproc.c12
-rw-r--r--drivers/isdn/hysdn/hycapi.c2
-rw-r--r--drivers/isdn/hysdn/hysdn_procconf.c4
-rw-r--r--drivers/isdn/hysdn/hysdn_proclog.c8
-rw-r--r--drivers/macintosh/via-pmu.c2
-rw-r--r--drivers/media/pci/zoran/zoran_procfs.c4
-rw-r--r--drivers/message/fusion/mptbase.c4
-rw-r--r--drivers/message/i2o/i2o_proc.c38
-rw-r--r--drivers/net/bonding/bond_procfs.c4
-rw-r--r--drivers/net/irda/vlsi_ir.c2
-rw-r--r--drivers/net/wireless/airo.c33
-rw-r--r--drivers/net/wireless/ray_cs.c2
-rw-r--r--drivers/parisc/led.c4
-rw-r--r--drivers/pci/proc.c20
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c4
-rw-r--r--drivers/platform/x86/toshiba_acpi.c18
-rw-r--r--drivers/pnp/isapnp/proc.c4
-rw-r--r--drivers/pnp/pnpbios/proc.c4
-rw-r--r--drivers/rtc/rtc-proc.c2
-rw-r--r--drivers/scsi/scsi_proc.c4
-rw-r--r--drivers/staging/ccg/rndis.c4
-rw-r--r--drivers/staging/dgrp/dgrp_dpa_ops.c9
-rw-r--r--drivers/staging/dgrp/dgrp_mon_ops.c9
-rw-r--r--drivers/staging/dgrp/dgrp_net_ops.c9
-rw-r--r--drivers/staging/dgrp/dgrp_ports_ops.c2
-rw-r--r--drivers/staging/silicom/bpctl_mod.c38
-rw-r--r--drivers/tty/serial/serial_core.c2
-rw-r--r--drivers/usb/gadget/at91_udc.c2
-rw-r--r--drivers/usb/gadget/lpc32xx_udc.c2
-rw-r--r--drivers/usb/gadget/rndis.c4
-rw-r--r--drivers/usb/host/isp1362-hcd.c2
-rw-r--r--drivers/usb/host/sl811-hcd.c2
-rw-r--r--drivers/video/bfin_adv7393fb.c2
-rw-r--r--drivers/zorro/proc.c4
-rw-r--r--fs/afs/proc.c8
-rw-r--r--fs/ext4/mballoc.c2
-rw-r--r--fs/ext4/super.c2
-rw-r--r--fs/jbd2/journal.c2
-rw-r--r--fs/proc/generic.c2
-rw-r--r--fs/proc/proc_devtree.c2
-rw-r--r--include/linux/proc_fs.h5
-rw-r--r--ipc/util.c2
-rw-r--r--kernel/irq/proc.c14
-rw-r--r--net/8021q/vlanproc.c2
-rw-r--r--net/atm/proc.c2
-rw-r--r--net/bluetooth/af_bluetooth.c2
-rw-r--r--net/bluetooth/cmtp/capi.c2
-rw-r--r--net/can/bcm.c2
-rw-r--r--net/can/proc.c2
-rw-r--r--net/core/neighbour.c2
-rw-r--r--net/core/pktgen.c6
-rw-r--r--net/ipv4/netfilter/ipt_CLUSTERIP.c6
-rw-r--r--net/ipv4/tcp_ipv4.c2
-rw-r--r--net/ipv4/udp.c2
-rw-r--r--net/ipv6/proc.c2
-rw-r--r--net/netfilter/x_tables.c6
-rw-r--r--net/netfilter/xt_hashlimit.c2
-rw-r--r--net/netfilter/xt_recent.c6
-rw-r--r--net/sunrpc/cache.c24
-rw-r--r--net/sunrpc/stats.c2
-rw-r--r--sound/core/info.c4
95 files changed, 243 insertions, 302 deletions
diff --git a/arch/alpha/kernel/srm_env.c b/arch/alpha/kernel/srm_env.c
index e64559f0a82d..ef8769b6c98b 100644
--- a/arch/alpha/kernel/srm_env.c
+++ b/arch/alpha/kernel/srm_env.c
@@ -104,14 +104,14 @@ static int srm_env_proc_show(struct seq_file *m, void *v)
104 104
105static int srm_env_proc_open(struct inode *inode, struct file *file) 105static int srm_env_proc_open(struct inode *inode, struct file *file)
106{ 106{
107 return single_open(file, srm_env_proc_show, PDE(inode)->data); 107 return single_open(file, srm_env_proc_show, PDE_DATA(inode));
108} 108}
109 109
110static ssize_t srm_env_proc_write(struct file *file, const char __user *buffer, 110static ssize_t srm_env_proc_write(struct file *file, const char __user *buffer,
111 size_t count, loff_t *pos) 111 size_t count, loff_t *pos)
112{ 112{
113 int res; 113 int res;
114 srm_env_t *entry = PDE(file_inode(file))->data; 114 srm_env_t *entry = PDE_DATA(file_inode(file));
115 char *buf = (char *) __get_free_page(GFP_USER); 115 char *buf = (char *) __get_free_page(GFP_USER);
116 unsigned long ret1, ret2; 116 unsigned long ret1, ret2;
117 117
diff --git a/arch/arm/kernel/atags_proc.c b/arch/arm/kernel/atags_proc.c
index 8c00f75bf1ab..c7ff8073416f 100644
--- a/arch/arm/kernel/atags_proc.c
+++ b/arch/arm/kernel/atags_proc.c
@@ -12,7 +12,7 @@ struct buffer {
12static ssize_t atags_read(struct file *file, char __user *buf, 12static ssize_t atags_read(struct file *file, char __user *buf,
13 size_t count, loff_t *ppos) 13 size_t count, loff_t *ppos)
14{ 14{
15 struct buffer *b = PDE(file_inode(file))->data; 15 struct buffer *b = PDE_DATA(file_inode(file));
16 return simple_read_from_buffer(buf, count, ppos, b->data, b->size); 16 return simple_read_from_buffer(buf, count, ppos, b->data, b->size);
17} 17}
18 18
diff --git a/arch/blackfin/kernel/cplbinfo.c b/arch/blackfin/kernel/cplbinfo.c
index e1d0b24c6070..404045dcc5e4 100644
--- a/arch/blackfin/kernel/cplbinfo.c
+++ b/arch/blackfin/kernel/cplbinfo.c
@@ -116,14 +116,12 @@ static const struct seq_operations cplbinfo_sops = {
116 116
117static int cplbinfo_open(struct inode *inode, struct file *file) 117static int cplbinfo_open(struct inode *inode, struct file *file)
118{ 118{
119 struct proc_dir_entry *pde = PDE(file_inode(file));
120 char cplb_type; 119 char cplb_type;
121 unsigned int cpu; 120 unsigned int cpu = (unsigned long)PDE_DATA(file_inode(file));
122 int ret; 121 int ret;
123 struct seq_file *m; 122 struct seq_file *m;
124 struct cplbinfo_data *cdata; 123 struct cplbinfo_data *cdata;
125 124
126 cpu = (unsigned int)pde->data;
127 cplb_type = cpu & CPLBINFO_DCPLB_FLAG ? 'D' : 'I'; 125 cplb_type = cpu & CPLBINFO_DCPLB_FLAG ? 'D' : 'I';
128 cpu &= ~CPLBINFO_DCPLB_FLAG; 126 cpu &= ~CPLBINFO_DCPLB_FLAG;
129 127
diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c
index aa527d7e91f2..a97d75b9c5ec 100644
--- a/arch/ia64/kernel/salinfo.c
+++ b/arch/ia64/kernel/salinfo.c
@@ -301,9 +301,7 @@ salinfo_event_open(struct inode *inode, struct file *file)
301static ssize_t 301static ssize_t
302salinfo_event_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) 302salinfo_event_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos)
303{ 303{
304 struct inode *inode = file_inode(file); 304 struct salinfo_data *data = PDE_DATA(file_inode(file));
305 struct proc_dir_entry *entry = PDE(inode);
306 struct salinfo_data *data = entry->data;
307 char cmd[32]; 305 char cmd[32];
308 size_t size; 306 size_t size;
309 int i, n, cpu = -1; 307 int i, n, cpu = -1;
@@ -360,8 +358,7 @@ static const struct file_operations salinfo_event_fops = {
360static int 358static int
361salinfo_log_open(struct inode *inode, struct file *file) 359salinfo_log_open(struct inode *inode, struct file *file)
362{ 360{
363 struct proc_dir_entry *entry = PDE(inode); 361 struct salinfo_data *data = PDE_DATA(inode);
364 struct salinfo_data *data = entry->data;
365 362
366 if (!capable(CAP_SYS_ADMIN)) 363 if (!capable(CAP_SYS_ADMIN))
367 return -EPERM; 364 return -EPERM;
@@ -386,8 +383,7 @@ salinfo_log_open(struct inode *inode, struct file *file)
386static int 383static int
387salinfo_log_release(struct inode *inode, struct file *file) 384salinfo_log_release(struct inode *inode, struct file *file)
388{ 385{
389 struct proc_dir_entry *entry = PDE(inode); 386 struct salinfo_data *data = PDE_DATA(inode);
390 struct salinfo_data *data = entry->data;
391 387
392 if (data->state == STATE_NO_DATA) { 388 if (data->state == STATE_NO_DATA) {
393 vfree(data->log_buffer); 389 vfree(data->log_buffer);
@@ -463,9 +459,7 @@ retry:
463static ssize_t 459static ssize_t
464salinfo_log_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) 460salinfo_log_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos)
465{ 461{
466 struct inode *inode = file_inode(file); 462 struct salinfo_data *data = PDE_DATA(file_inode(file));
467 struct proc_dir_entry *entry = PDE(inode);
468 struct salinfo_data *data = entry->data;
469 u8 *buf; 463 u8 *buf;
470 u64 bufsize; 464 u64 bufsize;
471 465
@@ -524,9 +518,7 @@ salinfo_log_clear(struct salinfo_data *data, int cpu)
524static ssize_t 518static ssize_t
525salinfo_log_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) 519salinfo_log_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos)
526{ 520{
527 struct inode *inode = file_inode(file); 521 struct salinfo_data *data = PDE_DATA(file_inode(file));
528 struct proc_dir_entry *entry = PDE(inode);
529 struct salinfo_data *data = entry->data;
530 char cmd[32]; 522 char cmd[32];
531 size_t size; 523 size_t size;
532 u32 offset; 524 u32 offset;
diff --git a/arch/mips/lasat/picvue_proc.c b/arch/mips/lasat/picvue_proc.c
index c592bc8b8c99..638c5db122c9 100644
--- a/arch/mips/lasat/picvue_proc.c
+++ b/arch/mips/lasat/picvue_proc.c
@@ -58,13 +58,13 @@ static int pvc_line_proc_show(struct seq_file *m, void *v)
58 58
59static int pvc_line_proc_open(struct inode *inode, struct file *file) 59static int pvc_line_proc_open(struct inode *inode, struct file *file)
60{ 60{
61 return single_open(file, pvc_line_proc_show, PDE(inode)->data); 61 return single_open(file, pvc_line_proc_show, PDE_DATA(inode));
62} 62}
63 63
64static ssize_t pvc_line_proc_write(struct file *file, const char __user *buf, 64static ssize_t pvc_line_proc_write(struct file *file, const char __user *buf,
65 size_t count, loff_t *pos) 65 size_t count, loff_t *pos)
66{ 66{
67 int lineno = *(int *)PDE(file_inode(file))->data; 67 int lineno = *(int *)PDE_DATA(file_inode(file));
68 char kbuf[PVC_LINELEN]; 68 char kbuf[PVC_LINELEN];
69 size_t len; 69 size_t len;
70 70
diff --git a/arch/powerpc/kernel/proc_powerpc.c b/arch/powerpc/kernel/proc_powerpc.c
index f19d0bdc3241..41d8ee9c82f1 100644
--- a/arch/powerpc/kernel/proc_powerpc.c
+++ b/arch/powerpc/kernel/proc_powerpc.c
@@ -32,8 +32,6 @@
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_inode(file));
36
37 switch(whence) { 35 switch(whence) {
38 case 0: 36 case 0:
39 new = off; 37 new = off;
@@ -42,12 +40,12 @@ static loff_t page_map_seek( struct file *file, loff_t off, int whence)
42 new = file->f_pos + off; 40 new = file->f_pos + off;
43 break; 41 break;
44 case 2: 42 case 2:
45 new = dp->size + off; 43 new = PAGE_SIZE + off;
46 break; 44 break;
47 default: 45 default:
48 return -EINVAL; 46 return -EINVAL;
49 } 47 }
50 if ( new < 0 || new > dp->size ) 48 if ( new < 0 || new > PAGE_SIZE )
51 return -EINVAL; 49 return -EINVAL;
52 return (file->f_pos = new); 50 return (file->f_pos = new);
53} 51}
@@ -55,19 +53,18 @@ 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, 53static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes,
56 loff_t *ppos) 54 loff_t *ppos)
57{ 55{
58 struct proc_dir_entry *dp = PDE(file_inode(file)); 56 return simple_read_from_buffer(buf, nbytes, ppos,
59 return simple_read_from_buffer(buf, nbytes, ppos, dp->data, dp->size); 57 PDE_DATA(file_inode(file)), PAGE_SIZE);
60} 58}
61 59
62static int page_map_mmap( struct file *file, struct vm_area_struct *vma ) 60static int page_map_mmap( struct file *file, struct vm_area_struct *vma )
63{ 61{
64 struct proc_dir_entry *dp = PDE(file_inode(file)); 62 if ((vma->vm_end - vma->vm_start) > PAGE_SIZE)
65
66 if ((vma->vm_end - vma->vm_start) > dp->size)
67 return -EINVAL; 63 return -EINVAL;
68 64
69 remap_pfn_range(vma, vma->vm_start, __pa(dp->data) >> PAGE_SHIFT, 65 remap_pfn_range(vma, vma->vm_start,
70 dp->size, vma->vm_page_prot); 66 __pa(PDE_DATA(file_inode(file))) >> PAGE_SHIFT,
67 PAGE_SIZE, vma->vm_page_prot);
71 return 0; 68 return 0;
72} 69}
73 70
diff --git a/arch/powerpc/platforms/pseries/scanlog.c b/arch/powerpc/platforms/pseries/scanlog.c
index 47f3cda2a68b..cc220d2061b2 100644
--- a/arch/powerpc/platforms/pseries/scanlog.c
+++ b/arch/powerpc/platforms/pseries/scanlog.c
@@ -46,8 +46,7 @@ static struct proc_dir_entry *proc_ppc64_scan_log_dump; /* The proc file */
46static ssize_t scanlog_read(struct file *file, char __user *buf, 46static ssize_t scanlog_read(struct file *file, char __user *buf,
47 size_t count, loff_t *ppos) 47 size_t count, loff_t *ppos)
48{ 48{
49 struct proc_dir_entry *dp = PDE(file_inode(file)); 49 unsigned int *data = PDE_DATA(file_inode(file));
50 unsigned int *data = (unsigned int *)dp->data;
51 int status; 50 int status;
52 unsigned long len, off; 51 unsigned long len, off;
53 unsigned int wait_time; 52 unsigned int wait_time;
@@ -135,8 +134,7 @@ static ssize_t scanlog_write(struct file * file, const char __user * buf,
135 134
136static int scanlog_open(struct inode * inode, struct file * file) 135static int scanlog_open(struct inode * inode, struct file * file)
137{ 136{
138 struct proc_dir_entry *dp = PDE(inode); 137 unsigned int *data = PDE_DATA(file_inode(file));
139 unsigned int *data = (unsigned int *)dp->data;
140 138
141 if (data[0] != 0) { 139 if (data[0] != 0) {
142 /* This imperfect test stops a second copy of the 140 /* This imperfect test stops a second copy of the
@@ -152,8 +150,7 @@ static int scanlog_open(struct inode * inode, struct file * file)
152 150
153static int scanlog_release(struct inode * inode, struct file * file) 151static int scanlog_release(struct inode * inode, struct file * file)
154{ 152{
155 struct proc_dir_entry *dp = PDE(inode); 153 unsigned int *data = PDE_DATA(file_inode(file));
156 unsigned int *data = (unsigned int *)dp->data;
157 154
158 data[0] = 0; 155 data[0] = 0;
159 156
diff --git a/arch/sh/mm/alignment.c b/arch/sh/mm/alignment.c
index aea14855e656..ec2b25302427 100644
--- a/arch/sh/mm/alignment.c
+++ b/arch/sh/mm/alignment.c
@@ -140,7 +140,7 @@ static int alignment_proc_open(struct inode *inode, struct file *file)
140static ssize_t alignment_proc_write(struct file *file, 140static ssize_t alignment_proc_write(struct file *file,
141 const char __user *buffer, size_t count, loff_t *pos) 141 const char __user *buffer, size_t count, loff_t *pos)
142{ 142{
143 int *data = PDE(file_inode(file))->data; 143 int *data = PDE_DATA(file_inode(file));
144 char mode; 144 char mode;
145 145
146 if (count > 0) { 146 if (count > 0) {
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
index 0f094db918c7..2096468de9b2 100644
--- a/arch/sparc/kernel/ioport.c
+++ b/arch/sparc/kernel/ioport.c
@@ -693,7 +693,7 @@ static int sparc_io_proc_show(struct seq_file *m, void *v)
693 693
694static int sparc_io_proc_open(struct inode *inode, struct file *file) 694static int sparc_io_proc_open(struct inode *inode, struct file *file)
695{ 695{
696 return single_open(file, sparc_io_proc_show, PDE(inode)->data); 696 return single_open(file, sparc_io_proc_show, PDE_DATA(inode));
697} 697}
698 698
699static const struct file_operations sparc_io_proc_fops = { 699static const struct file_operations sparc_io_proc_fops = {
diff --git a/arch/tile/kernel/hardwall.c b/arch/tile/kernel/hardwall.c
index 20273ee37deb..38ac189d9575 100644
--- a/arch/tile/kernel/hardwall.c
+++ b/arch/tile/kernel/hardwall.c
@@ -914,7 +914,7 @@ static int hardwall_proc_show(struct seq_file *sf, void *v)
914static int hardwall_proc_open(struct inode *inode, 914static int hardwall_proc_open(struct inode *inode,
915 struct file *file) 915 struct file *file)
916{ 916{
917 return single_open(file, hardwall_proc_show, PDE(inode)->data); 917 return single_open(file, hardwall_proc_show, PDE_DATA(inode));
918} 918}
919 919
920static const struct file_operations hardwall_proc_fops = { 920static const struct file_operations hardwall_proc_fops = {
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)
217static ssize_t proc_read_simdisk(struct file *file, char __user *buf, 217static 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)
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
index 6d5bf649196d..00d2efd674df 100644
--- a/drivers/acpi/ac.c
+++ b/drivers/acpi/ac.c
@@ -194,7 +194,7 @@ static int acpi_ac_seq_show(struct seq_file *seq, void *offset)
194 194
195static int acpi_ac_open_fs(struct inode *inode, struct file *file) 195static int acpi_ac_open_fs(struct inode *inode, struct file *file)
196{ 196{
197 return single_open(file, acpi_ac_seq_show, PDE(inode)->data); 197 return single_open(file, acpi_ac_seq_show, PDE_DATA(inode));
198} 198}
199 199
200static int acpi_ac_add_fs(struct acpi_device *device) 200static int acpi_ac_add_fs(struct acpi_device *device)
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index c5cd5b5513e6..169ced7e540d 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -929,7 +929,7 @@ static int acpi_battery_read_##_name(struct seq_file *seq, void *offset) \
929} \ 929} \
930static int acpi_battery_##_name##_open_fs(struct inode *inode, struct file *file) \ 930static int acpi_battery_##_name##_open_fs(struct inode *inode, struct file *file) \
931{ \ 931{ \
932 return single_open(file, acpi_battery_read_##_name, PDE(inode)->data); \ 932 return single_open(file, acpi_battery_read_##_name, PDE_DATA(inode)); \
933} 933}
934 934
935DECLARE_FILE_FUNCTIONS(info); 935DECLARE_FILE_FUNCTIONS(info);
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 86c7d5445c38..5d57cd513f4f 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -128,7 +128,7 @@ static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
128 128
129static int acpi_button_state_open_fs(struct inode *inode, struct file *file) 129static int acpi_button_state_open_fs(struct inode *inode, struct file *file)
130{ 130{
131 return single_open(file, acpi_button_state_seq_show, PDE(inode)->data); 131 return single_open(file, acpi_button_state_seq_show, PDE_DATA(inode));
132} 132}
133 133
134static const struct file_operations acpi_button_state_fops = { 134static const struct file_operations acpi_button_state_fops = {
diff --git a/drivers/acpi/proc.c b/drivers/acpi/proc.c
index 52ce76725c20..aa1227a7e3f2 100644
--- a/drivers/acpi/proc.c
+++ b/drivers/acpi/proc.c
@@ -120,7 +120,7 @@ static int acpi_system_alarm_seq_show(struct seq_file *seq, void *offset)
120 120
121static int acpi_system_alarm_open_fs(struct inode *inode, struct file *file) 121static int acpi_system_alarm_open_fs(struct inode *inode, struct file *file)
122{ 122{
123 return single_open(file, acpi_system_alarm_seq_show, PDE(inode)->data); 123 return single_open(file, acpi_system_alarm_seq_show, PDE_DATA(inode));
124} 124}
125 125
126static int get_date_field(char **p, u32 * value) 126static int get_date_field(char **p, u32 * value)
@@ -397,7 +397,7 @@ static int
397acpi_system_wakeup_device_open_fs(struct inode *inode, struct file *file) 397acpi_system_wakeup_device_open_fs(struct inode *inode, struct file *file)
398{ 398{
399 return single_open(file, acpi_system_wakeup_device_seq_show, 399 return single_open(file, acpi_system_wakeup_device_seq_show,
400 PDE(inode)->data); 400 PDE_DATA(inode));
401} 401}
402 402
403static const struct file_operations acpi_system_wakeup_device_fops = { 403static const struct file_operations acpi_system_wakeup_device_fops = {
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
index e523245643ac..a296e08d76b6 100644
--- a/drivers/acpi/sbs.c
+++ b/drivers/acpi/sbs.c
@@ -584,7 +584,7 @@ static int acpi_battery_read_info(struct seq_file *seq, void *offset)
584 584
585static int acpi_battery_info_open_fs(struct inode *inode, struct file *file) 585static int acpi_battery_info_open_fs(struct inode *inode, struct file *file)
586{ 586{
587 return single_open(file, acpi_battery_read_info, PDE(inode)->data); 587 return single_open(file, acpi_battery_read_info, PDE_DATA(inode));
588} 588}
589 589
590static int acpi_battery_read_state(struct seq_file *seq, void *offset) 590static int acpi_battery_read_state(struct seq_file *seq, void *offset)
@@ -623,7 +623,7 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset)
623 623
624static int acpi_battery_state_open_fs(struct inode *inode, struct file *file) 624static int acpi_battery_state_open_fs(struct inode *inode, struct file *file)
625{ 625{
626 return single_open(file, acpi_battery_read_state, PDE(inode)->data); 626 return single_open(file, acpi_battery_read_state, PDE_DATA(inode));
627} 627}
628 628
629static int acpi_battery_read_alarm(struct seq_file *seq, void *offset) 629static int acpi_battery_read_alarm(struct seq_file *seq, void *offset)
@@ -688,7 +688,7 @@ acpi_battery_write_alarm(struct file *file, const char __user * buffer,
688 688
689static int acpi_battery_alarm_open_fs(struct inode *inode, struct file *file) 689static int acpi_battery_alarm_open_fs(struct inode *inode, struct file *file)
690{ 690{
691 return single_open(file, acpi_battery_read_alarm, PDE(inode)->data); 691 return single_open(file, acpi_battery_read_alarm, PDE_DATA(inode));
692} 692}
693 693
694static const struct file_operations acpi_battery_info_fops = { 694static const struct file_operations acpi_battery_info_fops = {
@@ -736,7 +736,7 @@ static int acpi_ac_read_state(struct seq_file *seq, void *offset)
736 736
737static int acpi_ac_state_open_fs(struct inode *inode, struct file *file) 737static int acpi_ac_state_open_fs(struct inode *inode, struct file *file)
738{ 738{
739 return single_open(file, acpi_ac_read_state, PDE(inode)->data); 739 return single_open(file, acpi_ac_read_state, PDE_DATA(inode));
740} 740}
741 741
742static const struct file_operations acpi_ac_state_fops = { 742static const struct file_operations acpi_ac_state_fops = {
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c
index 5b5ee79ff236..eb3950113e42 100644
--- a/drivers/block/DAC960.c
+++ b/drivers/block/DAC960.c
@@ -6473,7 +6473,7 @@ static int dac960_initial_status_proc_show(struct seq_file *m, void *v)
6473 6473
6474static int dac960_initial_status_proc_open(struct inode *inode, struct file *file) 6474static int dac960_initial_status_proc_open(struct inode *inode, struct file *file)
6475{ 6475{
6476 return single_open(file, dac960_initial_status_proc_show, PDE(inode)->data); 6476 return single_open(file, dac960_initial_status_proc_show, PDE_DATA(inode));
6477} 6477}
6478 6478
6479static const struct file_operations dac960_initial_status_proc_fops = { 6479static const struct file_operations dac960_initial_status_proc_fops = {
@@ -6519,7 +6519,7 @@ static int dac960_current_status_proc_show(struct seq_file *m, void *v)
6519 6519
6520static int dac960_current_status_proc_open(struct inode *inode, struct file *file) 6520static int dac960_current_status_proc_open(struct inode *inode, struct file *file)
6521{ 6521{
6522 return single_open(file, dac960_current_status_proc_show, PDE(inode)->data); 6522 return single_open(file, dac960_current_status_proc_show, PDE_DATA(inode));
6523} 6523}
6524 6524
6525static const struct file_operations dac960_current_status_proc_fops = { 6525static const struct file_operations dac960_current_status_proc_fops = {
@@ -6540,14 +6540,14 @@ static int dac960_user_command_proc_show(struct seq_file *m, void *v)
6540 6540
6541static int dac960_user_command_proc_open(struct inode *inode, struct file *file) 6541static int dac960_user_command_proc_open(struct inode *inode, struct file *file)
6542{ 6542{
6543 return single_open(file, dac960_user_command_proc_show, PDE(inode)->data); 6543 return single_open(file, dac960_user_command_proc_show, PDE_DATA(inode));
6544} 6544}
6545 6545
6546static ssize_t dac960_user_command_proc_write(struct file *file, 6546static ssize_t dac960_user_command_proc_write(struct file *file,
6547 const char __user *Buffer, 6547 const char __user *Buffer,
6548 size_t Count, loff_t *pos) 6548 size_t Count, loff_t *pos)
6549{ 6549{
6550 DAC960_Controller_T *Controller = (DAC960_Controller_T *) PDE(file_inode(file))->data; 6550 DAC960_Controller_T *Controller = PDE_DATA(file_inode(file));
6551 unsigned char CommandBuffer[80]; 6551 unsigned char CommandBuffer[80];
6552 int Length; 6552 int Length;
6553 if (Count > sizeof(CommandBuffer)-1) return -EINVAL; 6553 if (Count > sizeof(CommandBuffer)-1) return -EINVAL;
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index ade58bc8f3c4..d150fe1248bf 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -493,7 +493,7 @@ static int cciss_seq_open(struct inode *inode, struct file *file)
493 struct seq_file *seq = file->private_data; 493 struct seq_file *seq = file->private_data;
494 494
495 if (!ret) 495 if (!ret)
496 seq->private = PDE(inode)->data; 496 seq->private = PDE_DATA(inode);
497 497
498 return ret; 498 return ret;
499} 499}
diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
index 3f087133a25a..3b9e8ebcb96b 100644
--- a/drivers/block/cpqarray.c
+++ b/drivers/block/cpqarray.c
@@ -296,7 +296,7 @@ static int ida_proc_show(struct seq_file *m, void *v)
296 296
297static int ida_proc_open(struct inode *inode, struct file *file) 297static int ida_proc_open(struct inode *inode, struct file *file)
298{ 298{
299 return single_open(file, ida_proc_show, PDE(inode)->data); 299 return single_open(file, ida_proc_show, PDE_DATA(inode));
300} 300}
301 301
302static const struct file_operations ida_proc_fops = { 302static const struct file_operations ida_proc_fops = {
diff --git a/drivers/block/drbd/drbd_proc.c b/drivers/block/drbd/drbd_proc.c
index 56672a61eb94..928adb815b09 100644
--- a/drivers/block/drbd/drbd_proc.c
+++ b/drivers/block/drbd/drbd_proc.c
@@ -314,7 +314,7 @@ static int drbd_seq_show(struct seq_file *seq, void *v)
314static int drbd_proc_open(struct inode *inode, struct file *file) 314static int drbd_proc_open(struct inode *inode, struct file *file)
315{ 315{
316 if (try_module_get(THIS_MODULE)) 316 if (try_module_get(THIS_MODULE))
317 return single_open(file, drbd_seq_show, PDE(inode)->data); 317 return single_open(file, drbd_seq_show, PDE_DATA(inode));
318 return -ENODEV; 318 return -ENODEV;
319} 319}
320 320
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 2e7de7a59bfc..e0588c6dd86f 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -2648,7 +2648,7 @@ static int pkt_seq_show(struct seq_file *m, void *p)
2648 2648
2649static int pkt_seq_open(struct inode *inode, struct file *file) 2649static int pkt_seq_open(struct inode *inode, struct file *file)
2650{ 2650{
2651 return single_open(file, pkt_seq_show, PDE(inode)->data); 2651 return single_open(file, pkt_seq_show, PDE_DATA(inode));
2652} 2652}
2653 2653
2654static const struct file_operations pkt_proc_fops = { 2654static const struct file_operations pkt_proc_fops = {
diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c
index 75e112d66006..06a2e53e5f37 100644
--- a/drivers/block/ps3vram.c
+++ b/drivers/block/ps3vram.c
@@ -525,7 +525,7 @@ static int ps3vram_proc_show(struct seq_file *m, void *v)
525 525
526static int ps3vram_proc_open(struct inode *inode, struct file *file) 526static int ps3vram_proc_open(struct inode *inode, struct file *file)
527{ 527{
528 return single_open(file, ps3vram_proc_show, PDE(inode)->data); 528 return single_open(file, ps3vram_proc_show, PDE_DATA(inode));
529} 529}
530 530
531static const struct file_operations ps3vram_proc_fops = { 531static const struct file_operations ps3vram_proc_fops = {
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index 053201b062a4..1420bbbe1a61 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -1917,7 +1917,7 @@ static int smi_ipmb_proc_show(struct seq_file *m, void *v)
1917 1917
1918static int smi_ipmb_proc_open(struct inode *inode, struct file *file) 1918static int smi_ipmb_proc_open(struct inode *inode, struct file *file)
1919{ 1919{
1920 return single_open(file, smi_ipmb_proc_show, PDE(inode)->data); 1920 return single_open(file, smi_ipmb_proc_show, PDE_DATA(inode));
1921} 1921}
1922 1922
1923static const struct file_operations smi_ipmb_proc_ops = { 1923static const struct file_operations smi_ipmb_proc_ops = {
@@ -1938,7 +1938,7 @@ static int smi_version_proc_show(struct seq_file *m, void *v)
1938 1938
1939static int smi_version_proc_open(struct inode *inode, struct file *file) 1939static int smi_version_proc_open(struct inode *inode, struct file *file)
1940{ 1940{
1941 return single_open(file, smi_version_proc_show, PDE(inode)->data); 1941 return single_open(file, smi_version_proc_show, PDE_DATA(inode));
1942} 1942}
1943 1943
1944static const struct file_operations smi_version_proc_ops = { 1944static const struct file_operations smi_version_proc_ops = {
@@ -2013,7 +2013,7 @@ static int smi_stats_proc_show(struct seq_file *m, void *v)
2013 2013
2014static int smi_stats_proc_open(struct inode *inode, struct file *file) 2014static int smi_stats_proc_open(struct inode *inode, struct file *file)
2015{ 2015{
2016 return single_open(file, smi_stats_proc_show, PDE(inode)->data); 2016 return single_open(file, smi_stats_proc_show, PDE_DATA(inode));
2017} 2017}
2018 2018
2019static const struct file_operations smi_stats_proc_ops = { 2019static const struct file_operations smi_stats_proc_ops = {
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 0ac9b45a585e..313538abe63c 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -2839,7 +2839,7 @@ static int smi_type_proc_show(struct seq_file *m, void *v)
2839 2839
2840static int smi_type_proc_open(struct inode *inode, struct file *file) 2840static int smi_type_proc_open(struct inode *inode, struct file *file)
2841{ 2841{
2842 return single_open(file, smi_type_proc_show, PDE(inode)->data); 2842 return single_open(file, smi_type_proc_show, PDE_DATA(inode));
2843} 2843}
2844 2844
2845static const struct file_operations smi_type_proc_ops = { 2845static const struct file_operations smi_type_proc_ops = {
@@ -2882,7 +2882,7 @@ static int smi_si_stats_proc_show(struct seq_file *m, void *v)
2882 2882
2883static int smi_si_stats_proc_open(struct inode *inode, struct file *file) 2883static int smi_si_stats_proc_open(struct inode *inode, struct file *file)
2884{ 2884{
2885 return single_open(file, smi_si_stats_proc_show, PDE(inode)->data); 2885 return single_open(file, smi_si_stats_proc_show, PDE_DATA(inode));
2886} 2886}
2887 2887
2888static const struct file_operations smi_si_stats_proc_ops = { 2888static const struct file_operations smi_si_stats_proc_ops = {
@@ -2910,7 +2910,7 @@ static int smi_params_proc_show(struct seq_file *m, void *v)
2910 2910
2911static int smi_params_proc_open(struct inode *inode, struct file *file) 2911static int smi_params_proc_open(struct inode *inode, struct file *file)
2912{ 2912{
2913 return single_open(file, smi_params_proc_show, PDE(inode)->data); 2913 return single_open(file, smi_params_proc_show, PDE_DATA(inode));
2914} 2914}
2915 2915
2916static const struct file_operations smi_params_proc_ops = { 2916static const struct file_operations smi_params_proc_ops = {
diff --git a/drivers/gpu/drm/drm_proc.c b/drivers/gpu/drm/drm_proc.c
index ff5456b7df72..e06431897f4e 100644
--- a/drivers/gpu/drm/drm_proc.c
+++ b/drivers/gpu/drm/drm_proc.c
@@ -63,7 +63,7 @@ static struct drm_info_list drm_proc_list[] = {
63 63
64static int drm_proc_open(struct inode *inode, struct file *file) 64static int drm_proc_open(struct inode *inode, struct file *file)
65{ 65{
66 struct drm_info_node* node = PDE(inode)->data; 66 struct drm_info_node* node = PDE_DATA(inode);
67 67
68 return single_open(file, node->info_ent->show, node); 68 return single_open(file, node->info_ent->show, node);
69} 69}
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 8126824daccb..b23113926388 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1408,7 +1408,7 @@ static int idecd_capacity_proc_show(struct seq_file *m, void *v)
1408 1408
1409static int idecd_capacity_proc_open(struct inode *inode, struct file *file) 1409static int idecd_capacity_proc_open(struct inode *inode, struct file *file)
1410{ 1410{
1411 return single_open(file, idecd_capacity_proc_show, PDE(inode)->data); 1411 return single_open(file, idecd_capacity_proc_show, PDE_DATA(inode));
1412} 1412}
1413 1413
1414static const struct file_operations idecd_capacity_proc_fops = { 1414static const struct file_operations idecd_capacity_proc_fops = {
diff --git a/drivers/ide/ide-disk_proc.c b/drivers/ide/ide-disk_proc.c
index 8b570a17bcd9..0d1fae6cba6d 100644
--- a/drivers/ide/ide-disk_proc.c
+++ b/drivers/ide/ide-disk_proc.c
@@ -53,7 +53,7 @@ static int idedisk_cache_proc_show(struct seq_file *m, void *v)
53 53
54static int idedisk_cache_proc_open(struct inode *inode, struct file *file) 54static int idedisk_cache_proc_open(struct inode *inode, struct file *file)
55{ 55{
56 return single_open(file, idedisk_cache_proc_show, PDE(inode)->data); 56 return single_open(file, idedisk_cache_proc_show, PDE_DATA(inode));
57} 57}
58 58
59static const struct file_operations idedisk_cache_proc_fops = { 59static const struct file_operations idedisk_cache_proc_fops = {
@@ -74,7 +74,7 @@ static int idedisk_capacity_proc_show(struct seq_file *m, void *v)
74 74
75static int idedisk_capacity_proc_open(struct inode *inode, struct file *file) 75static int idedisk_capacity_proc_open(struct inode *inode, struct file *file)
76{ 76{
77 return single_open(file, idedisk_capacity_proc_show, PDE(inode)->data); 77 return single_open(file, idedisk_capacity_proc_show, PDE_DATA(inode));
78} 78}
79 79
80static const struct file_operations idedisk_capacity_proc_fops = { 80static const struct file_operations idedisk_capacity_proc_fops = {
@@ -115,7 +115,7 @@ static int idedisk_sv_proc_show(struct seq_file *m, void *v)
115 115
116static int idedisk_sv_proc_open(struct inode *inode, struct file *file) 116static int idedisk_sv_proc_open(struct inode *inode, struct file *file)
117{ 117{
118 return single_open(file, idedisk_sv_proc_show, PDE(inode)->data); 118 return single_open(file, idedisk_sv_proc_show, PDE_DATA(inode));
119} 119}
120 120
121static const struct file_operations idedisk_sv_proc_fops = { 121static const struct file_operations idedisk_sv_proc_fops = {
@@ -133,7 +133,7 @@ static int idedisk_st_proc_show(struct seq_file *m, void *v)
133 133
134static int idedisk_st_proc_open(struct inode *inode, struct file *file) 134static int idedisk_st_proc_open(struct inode *inode, struct file *file)
135{ 135{
136 return single_open(file, idedisk_st_proc_show, PDE(inode)->data); 136 return single_open(file, idedisk_st_proc_show, PDE_DATA(inode));
137} 137}
138 138
139static const struct file_operations idedisk_st_proc_fops = { 139static const struct file_operations idedisk_st_proc_fops = {
diff --git a/drivers/ide/ide-floppy_proc.c b/drivers/ide/ide-floppy_proc.c
index 1600720f3e86..e7a25ea757df 100644
--- a/drivers/ide/ide-floppy_proc.c
+++ b/drivers/ide/ide-floppy_proc.c
@@ -15,7 +15,7 @@ static int idefloppy_capacity_proc_show(struct seq_file *m, void *v)
15 15
16static int idefloppy_capacity_proc_open(struct inode *inode, struct file *file) 16static int idefloppy_capacity_proc_open(struct inode *inode, struct file *file)
17{ 17{
18 return single_open(file, idefloppy_capacity_proc_show, PDE(inode)->data); 18 return single_open(file, idefloppy_capacity_proc_show, PDE_DATA(inode));
19} 19}
20 20
21static const struct file_operations idefloppy_capacity_proc_fops = { 21static const struct file_operations idefloppy_capacity_proc_fops = {
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
index 2abcc4790f12..97c070077774 100644
--- a/drivers/ide/ide-proc.c
+++ b/drivers/ide/ide-proc.c
@@ -58,7 +58,7 @@ static int ide_imodel_proc_show(struct seq_file *m, void *v)
58 58
59static int ide_imodel_proc_open(struct inode *inode, struct file *file) 59static int ide_imodel_proc_open(struct inode *inode, struct file *file)
60{ 60{
61 return single_open(file, ide_imodel_proc_show, PDE(inode)->data); 61 return single_open(file, ide_imodel_proc_show, PDE_DATA(inode));
62} 62}
63 63
64static const struct file_operations ide_imodel_proc_fops = { 64static const struct file_operations ide_imodel_proc_fops = {
@@ -82,7 +82,7 @@ static int ide_mate_proc_show(struct seq_file *m, void *v)
82 82
83static int ide_mate_proc_open(struct inode *inode, struct file *file) 83static int ide_mate_proc_open(struct inode *inode, struct file *file)
84{ 84{
85 return single_open(file, ide_mate_proc_show, PDE(inode)->data); 85 return single_open(file, ide_mate_proc_show, PDE_DATA(inode));
86} 86}
87 87
88static const struct file_operations ide_mate_proc_fops = { 88static const struct file_operations ide_mate_proc_fops = {
@@ -103,7 +103,7 @@ static int ide_channel_proc_show(struct seq_file *m, void *v)
103 103
104static int ide_channel_proc_open(struct inode *inode, struct file *file) 104static int ide_channel_proc_open(struct inode *inode, struct file *file)
105{ 105{
106 return single_open(file, ide_channel_proc_show, PDE(inode)->data); 106 return single_open(file, ide_channel_proc_show, PDE_DATA(inode));
107} 107}
108 108
109static const struct file_operations ide_channel_proc_fops = { 109static const struct file_operations ide_channel_proc_fops = {
@@ -143,7 +143,7 @@ static int ide_identify_proc_show(struct seq_file *m, void *v)
143 143
144static int ide_identify_proc_open(struct inode *inode, struct file *file) 144static int ide_identify_proc_open(struct inode *inode, struct file *file)
145{ 145{
146 return single_open(file, ide_identify_proc_show, PDE(inode)->data); 146 return single_open(file, ide_identify_proc_show, PDE_DATA(inode));
147} 147}
148 148
149static const struct file_operations ide_identify_proc_fops = { 149static const struct file_operations ide_identify_proc_fops = {
@@ -325,7 +325,7 @@ static int ide_settings_proc_show(struct seq_file *m, void *v)
325 325
326static int ide_settings_proc_open(struct inode *inode, struct file *file) 326static int ide_settings_proc_open(struct inode *inode, struct file *file)
327{ 327{
328 return single_open(file, ide_settings_proc_show, PDE(inode)->data); 328 return single_open(file, ide_settings_proc_show, PDE_DATA(inode));
329} 329}
330 330
331#define MAX_LEN 30 331#define MAX_LEN 30
@@ -333,7 +333,7 @@ static int ide_settings_proc_open(struct inode *inode, struct file *file)
333static ssize_t ide_settings_proc_write(struct file *file, const char __user *buffer, 333static ssize_t ide_settings_proc_write(struct file *file, const char __user *buffer,
334 size_t count, loff_t *pos) 334 size_t count, loff_t *pos)
335{ 335{
336 ide_drive_t *drive = (ide_drive_t *) PDE(file_inode(file))->data; 336 ide_drive_t *drive = PDE_DATA(file_inode(file));
337 char name[MAX_LEN + 1]; 337 char name[MAX_LEN + 1];
338 int for_real = 0, mul_factor, div_factor; 338 int for_real = 0, mul_factor, div_factor;
339 unsigned long n; 339 unsigned long n;
@@ -474,7 +474,7 @@ static int ide_geometry_proc_show(struct seq_file *m, void *v)
474 474
475static int ide_geometry_proc_open(struct inode *inode, struct file *file) 475static int ide_geometry_proc_open(struct inode *inode, struct file *file)
476{ 476{
477 return single_open(file, ide_geometry_proc_show, PDE(inode)->data); 477 return single_open(file, ide_geometry_proc_show, PDE_DATA(inode));
478} 478}
479 479
480const struct file_operations ide_geometry_proc_fops = { 480const struct file_operations ide_geometry_proc_fops = {
@@ -497,7 +497,7 @@ static int ide_dmodel_proc_show(struct seq_file *seq, void *v)
497 497
498static int ide_dmodel_proc_open(struct inode *inode, struct file *file) 498static int ide_dmodel_proc_open(struct inode *inode, struct file *file)
499{ 499{
500 return single_open(file, ide_dmodel_proc_show, PDE(inode)->data); 500 return single_open(file, ide_dmodel_proc_show, PDE_DATA(inode));
501} 501}
502 502
503static const struct file_operations ide_dmodel_proc_fops = { 503static const struct file_operations ide_dmodel_proc_fops = {
@@ -525,7 +525,7 @@ static int ide_driver_proc_show(struct seq_file *m, void *v)
525 525
526static int ide_driver_proc_open(struct inode *inode, struct file *file) 526static int ide_driver_proc_open(struct inode *inode, struct file *file)
527{ 527{
528 return single_open(file, ide_driver_proc_show, PDE(inode)->data); 528 return single_open(file, ide_driver_proc_show, PDE_DATA(inode));
529} 529}
530 530
531static int ide_replace_subdriver(ide_drive_t *drive, const char *driver) 531static int ide_replace_subdriver(ide_drive_t *drive, const char *driver)
@@ -558,7 +558,7 @@ static int ide_replace_subdriver(ide_drive_t *drive, const char *driver)
558static ssize_t ide_driver_proc_write(struct file *file, const char __user *buffer, 558static ssize_t ide_driver_proc_write(struct file *file, const char __user *buffer,
559 size_t count, loff_t *pos) 559 size_t count, loff_t *pos)
560{ 560{
561 ide_drive_t *drive = (ide_drive_t *) PDE(file_inode(file))->data; 561 ide_drive_t *drive = PDE_DATA(file_inode(file));
562 char name[32]; 562 char name[32];
563 563
564 if (!capable(CAP_SYS_ADMIN)) 564 if (!capable(CAP_SYS_ADMIN))
@@ -601,7 +601,7 @@ static int ide_media_proc_show(struct seq_file *m, void *v)
601 601
602static int ide_media_proc_open(struct inode *inode, struct file *file) 602static int ide_media_proc_open(struct inode *inode, struct file *file)
603{ 603{
604 return single_open(file, ide_media_proc_show, PDE(inode)->data); 604 return single_open(file, ide_media_proc_show, PDE_DATA(inode));
605} 605}
606 606
607static const struct file_operations ide_media_proc_fops = { 607static const struct file_operations ide_media_proc_fops = {
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index ce8237d36159..89f859591bbb 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -1847,7 +1847,7 @@ static int idetape_name_proc_show(struct seq_file *m, void *v)
1847 1847
1848static int idetape_name_proc_open(struct inode *inode, struct file *file) 1848static int idetape_name_proc_open(struct inode *inode, struct file *file)
1849{ 1849{
1850 return single_open(file, idetape_name_proc_show, PDE(inode)->data); 1850 return single_open(file, idetape_name_proc_show, PDE_DATA(inode));
1851} 1851}
1852 1852
1853static const struct file_operations idetape_name_proc_fops = { 1853static const struct file_operations idetape_name_proc_fops = {
diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c
index 03a0a01a4054..3286903a95d2 100644
--- a/drivers/isdn/gigaset/capi.c
+++ b/drivers/isdn/gigaset/capi.c
@@ -2334,7 +2334,7 @@ static int gigaset_proc_show(struct seq_file *m, void *v)
2334 2334
2335static int gigaset_proc_open(struct inode *inode, struct file *file) 2335static int gigaset_proc_open(struct inode *inode, struct file *file)
2336{ 2336{
2337 return single_open(file, gigaset_proc_show, PDE(inode)->data); 2337 return single_open(file, gigaset_proc_show, PDE_DATA(inode));
2338} 2338}
2339 2339
2340static const struct file_operations gigaset_proc_fops = { 2340static const struct file_operations gigaset_proc_fops = {
diff --git a/drivers/isdn/hardware/avm/b1.c b/drivers/isdn/hardware/avm/b1.c
index 821f7ac33b37..4d9b195547c5 100644
--- a/drivers/isdn/hardware/avm/b1.c
+++ b/drivers/isdn/hardware/avm/b1.c
@@ -702,7 +702,7 @@ static int b1ctl_proc_show(struct seq_file *m, void *v)
702 702
703static int b1ctl_proc_open(struct inode *inode, struct file *file) 703static int b1ctl_proc_open(struct inode *inode, struct file *file)
704{ 704{
705 return single_open(file, b1ctl_proc_show, PDE(inode)->data); 705 return single_open(file, b1ctl_proc_show, PDE_DATA(inode));
706} 706}
707 707
708const struct file_operations b1ctl_proc_fops = { 708const struct file_operations b1ctl_proc_fops = {
diff --git a/drivers/isdn/hardware/avm/b1dma.c b/drivers/isdn/hardware/avm/b1dma.c
index 0896aa86fc08..19b113faeb7b 100644
--- a/drivers/isdn/hardware/avm/b1dma.c
+++ b/drivers/isdn/hardware/avm/b1dma.c
@@ -944,7 +944,7 @@ static int b1dmactl_proc_show(struct seq_file *m, void *v)
944 944
945static int b1dmactl_proc_open(struct inode *inode, struct file *file) 945static int b1dmactl_proc_open(struct inode *inode, struct file *file)
946{ 946{
947 return single_open(file, b1dmactl_proc_show, PDE(inode)->data); 947 return single_open(file, b1dmactl_proc_show, PDE_DATA(inode));
948} 948}
949 949
950const struct file_operations b1dmactl_proc_fops = { 950const struct file_operations b1dmactl_proc_fops = {
diff --git a/drivers/isdn/hardware/avm/c4.c b/drivers/isdn/hardware/avm/c4.c
index 1d7fc44e3eef..5d00d72fe482 100644
--- a/drivers/isdn/hardware/avm/c4.c
+++ b/drivers/isdn/hardware/avm/c4.c
@@ -1129,7 +1129,7 @@ static int c4_proc_show(struct seq_file *m, void *v)
1129 1129
1130static int c4_proc_open(struct inode *inode, struct file *file) 1130static int c4_proc_open(struct inode *inode, struct file *file)
1131{ 1131{
1132 return single_open(file, c4_proc_show, PDE(inode)->data); 1132 return single_open(file, c4_proc_show, PDE_DATA(inode));
1133} 1133}
1134 1134
1135static const struct file_operations c4_proc_fops = { 1135static const struct file_operations c4_proc_fops = {
diff --git a/drivers/isdn/hardware/eicon/divasproc.c b/drivers/isdn/hardware/eicon/divasproc.c
index 3a4165c61196..56ce98a4e248 100644
--- a/drivers/isdn/hardware/eicon/divasproc.c
+++ b/drivers/isdn/hardware/eicon/divasproc.c
@@ -145,7 +145,7 @@ void remove_divas_proc(void)
145static ssize_t grp_opt_proc_write(struct file *file, const char __user *buffer, 145static ssize_t grp_opt_proc_write(struct file *file, const char __user *buffer,
146 size_t count, loff_t *pos) 146 size_t count, loff_t *pos)
147{ 147{
148 diva_os_xdi_adapter_t *a = PDE(file_inode(file))->data; 148 diva_os_xdi_adapter_t *a = PDE_DATA(file_inode(file));
149 PISDN_ADAPTER IoAdapter = IoAdapters[a->controller - 1]; 149 PISDN_ADAPTER IoAdapter = IoAdapters[a->controller - 1];
150 150
151 if ((count == 1) || (count == 2)) { 151 if ((count == 1) || (count == 2)) {
@@ -172,7 +172,7 @@ static ssize_t grp_opt_proc_write(struct file *file, const char __user *buffer,
172static ssize_t d_l1_down_proc_write(struct file *file, const char __user *buffer, 172static ssize_t d_l1_down_proc_write(struct file *file, const char __user *buffer,
173 size_t count, loff_t *pos) 173 size_t count, loff_t *pos)
174{ 174{
175 diva_os_xdi_adapter_t *a = PDE(file_inode(file))->data; 175 diva_os_xdi_adapter_t *a = PDE_DATA(file_inode(file));
176 PISDN_ADAPTER IoAdapter = IoAdapters[a->controller - 1]; 176 PISDN_ADAPTER IoAdapter = IoAdapters[a->controller - 1];
177 177
178 if ((count == 1) || (count == 2)) { 178 if ((count == 1) || (count == 2)) {
@@ -210,7 +210,7 @@ static int d_l1_down_proc_show(struct seq_file *m, void *v)
210 210
211static int d_l1_down_proc_open(struct inode *inode, struct file *file) 211static int d_l1_down_proc_open(struct inode *inode, struct file *file)
212{ 212{
213 return single_open(file, d_l1_down_proc_show, PDE(inode)->data); 213 return single_open(file, d_l1_down_proc_show, PDE_DATA(inode));
214} 214}
215 215
216static const struct file_operations d_l1_down_proc_fops = { 216static const struct file_operations d_l1_down_proc_fops = {
@@ -236,7 +236,7 @@ static int grp_opt_proc_show(struct seq_file *m, void *v)
236 236
237static int grp_opt_proc_open(struct inode *inode, struct file *file) 237static int grp_opt_proc_open(struct inode *inode, struct file *file)
238{ 238{
239 return single_open(file, grp_opt_proc_show, PDE(inode)->data); 239 return single_open(file, grp_opt_proc_show, PDE_DATA(inode));
240} 240}
241 241
242static const struct file_operations grp_opt_proc_fops = { 242static const struct file_operations grp_opt_proc_fops = {
@@ -251,7 +251,7 @@ static const struct file_operations grp_opt_proc_fops = {
251static ssize_t info_proc_write(struct file *file, const char __user *buffer, 251static ssize_t info_proc_write(struct file *file, const char __user *buffer,
252 size_t count, loff_t *pos) 252 size_t count, loff_t *pos)
253{ 253{
254 diva_os_xdi_adapter_t *a = PDE(file_inode(file))->data; 254 diva_os_xdi_adapter_t *a = PDE_DATA(file_inode(file));
255 PISDN_ADAPTER IoAdapter = IoAdapters[a->controller - 1]; 255 PISDN_ADAPTER IoAdapter = IoAdapters[a->controller - 1];
256 char c[4]; 256 char c[4];
257 257
@@ -335,7 +335,7 @@ static int info_proc_show(struct seq_file *m, void *v)
335 335
336static int info_proc_open(struct inode *inode, struct file *file) 336static int info_proc_open(struct inode *inode, struct file *file)
337{ 337{
338 return single_open(file, info_proc_show, PDE(inode)->data); 338 return single_open(file, info_proc_show, PDE_DATA(inode));
339} 339}
340 340
341static const struct file_operations info_proc_fops = { 341static const struct file_operations info_proc_fops = {
diff --git a/drivers/isdn/hysdn/hycapi.c b/drivers/isdn/hysdn/hycapi.c
index 931f916c9c23..00aad10507d8 100644
--- a/drivers/isdn/hysdn/hycapi.c
+++ b/drivers/isdn/hysdn/hycapi.c
@@ -469,7 +469,7 @@ static int hycapi_proc_show(struct seq_file *m, void *v)
469 469
470static int hycapi_proc_open(struct inode *inode, struct file *file) 470static int hycapi_proc_open(struct inode *inode, struct file *file)
471{ 471{
472 return single_open(file, hycapi_proc_show, PDE(inode)->data); 472 return single_open(file, hycapi_proc_show, PDE_DATA(inode));
473} 473}
474 474
475static const struct file_operations hycapi_proc_fops = { 475static const struct file_operations hycapi_proc_fops = {
diff --git a/drivers/isdn/hysdn/hysdn_procconf.c b/drivers/isdn/hysdn/hysdn_procconf.c
index dc88bcb25029..73079213ec94 100644
--- a/drivers/isdn/hysdn/hysdn_procconf.c
+++ b/drivers/isdn/hysdn/hysdn_procconf.c
@@ -234,7 +234,7 @@ hysdn_conf_open(struct inode *ino, struct file *filep)
234 234
235 /* now search the addressed card */ 235 /* now search the addressed card */
236 mutex_lock(&hysdn_conf_mutex); 236 mutex_lock(&hysdn_conf_mutex);
237 card = PDE(ino)->data; 237 card = PDE_DATA(ino);
238 if (card->debug_flags & (LOG_PROC_OPEN | LOG_PROC_ALL)) 238 if (card->debug_flags & (LOG_PROC_OPEN | LOG_PROC_ALL))
239 hysdn_addlog(card, "config open for uid=%d gid=%d mode=0x%x", 239 hysdn_addlog(card, "config open for uid=%d gid=%d mode=0x%x",
240 filep->f_cred->fsuid, filep->f_cred->fsgid, 240 filep->f_cred->fsuid, filep->f_cred->fsgid,
@@ -308,7 +308,7 @@ hysdn_conf_close(struct inode *ino, struct file *filep)
308 int retval = 0; 308 int retval = 0;
309 309
310 mutex_lock(&hysdn_conf_mutex); 310 mutex_lock(&hysdn_conf_mutex);
311 card = PDE(ino)->data; 311 card = PDE_DATA(ino);
312 if (card->debug_flags & (LOG_PROC_OPEN | LOG_PROC_ALL)) 312 if (card->debug_flags & (LOG_PROC_OPEN | LOG_PROC_ALL))
313 hysdn_addlog(card, "config close for uid=%d gid=%d mode=0x%x", 313 hysdn_addlog(card, "config close for uid=%d gid=%d mode=0x%x",
314 filep->f_cred->fsuid, filep->f_cred->fsgid, 314 filep->f_cred->fsuid, filep->f_cred->fsgid,
diff --git a/drivers/isdn/hysdn/hysdn_proclog.c b/drivers/isdn/hysdn/hysdn_proclog.c
index 22f0e4ef1fb1..b61e8d5e84ad 100644
--- a/drivers/isdn/hysdn/hysdn_proclog.c
+++ b/drivers/isdn/hysdn/hysdn_proclog.c
@@ -173,7 +173,7 @@ hysdn_log_read(struct file *file, char __user *buf, size_t count, loff_t *off)
173{ 173{
174 struct log_data *inf; 174 struct log_data *inf;
175 int len; 175 int len;
176 hysdn_card *card = PDE(file_inode(file))->data; 176 hysdn_card *card = PDE_DATA(file_inode(file));
177 177
178 if (!*((struct log_data **) file->private_data)) { 178 if (!*((struct log_data **) file->private_data)) {
179 struct procdata *pd = card->proclog; 179 struct procdata *pd = card->proclog;
@@ -202,7 +202,7 @@ hysdn_log_read(struct file *file, char __user *buf, size_t count, loff_t *off)
202static int 202static int
203hysdn_log_open(struct inode *ino, struct file *filep) 203hysdn_log_open(struct inode *ino, struct file *filep)
204{ 204{
205 hysdn_card *card = PDE(ino)->data; 205 hysdn_card *card = PDE_DATA(ino);
206 206
207 mutex_lock(&hysdn_log_mutex); 207 mutex_lock(&hysdn_log_mutex);
208 if ((filep->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_WRITE) { 208 if ((filep->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_WRITE) {
@@ -255,7 +255,7 @@ hysdn_log_close(struct inode *ino, struct file *filep)
255 pd = (struct procdata *) inf->proc_ctrl; /* still entries there */ 255 pd = (struct procdata *) inf->proc_ctrl; /* still entries there */
256 else { 256 else {
257 /* no info available -> search card */ 257 /* no info available -> search card */
258 card = PDE(file_inode(filep))->data; 258 card = PDE_DATA(file_inode(filep));
259 pd = card->proclog; /* pointer to procfs log */ 259 pd = card->proclog; /* pointer to procfs log */
260 } 260 }
261 if (pd) 261 if (pd)
@@ -286,7 +286,7 @@ static unsigned int
286hysdn_log_poll(struct file *file, poll_table *wait) 286hysdn_log_poll(struct file *file, poll_table *wait)
287{ 287{
288 unsigned int mask = 0; 288 unsigned int mask = 0;
289 hysdn_card *card = PDE(file_inode(file))->data; 289 hysdn_card *card = PDE_DATA(file_inode(file));
290 struct procdata *pd = card->proclog; 290 struct procdata *pd = card->proclog;
291 291
292 if ((file->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_WRITE) 292 if ((file->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_WRITE)
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index 22b8ce4191cc..c31fbab6aa82 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -869,7 +869,7 @@ static int pmu_battery_proc_show(struct seq_file *m, void *v)
869 869
870static int pmu_battery_proc_open(struct inode *inode, struct file *file) 870static int pmu_battery_proc_open(struct inode *inode, struct file *file)
871{ 871{
872 return single_open(file, pmu_battery_proc_show, PDE(inode)->data); 872 return single_open(file, pmu_battery_proc_show, PDE_DATA(inode));
873} 873}
874 874
875static const struct file_operations pmu_battery_proc_fops = { 875static const struct file_operations pmu_battery_proc_fops = {
diff --git a/drivers/media/pci/zoran/zoran_procfs.c b/drivers/media/pci/zoran/zoran_procfs.c
index e084b0a21b1b..07a104d2bd1d 100644
--- a/drivers/media/pci/zoran/zoran_procfs.c
+++ b/drivers/media/pci/zoran/zoran_procfs.c
@@ -130,14 +130,14 @@ static int zoran_show(struct seq_file *p, void *v)
130 130
131static int zoran_open(struct inode *inode, struct file *file) 131static int zoran_open(struct inode *inode, struct file *file)
132{ 132{
133 struct zoran *data = PDE(inode)->data; 133 struct zoran *data = PDE_DATA(inode);
134 return single_open(file, zoran_show, data); 134 return single_open(file, zoran_show, data);
135} 135}
136 136
137static ssize_t zoran_write(struct file *file, const char __user *buffer, 137static ssize_t zoran_write(struct file *file, const char __user *buffer,
138 size_t count, loff_t *ppos) 138 size_t count, loff_t *ppos)
139{ 139{
140 struct zoran *zr = PDE(file_inode(file))->data; 140 struct zoran *zr = PDE_DATA(file_inode(file));
141 char *string, *sp; 141 char *string, *sp;
142 char *line, *ldelim, *varname, *svar, *tdelim; 142 char *line, *ldelim, *varname, *svar, *tdelim;
143 143
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index fb69baa06ca8..767ff4d839f4 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -6656,7 +6656,7 @@ static int mpt_summary_proc_show(struct seq_file *m, void *v)
6656 6656
6657static int mpt_summary_proc_open(struct inode *inode, struct file *file) 6657static int mpt_summary_proc_open(struct inode *inode, struct file *file)
6658{ 6658{
6659 return single_open(file, mpt_summary_proc_show, PDE(inode)->data); 6659 return single_open(file, mpt_summary_proc_show, PDE_DATA(inode));
6660} 6660}
6661 6661
6662static const struct file_operations mpt_summary_proc_fops = { 6662static const struct file_operations mpt_summary_proc_fops = {
@@ -6805,7 +6805,7 @@ static int mpt_iocinfo_proc_show(struct seq_file *m, void *v)
6805 6805
6806static int mpt_iocinfo_proc_open(struct inode *inode, struct file *file) 6806static int mpt_iocinfo_proc_open(struct inode *inode, struct file *file)
6807{ 6807{
6808 return single_open(file, mpt_iocinfo_proc_show, PDE(inode)->data); 6808 return single_open(file, mpt_iocinfo_proc_show, PDE_DATA(inode));
6809} 6809}
6810 6810
6811static const struct file_operations mpt_iocinfo_proc_fops = { 6811static const struct file_operations mpt_iocinfo_proc_fops = {
diff --git a/drivers/message/i2o/i2o_proc.c b/drivers/message/i2o/i2o_proc.c
index 15c1e480c0dd..70a840f9b283 100644
--- a/drivers/message/i2o/i2o_proc.c
+++ b/drivers/message/i2o/i2o_proc.c
@@ -1599,98 +1599,98 @@ static int i2o_seq_show_sensors(struct seq_file *seq, void *v)
1599 1599
1600static int i2o_seq_open_hrt(struct inode *inode, struct file *file) 1600static int i2o_seq_open_hrt(struct inode *inode, struct file *file)
1601{ 1601{
1602 return single_open(file, i2o_seq_show_hrt, PDE(inode)->data); 1602 return single_open(file, i2o_seq_show_hrt, PDE_DATA(inode));
1603}; 1603};
1604 1604
1605static int i2o_seq_open_lct(struct inode *inode, struct file *file) 1605static int i2o_seq_open_lct(struct inode *inode, struct file *file)
1606{ 1606{
1607 return single_open(file, i2o_seq_show_lct, PDE(inode)->data); 1607 return single_open(file, i2o_seq_show_lct, PDE_DATA(inode));
1608}; 1608};
1609 1609
1610static int i2o_seq_open_status(struct inode *inode, struct file *file) 1610static int i2o_seq_open_status(struct inode *inode, struct file *file)
1611{ 1611{
1612 return single_open(file, i2o_seq_show_status, PDE(inode)->data); 1612 return single_open(file, i2o_seq_show_status, PDE_DATA(inode));
1613}; 1613};
1614 1614
1615static int i2o_seq_open_hw(struct inode *inode, struct file *file) 1615static int i2o_seq_open_hw(struct inode *inode, struct file *file)
1616{ 1616{
1617 return single_open(file, i2o_seq_show_hw, PDE(inode)->data); 1617 return single_open(file, i2o_seq_show_hw, PDE_DATA(inode));
1618}; 1618};
1619 1619
1620static int i2o_seq_open_ddm_table(struct inode *inode, struct file *file) 1620static int i2o_seq_open_ddm_table(struct inode *inode, struct file *file)
1621{ 1621{
1622 return single_open(file, i2o_seq_show_ddm_table, PDE(inode)->data); 1622 return single_open(file, i2o_seq_show_ddm_table, PDE_DATA(inode));
1623}; 1623};
1624 1624
1625static int i2o_seq_open_driver_store(struct inode *inode, struct file *file) 1625static int i2o_seq_open_driver_store(struct inode *inode, struct file *file)
1626{ 1626{
1627 return single_open(file, i2o_seq_show_driver_store, PDE(inode)->data); 1627 return single_open(file, i2o_seq_show_driver_store, PDE_DATA(inode));
1628}; 1628};
1629 1629
1630static int i2o_seq_open_drivers_stored(struct inode *inode, struct file *file) 1630static int i2o_seq_open_drivers_stored(struct inode *inode, struct file *file)
1631{ 1631{
1632 return single_open(file, i2o_seq_show_drivers_stored, PDE(inode)->data); 1632 return single_open(file, i2o_seq_show_drivers_stored, PDE_DATA(inode));
1633}; 1633};
1634 1634
1635static int i2o_seq_open_groups(struct inode *inode, struct file *file) 1635static int i2o_seq_open_groups(struct inode *inode, struct file *file)
1636{ 1636{
1637 return single_open(file, i2o_seq_show_groups, PDE(inode)->data); 1637 return single_open(file, i2o_seq_show_groups, PDE_DATA(inode));
1638}; 1638};
1639 1639
1640static int i2o_seq_open_phys_device(struct inode *inode, struct file *file) 1640static int i2o_seq_open_phys_device(struct inode *inode, struct file *file)
1641{ 1641{
1642 return single_open(file, i2o_seq_show_phys_device, PDE(inode)->data); 1642 return single_open(file, i2o_seq_show_phys_device, PDE_DATA(inode));
1643}; 1643};
1644 1644
1645static int i2o_seq_open_claimed(struct inode *inode, struct file *file) 1645static int i2o_seq_open_claimed(struct inode *inode, struct file *file)
1646{ 1646{
1647 return single_open(file, i2o_seq_show_claimed, PDE(inode)->data); 1647 return single_open(file, i2o_seq_show_claimed, PDE_DATA(inode));
1648}; 1648};
1649 1649
1650static int i2o_seq_open_users(struct inode *inode, struct file *file) 1650static int i2o_seq_open_users(struct inode *inode, struct file *file)
1651{ 1651{
1652 return single_open(file, i2o_seq_show_users, PDE(inode)->data); 1652 return single_open(file, i2o_seq_show_users, PDE_DATA(inode));
1653}; 1653};
1654 1654
1655static int i2o_seq_open_priv_msgs(struct inode *inode, struct file *file) 1655static int i2o_seq_open_priv_msgs(struct inode *inode, struct file *file)
1656{ 1656{
1657 return single_open(file, i2o_seq_show_priv_msgs, PDE(inode)->data); 1657 return single_open(file, i2o_seq_show_priv_msgs, PDE_DATA(inode));
1658}; 1658};
1659 1659
1660static int i2o_seq_open_authorized_users(struct inode *inode, struct file *file) 1660static int i2o_seq_open_authorized_users(struct inode *inode, struct file *file)
1661{ 1661{
1662 return single_open(file, i2o_seq_show_authorized_users, 1662 return single_open(file, i2o_seq_show_authorized_users,
1663 PDE(inode)->data); 1663 PDE_DATA(inode));
1664}; 1664};
1665 1665
1666static int i2o_seq_open_dev_identity(struct inode *inode, struct file *file) 1666static int i2o_seq_open_dev_identity(struct inode *inode, struct file *file)
1667{ 1667{
1668 return single_open(file, i2o_seq_show_dev_identity, PDE(inode)->data); 1668 return single_open(file, i2o_seq_show_dev_identity, PDE_DATA(inode));
1669}; 1669};
1670 1670
1671static int i2o_seq_open_ddm_identity(struct inode *inode, struct file *file) 1671static int i2o_seq_open_ddm_identity(struct inode *inode, struct file *file)
1672{ 1672{
1673 return single_open(file, i2o_seq_show_ddm_identity, PDE(inode)->data); 1673 return single_open(file, i2o_seq_show_ddm_identity, PDE_DATA(inode));
1674}; 1674};
1675 1675
1676static int i2o_seq_open_uinfo(struct inode *inode, struct file *file) 1676static int i2o_seq_open_uinfo(struct inode *inode, struct file *file)
1677{ 1677{
1678 return single_open(file, i2o_seq_show_uinfo, PDE(inode)->data); 1678 return single_open(file, i2o_seq_show_uinfo, PDE_DATA(inode));
1679}; 1679};
1680 1680
1681static int i2o_seq_open_sgl_limits(struct inode *inode, struct file *file) 1681static int i2o_seq_open_sgl_limits(struct inode *inode, struct file *file)
1682{ 1682{
1683 return single_open(file, i2o_seq_show_sgl_limits, PDE(inode)->data); 1683 return single_open(file, i2o_seq_show_sgl_limits, PDE_DATA(inode));
1684}; 1684};
1685 1685
1686static int i2o_seq_open_sensors(struct inode *inode, struct file *file) 1686static int i2o_seq_open_sensors(struct inode *inode, struct file *file)
1687{ 1687{
1688 return single_open(file, i2o_seq_show_sensors, PDE(inode)->data); 1688 return single_open(file, i2o_seq_show_sensors, PDE_DATA(inode));
1689}; 1689};
1690 1690
1691static int i2o_seq_open_dev_name(struct inode *inode, struct file *file) 1691static int i2o_seq_open_dev_name(struct inode *inode, struct file *file)
1692{ 1692{
1693 return single_open(file, i2o_seq_show_dev_name, PDE(inode)->data); 1693 return single_open(file, i2o_seq_show_dev_name, PDE_DATA(inode));
1694}; 1694};
1695 1695
1696static const struct file_operations i2o_seq_fops_lct = { 1696static const struct file_operations i2o_seq_fops_lct = {
diff --git a/drivers/net/bonding/bond_procfs.c b/drivers/net/bonding/bond_procfs.c
index 3cea38d37344..94d06f1307b8 100644
--- a/drivers/net/bonding/bond_procfs.c
+++ b/drivers/net/bonding/bond_procfs.c
@@ -218,15 +218,13 @@ static const struct seq_operations bond_info_seq_ops = {
218static int bond_info_open(struct inode *inode, struct file *file) 218static int bond_info_open(struct inode *inode, struct file *file)
219{ 219{
220 struct seq_file *seq; 220 struct seq_file *seq;
221 struct proc_dir_entry *proc;
222 int res; 221 int res;
223 222
224 res = seq_open(file, &bond_info_seq_ops); 223 res = seq_open(file, &bond_info_seq_ops);
225 if (!res) { 224 if (!res) {
226 /* recover the pointer buried in proc_dir_entry data */ 225 /* recover the pointer buried in proc_dir_entry data */
227 seq = file->private_data; 226 seq = file->private_data;
228 proc = PDE(inode); 227 seq->private = PDE_DATA(inode);
229 seq->private = proc->data;
230 } 228 }
231 229
232 return res; 230 return res;
diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c
index 2f99f8881dfc..e22cd4e7017a 100644
--- a/drivers/net/irda/vlsi_ir.c
+++ b/drivers/net/irda/vlsi_ir.c
@@ -383,7 +383,7 @@ static int vlsi_seq_show(struct seq_file *seq, void *v)
383 383
384static int vlsi_seq_open(struct inode *inode, struct file *file) 384static int vlsi_seq_open(struct inode *inode, struct file *file)
385{ 385{
386 return single_open(file, vlsi_seq_show, PDE(inode)->data); 386 return single_open(file, vlsi_seq_show, PDE_DATA(inode));
387} 387}
388 388
389static const struct file_operations vlsi_proc_fops = { 389static const struct file_operations vlsi_proc_fops = {
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 53295418f576..66e398d4730d 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -4663,8 +4663,7 @@ static ssize_t proc_write( struct file *file,
4663static int proc_status_open(struct inode *inode, struct file *file) 4663static int proc_status_open(struct inode *inode, struct file *file)
4664{ 4664{
4665 struct proc_data *data; 4665 struct proc_data *data;
4666 struct proc_dir_entry *dp = PDE(inode); 4666 struct net_device *dev = PDE_DATA(inode);
4667 struct net_device *dev = dp->data;
4668 struct airo_info *apriv = dev->ml_priv; 4667 struct airo_info *apriv = dev->ml_priv;
4669 CapabilityRid cap_rid; 4668 CapabilityRid cap_rid;
4670 StatusRid status_rid; 4669 StatusRid status_rid;
@@ -4746,8 +4745,7 @@ static int proc_stats_rid_open( struct inode *inode,
4746 u16 rid ) 4745 u16 rid )
4747{ 4746{
4748 struct proc_data *data; 4747 struct proc_data *data;
4749 struct proc_dir_entry *dp = PDE(inode); 4748 struct net_device *dev = PDE_DATA(inode);
4750 struct net_device *dev = dp->data;
4751 struct airo_info *apriv = dev->ml_priv; 4749 struct airo_info *apriv = dev->ml_priv;
4752 StatsRid stats; 4750 StatsRid stats;
4753 int i, j; 4751 int i, j;
@@ -4809,8 +4807,7 @@ static inline int sniffing_mode(struct airo_info *ai)
4809static void proc_config_on_close(struct inode *inode, struct file *file) 4807static void proc_config_on_close(struct inode *inode, struct file *file)
4810{ 4808{
4811 struct proc_data *data = file->private_data; 4809 struct proc_data *data = file->private_data;
4812 struct proc_dir_entry *dp = PDE(inode); 4810 struct net_device *dev = PDE_DATA(inode);
4813 struct net_device *dev = dp->data;
4814 struct airo_info *ai = dev->ml_priv; 4811 struct airo_info *ai = dev->ml_priv;
4815 char *line; 4812 char *line;
4816 4813
@@ -5021,8 +5018,7 @@ static const char *get_rmode(__le16 mode)
5021static int proc_config_open(struct inode *inode, struct file *file) 5018static int proc_config_open(struct inode *inode, struct file *file)
5022{ 5019{
5023 struct proc_data *data; 5020 struct proc_data *data;
5024 struct proc_dir_entry *dp = PDE(inode); 5021 struct net_device *dev = PDE_DATA(inode);
5025 struct net_device *dev = dp->data;
5026 struct airo_info *ai = dev->ml_priv; 5022 struct airo_info *ai = dev->ml_priv;
5027 int i; 5023 int i;
5028 __le16 mode; 5024 __le16 mode;
@@ -5112,8 +5108,7 @@ static int proc_config_open(struct inode *inode, struct file *file)
5112static void proc_SSID_on_close(struct inode *inode, struct file *file) 5108static void proc_SSID_on_close(struct inode *inode, struct file *file)
5113{ 5109{
5114 struct proc_data *data = file->private_data; 5110 struct proc_data *data = file->private_data;
5115 struct proc_dir_entry *dp = PDE(inode); 5111 struct net_device *dev = PDE_DATA(inode);
5116 struct net_device *dev = dp->data;
5117 struct airo_info *ai = dev->ml_priv; 5112 struct airo_info *ai = dev->ml_priv;
5118 SsidRid SSID_rid; 5113 SsidRid SSID_rid;
5119 int i; 5114 int i;
@@ -5148,8 +5143,7 @@ static void proc_SSID_on_close(struct inode *inode, struct file *file)
5148 5143
5149static void proc_APList_on_close( struct inode *inode, struct file *file ) { 5144static void proc_APList_on_close( struct inode *inode, struct file *file ) {
5150 struct proc_data *data = file->private_data; 5145 struct proc_data *data = file->private_data;
5151 struct proc_dir_entry *dp = PDE(inode); 5146 struct net_device *dev = PDE_DATA(inode);
5152 struct net_device *dev = dp->data;
5153 struct airo_info *ai = dev->ml_priv; 5147 struct airo_info *ai = dev->ml_priv;
5154 APListRid APList_rid; 5148 APListRid APList_rid;
5155 int i; 5149 int i;
@@ -5283,8 +5277,7 @@ static int set_wep_tx_idx(struct airo_info *ai, u16 index, int perm, int lock)
5283 5277
5284static void proc_wepkey_on_close( struct inode *inode, struct file *file ) { 5278static void proc_wepkey_on_close( struct inode *inode, struct file *file ) {
5285 struct proc_data *data; 5279 struct proc_data *data;
5286 struct proc_dir_entry *dp = PDE(inode); 5280 struct net_device *dev = PDE_DATA(inode);
5287 struct net_device *dev = dp->data;
5288 struct airo_info *ai = dev->ml_priv; 5281 struct airo_info *ai = dev->ml_priv;
5289 int i, rc; 5282 int i, rc;
5290 char key[16]; 5283 char key[16];
@@ -5335,8 +5328,7 @@ static void proc_wepkey_on_close( struct inode *inode, struct file *file ) {
5335static int proc_wepkey_open( struct inode *inode, struct file *file ) 5328static int proc_wepkey_open( struct inode *inode, struct file *file )
5336{ 5329{
5337 struct proc_data *data; 5330 struct proc_data *data;
5338 struct proc_dir_entry *dp = PDE(inode); 5331 struct net_device *dev = PDE_DATA(inode);
5339 struct net_device *dev = dp->data;
5340 struct airo_info *ai = dev->ml_priv; 5332 struct airo_info *ai = dev->ml_priv;
5341 char *ptr; 5333 char *ptr;
5342 WepKeyRid wkr; 5334 WepKeyRid wkr;
@@ -5384,8 +5376,7 @@ static int proc_wepkey_open( struct inode *inode, struct file *file )
5384static int proc_SSID_open(struct inode *inode, struct file *file) 5376static int proc_SSID_open(struct inode *inode, struct file *file)
5385{ 5377{
5386 struct proc_data *data; 5378 struct proc_data *data;
5387 struct proc_dir_entry *dp = PDE(inode); 5379 struct net_device *dev = PDE_DATA(inode);
5388 struct net_device *dev = dp->data;
5389 struct airo_info *ai = dev->ml_priv; 5380 struct airo_info *ai = dev->ml_priv;
5390 int i; 5381 int i;
5391 char *ptr; 5382 char *ptr;
@@ -5428,8 +5419,7 @@ static int proc_SSID_open(struct inode *inode, struct file *file)
5428 5419
5429static int proc_APList_open( struct inode *inode, struct file *file ) { 5420static int proc_APList_open( struct inode *inode, struct file *file ) {
5430 struct proc_data *data; 5421 struct proc_data *data;
5431 struct proc_dir_entry *dp = PDE(inode); 5422 struct net_device *dev = PDE_DATA(inode);
5432 struct net_device *dev = dp->data;
5433 struct airo_info *ai = dev->ml_priv; 5423 struct airo_info *ai = dev->ml_priv;
5434 int i; 5424 int i;
5435 char *ptr; 5425 char *ptr;
@@ -5468,8 +5458,7 @@ static int proc_APList_open( struct inode *inode, struct file *file ) {
5468 5458
5469static int proc_BSSList_open( struct inode *inode, struct file *file ) { 5459static int proc_BSSList_open( struct inode *inode, struct file *file ) {
5470 struct proc_data *data; 5460 struct proc_data *data;
5471 struct proc_dir_entry *dp = PDE(inode); 5461 struct net_device *dev = PDE_DATA(inode);
5472 struct net_device *dev = dp->data;
5473 struct airo_info *ai = dev->ml_priv; 5462 struct airo_info *ai = dev->ml_priv;
5474 char *ptr; 5463 char *ptr;
5475 BSSListRid BSSList_rid; 5464 BSSListRid BSSList_rid;
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 3109c0db66e1..a6f660c01902 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -2778,7 +2778,7 @@ static ssize_t int_proc_write(struct file *file, const char __user *buffer,
2778 nr = nr * 10 + c; 2778 nr = nr * 10 + c;
2779 p++; 2779 p++;
2780 } while (--len); 2780 } while (--len);
2781 *(int *)PDE(file_inode(file))->data = nr; 2781 *(int *)PDE_DATA(file_inode(file)) = nr;
2782 return count; 2782 return count;
2783} 2783}
2784 2784
diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c
index d4d800c54d86..b48243131993 100644
--- a/drivers/parisc/led.c
+++ b/drivers/parisc/led.c
@@ -172,14 +172,14 @@ static int led_proc_show(struct seq_file *m, void *v)
172 172
173static int led_proc_open(struct inode *inode, struct file *file) 173static int led_proc_open(struct inode *inode, struct file *file)
174{ 174{
175 return single_open(file, led_proc_show, PDE(inode)->data); 175 return single_open(file, led_proc_show, PDE_DATA(inode));
176} 176}
177 177
178 178
179static ssize_t led_proc_write(struct file *file, const char *buf, 179static ssize_t led_proc_write(struct file *file, const char *buf,
180 size_t count, loff_t *pos) 180 size_t count, loff_t *pos)
181{ 181{
182 void *data = PDE(file_inode(file))->data; 182 void *data = PDE_DATA(file_inode(file));
183 char *cur, lbuf[32]; 183 char *cur, lbuf[32];
184 int d; 184 int d;
185 185
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
index 0b009470e6db..12e4fb5824c1 100644
--- a/drivers/pci/proc.c
+++ b/drivers/pci/proc.c
@@ -46,9 +46,7 @@ proc_bus_pci_lseek(struct file *file, loff_t off, int whence)
46static ssize_t 46static ssize_t
47proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) 47proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos)
48{ 48{
49 const struct inode *ino = file_inode(file); 49 struct pci_dev *dev = PDE_DATA(file_inode(file));
50 const struct proc_dir_entry *dp = PDE(ino);
51 struct pci_dev *dev = dp->data;
52 unsigned int pos = *ppos; 50 unsigned int pos = *ppos;
53 unsigned int cnt, size; 51 unsigned int cnt, size;
54 52
@@ -59,7 +57,7 @@ proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *pp
59 */ 57 */
60 58
61 if (capable(CAP_SYS_ADMIN)) 59 if (capable(CAP_SYS_ADMIN))
62 size = dp->size; 60 size = dev->cfg_size;
63 else if (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS) 61 else if (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
64 size = 128; 62 size = 128;
65 else 63 else
@@ -133,10 +131,9 @@ static ssize_t
133proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos) 131proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos)
134{ 132{
135 struct inode *ino = file_inode(file); 133 struct inode *ino = file_inode(file);
136 const struct proc_dir_entry *dp = PDE(ino); 134 struct pci_dev *dev = PDE_DATA(ino);
137 struct pci_dev *dev = dp->data;
138 int pos = *ppos; 135 int pos = *ppos;
139 int size = dp->size; 136 int size = dev->cfg_size;
140 int cnt; 137 int cnt;
141 138
142 if (pos >= size) 139 if (pos >= size)
@@ -200,7 +197,7 @@ proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, lof
200 pci_config_pm_runtime_put(dev); 197 pci_config_pm_runtime_put(dev);
201 198
202 *ppos = pos; 199 *ppos = pos;
203 i_size_write(ino, dp->size); 200 i_size_write(ino, dev->cfg_size);
204 return nbytes; 201 return nbytes;
205} 202}
206 203
@@ -212,8 +209,7 @@ struct pci_filp_private {
212static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd, 209static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd,
213 unsigned long arg) 210 unsigned long arg)
214{ 211{
215 const struct proc_dir_entry *dp = PDE(file_inode(file)); 212 struct pci_dev *dev = PDE_DATA(file_inode(file));
216 struct pci_dev *dev = dp->data;
217#ifdef HAVE_PCI_MMAP 213#ifdef HAVE_PCI_MMAP
218 struct pci_filp_private *fpriv = file->private_data; 214 struct pci_filp_private *fpriv = file->private_data;
219#endif /* HAVE_PCI_MMAP */ 215#endif /* HAVE_PCI_MMAP */
@@ -253,9 +249,7 @@ static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd,
253#ifdef HAVE_PCI_MMAP 249#ifdef HAVE_PCI_MMAP
254static int proc_bus_pci_mmap(struct file *file, struct vm_area_struct *vma) 250static int proc_bus_pci_mmap(struct file *file, struct vm_area_struct *vma)
255{ 251{
256 struct inode *inode = file_inode(file); 252 struct pci_dev *dev = PDE_DATA(file_inode(file));
257 const struct proc_dir_entry *dp = PDE(inode);
258 struct pci_dev *dev = dp->data;
259 struct pci_filp_private *fpriv = file->private_data; 253 struct pci_filp_private *fpriv = file->private_data;
260 int i, ret; 254 int i, ret;
261 255
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 9a907567f41e..05272e676a28 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -844,14 +844,14 @@ static int dispatch_proc_show(struct seq_file *m, void *v)
844 844
845static int dispatch_proc_open(struct inode *inode, struct file *file) 845static int dispatch_proc_open(struct inode *inode, struct file *file)
846{ 846{
847 return single_open(file, dispatch_proc_show, PDE(inode)->data); 847 return single_open(file, dispatch_proc_show, PDE_DATA(inode));
848} 848}
849 849
850static ssize_t dispatch_proc_write(struct file *file, 850static ssize_t dispatch_proc_write(struct file *file,
851 const char __user *userbuf, 851 const char __user *userbuf,
852 size_t count, loff_t *pos) 852 size_t count, loff_t *pos)
853{ 853{
854 struct ibm_struct *ibm = PDE(file_inode(file))->data; 854 struct ibm_struct *ibm = PDE_DATA(file_inode(file));
855 char *kernbuf; 855 char *kernbuf;
856 int ret; 856 int ret;
857 857
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index 242abac62d8b..eb3467ea6d86 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -553,7 +553,7 @@ static int lcd_proc_show(struct seq_file *m, void *v)
553 553
554static int lcd_proc_open(struct inode *inode, struct file *file) 554static int lcd_proc_open(struct inode *inode, struct file *file)
555{ 555{
556 return single_open(file, lcd_proc_show, PDE(inode)->data); 556 return single_open(file, lcd_proc_show, PDE_DATA(inode));
557} 557}
558 558
559static int set_lcd_brightness(struct toshiba_acpi_dev *dev, int value) 559static int set_lcd_brightness(struct toshiba_acpi_dev *dev, int value)
@@ -583,7 +583,7 @@ static int set_lcd_status(struct backlight_device *bd)
583static ssize_t lcd_proc_write(struct file *file, const char __user *buf, 583static ssize_t lcd_proc_write(struct file *file, const char __user *buf,
584 size_t count, loff_t *pos) 584 size_t count, loff_t *pos)
585{ 585{
586 struct toshiba_acpi_dev *dev = PDE(file_inode(file))->data; 586 struct toshiba_acpi_dev *dev = PDE_DATA(file_inode(file));
587 char cmd[42]; 587 char cmd[42];
588 size_t len; 588 size_t len;
589 int value; 589 int value;
@@ -644,13 +644,13 @@ static int video_proc_show(struct seq_file *m, void *v)
644 644
645static int video_proc_open(struct inode *inode, struct file *file) 645static int video_proc_open(struct inode *inode, struct file *file)
646{ 646{
647 return single_open(file, video_proc_show, PDE(inode)->data); 647 return single_open(file, video_proc_show, PDE_DATA(inode));
648} 648}
649 649
650static ssize_t video_proc_write(struct file *file, const char __user *buf, 650static ssize_t video_proc_write(struct file *file, const char __user *buf,
651 size_t count, loff_t *pos) 651 size_t count, loff_t *pos)
652{ 652{
653 struct toshiba_acpi_dev *dev = PDE(file_inode(file))->data; 653 struct toshiba_acpi_dev *dev = PDE_DATA(file_inode(file));
654 char *cmd, *buffer; 654 char *cmd, *buffer;
655 int ret; 655 int ret;
656 int value; 656 int value;
@@ -744,13 +744,13 @@ static int fan_proc_show(struct seq_file *m, void *v)
744 744
745static int fan_proc_open(struct inode *inode, struct file *file) 745static int fan_proc_open(struct inode *inode, struct file *file)
746{ 746{
747 return single_open(file, fan_proc_show, PDE(inode)->data); 747 return single_open(file, fan_proc_show, PDE_DATA(inode));
748} 748}
749 749
750static ssize_t fan_proc_write(struct file *file, const char __user *buf, 750static ssize_t fan_proc_write(struct file *file, const char __user *buf,
751 size_t count, loff_t *pos) 751 size_t count, loff_t *pos)
752{ 752{
753 struct toshiba_acpi_dev *dev = PDE(file_inode(file))->data; 753 struct toshiba_acpi_dev *dev = PDE_DATA(file_inode(file));
754 char cmd[42]; 754 char cmd[42];
755 size_t len; 755 size_t len;
756 int value; 756 int value;
@@ -816,13 +816,13 @@ static int keys_proc_show(struct seq_file *m, void *v)
816 816
817static int keys_proc_open(struct inode *inode, struct file *file) 817static int keys_proc_open(struct inode *inode, struct file *file)
818{ 818{
819 return single_open(file, keys_proc_show, PDE(inode)->data); 819 return single_open(file, keys_proc_show, PDE_DATA(inode));
820} 820}
821 821
822static ssize_t keys_proc_write(struct file *file, const char __user *buf, 822static ssize_t keys_proc_write(struct file *file, const char __user *buf,
823 size_t count, loff_t *pos) 823 size_t count, loff_t *pos)
824{ 824{
825 struct toshiba_acpi_dev *dev = PDE(file_inode(file))->data; 825 struct toshiba_acpi_dev *dev = PDE_DATA(file_inode(file));
826 char cmd[42]; 826 char cmd[42];
827 size_t len; 827 size_t len;
828 int value; 828 int value;
@@ -859,7 +859,7 @@ static int version_proc_show(struct seq_file *m, void *v)
859 859
860static int version_proc_open(struct inode *inode, struct file *file) 860static int version_proc_open(struct inode *inode, struct file *file)
861{ 861{
862 return single_open(file, version_proc_show, PDE(inode)->data); 862 return single_open(file, version_proc_show, PDE_DATA(inode));
863} 863}
864 864
865static const struct file_operations version_proc_fops = { 865static const struct file_operations version_proc_fops = {
diff --git a/drivers/pnp/isapnp/proc.c b/drivers/pnp/isapnp/proc.c
index 65f735ac6b3b..af4d40affb79 100644
--- a/drivers/pnp/isapnp/proc.c
+++ b/drivers/pnp/isapnp/proc.c
@@ -55,9 +55,7 @@ static loff_t isapnp_proc_bus_lseek(struct file *file, loff_t off, int whence)
55static ssize_t isapnp_proc_bus_read(struct file *file, char __user * buf, 55static ssize_t isapnp_proc_bus_read(struct file *file, char __user * buf,
56 size_t nbytes, loff_t * ppos) 56 size_t nbytes, loff_t * ppos)
57{ 57{
58 struct inode *ino = file_inode(file); 58 struct pnp_dev *dev = PDE_DATA(file_inode(file));
59 struct proc_dir_entry *dp = PDE(ino);
60 struct pnp_dev *dev = dp->data;
61 int pos = *ppos; 59 int pos = *ppos;
62 int cnt, size = 256; 60 int cnt, size = 256;
63 61
diff --git a/drivers/pnp/pnpbios/proc.c b/drivers/pnp/pnpbios/proc.c
index 63ddb0173456..8dafd65d4758 100644
--- a/drivers/pnp/pnpbios/proc.c
+++ b/drivers/pnp/pnpbios/proc.c
@@ -238,13 +238,13 @@ static int pnpbios_proc_show(struct seq_file *m, void *v)
238 238
239static int pnpbios_proc_open(struct inode *inode, struct file *file) 239static int pnpbios_proc_open(struct inode *inode, struct file *file)
240{ 240{
241 return single_open(file, pnpbios_proc_show, PDE(inode)->data); 241 return single_open(file, pnpbios_proc_show, PDE_DATA(inode));
242} 242}
243 243
244static ssize_t pnpbios_proc_write(struct file *file, const char __user *buf, 244static ssize_t pnpbios_proc_write(struct file *file, const char __user *buf,
245 size_t count, loff_t *pos) 245 size_t count, loff_t *pos)
246{ 246{
247 void *data = PDE(file_inode(file))->data; 247 void *data = PDE_DATA(file_inode(file));
248 struct pnp_bios_node *node; 248 struct pnp_bios_node *node;
249 int boot = (long)data >> 8; 249 int boot = (long)data >> 8;
250 u8 nodenum = (long)data; 250 u8 nodenum = (long)data;
diff --git a/drivers/rtc/rtc-proc.c b/drivers/rtc/rtc-proc.c
index e96236ac2e78..ffa69e1c9245 100644
--- a/drivers/rtc/rtc-proc.c
+++ b/drivers/rtc/rtc-proc.c
@@ -110,7 +110,7 @@ static int rtc_proc_show(struct seq_file *seq, void *offset)
110static int rtc_proc_open(struct inode *inode, struct file *file) 110static int rtc_proc_open(struct inode *inode, struct file *file)
111{ 111{
112 int ret; 112 int ret;
113 struct rtc_device *rtc = PDE(inode)->data; 113 struct rtc_device *rtc = PDE_DATA(inode);
114 114
115 if (!try_module_get(THIS_MODULE)) 115 if (!try_module_get(THIS_MODULE))
116 return -ENODEV; 116 return -ENODEV;
diff --git a/drivers/scsi/scsi_proc.c b/drivers/scsi/scsi_proc.c
index 1eb34c34d7b9..db66357211ed 100644
--- a/drivers/scsi/scsi_proc.c
+++ b/drivers/scsi/scsi_proc.c
@@ -48,7 +48,7 @@ static DEFINE_MUTEX(global_host_template_mutex);
48static ssize_t proc_scsi_host_write(struct file *file, const char __user *buf, 48static ssize_t proc_scsi_host_write(struct file *file, const char __user *buf,
49 size_t count, loff_t *ppos) 49 size_t count, loff_t *ppos)
50{ 50{
51 struct Scsi_Host *shost = PDE(file_inode(file))->data; 51 struct Scsi_Host *shost = PDE_DATA(file_inode(file));
52 ssize_t ret = -ENOMEM; 52 ssize_t ret = -ENOMEM;
53 char *page; 53 char *page;
54 54
@@ -78,7 +78,7 @@ static int proc_scsi_show(struct seq_file *m, void *v)
78 78
79static int proc_scsi_host_open(struct inode *inode, struct file *file) 79static int proc_scsi_host_open(struct inode *inode, struct file *file)
80{ 80{
81 return single_open_size(file, proc_scsi_show, PDE(inode)->data, 81 return single_open_size(file, proc_scsi_show, PDE_DATA(inode),
82 4 * PAGE_SIZE); 82 4 * PAGE_SIZE);
83} 83}
84 84
diff --git a/drivers/staging/ccg/rndis.c b/drivers/staging/ccg/rndis.c
index d9297eebbf73..1e4cfb05f70b 100644
--- a/drivers/staging/ccg/rndis.c
+++ b/drivers/staging/ccg/rndis.c
@@ -1065,7 +1065,7 @@ static int rndis_proc_show(struct seq_file *m, void *v)
1065static ssize_t rndis_proc_write(struct file *file, const char __user *buffer, 1065static ssize_t rndis_proc_write(struct file *file, const char __user *buffer,
1066 size_t count, loff_t *ppos) 1066 size_t count, loff_t *ppos)
1067{ 1067{
1068 rndis_params *p = PDE(file_inode(file))->data; 1068 rndis_params *p = PDE_DATA(file_inode(file));
1069 u32 speed = 0; 1069 u32 speed = 0;
1070 int i, fl_speed = 0; 1070 int i, fl_speed = 0;
1071 1071
@@ -1109,7 +1109,7 @@ static ssize_t rndis_proc_write(struct file *file, const char __user *buffer,
1109 1109
1110static int rndis_proc_open(struct inode *inode, struct file *file) 1110static int rndis_proc_open(struct inode *inode, struct file *file)
1111{ 1111{
1112 return single_open(file, rndis_proc_show, PDE(inode)->data); 1112 return single_open(file, rndis_proc_show, PDE_DATA(inode));
1113} 1113}
1114 1114
1115static const struct file_operations rndis_proc_fops = { 1115static const struct file_operations rndis_proc_fops = {
diff --git a/drivers/staging/dgrp/dgrp_dpa_ops.c b/drivers/staging/dgrp/dgrp_dpa_ops.c
index cfa8e82404f9..43209c163a43 100644
--- a/drivers/staging/dgrp/dgrp_dpa_ops.c
+++ b/drivers/staging/dgrp/dgrp_dpa_ops.c
@@ -113,8 +113,6 @@ static int dgrp_dpa_open(struct inode *inode, struct file *file)
113 struct nd_struct *nd; 113 struct nd_struct *nd;
114 int rtn = 0; 114 int rtn = 0;
115 115
116 struct proc_dir_entry *de;
117
118 rtn = try_module_get(THIS_MODULE); 116 rtn = try_module_get(THIS_MODULE);
119 if (!rtn) 117 if (!rtn)
120 return -ENXIO; 118 return -ENXIO;
@@ -137,12 +135,7 @@ static int dgrp_dpa_open(struct inode *inode, struct file *file)
137 /* 135 /*
138 * Get the node pointer, and fail if it doesn't exist. 136 * Get the node pointer, and fail if it doesn't exist.
139 */ 137 */
140 de = PDE(inode); 138 nd = PDE_DATA(inode);
141 if (!de) {
142 rtn = -ENXIO;
143 goto done;
144 }
145 nd = (struct nd_struct *)de->data;
146 if (!nd) { 139 if (!nd) {
147 rtn = -ENXIO; 140 rtn = -ENXIO;
148 goto done; 141 goto done;
diff --git a/drivers/staging/dgrp/dgrp_mon_ops.c b/drivers/staging/dgrp/dgrp_mon_ops.c
index 52493b5c1673..6edbbf069150 100644
--- a/drivers/staging/dgrp/dgrp_mon_ops.c
+++ b/drivers/staging/dgrp/dgrp_mon_ops.c
@@ -67,7 +67,6 @@ const struct file_operations dgrp_mon_ops = {
67static int dgrp_mon_open(struct inode *inode, struct file *file) 67static int dgrp_mon_open(struct inode *inode, struct file *file)
68{ 68{
69 struct nd_struct *nd; 69 struct nd_struct *nd;
70 struct proc_dir_entry *de;
71 struct timeval tv; 70 struct timeval tv;
72 uint32_t time; 71 uint32_t time;
73 u8 *buf; 72 u8 *buf;
@@ -95,13 +94,7 @@ static int dgrp_mon_open(struct inode *inode, struct file *file)
95 /* 94 /*
96 * Get the node pointer, and fail if it doesn't exist. 95 * Get the node pointer, and fail if it doesn't exist.
97 */ 96 */
98 de = PDE(inode); 97 nd = PDE_DATA(inode);
99 if (!de) {
100 rtn = -ENXIO;
101 goto done;
102 }
103
104 nd = (struct nd_struct *)de->data;
105 if (!nd) { 98 if (!nd) {
106 rtn = -ENXIO; 99 rtn = -ENXIO;
107 goto done; 100 goto done;
diff --git a/drivers/staging/dgrp/dgrp_net_ops.c b/drivers/staging/dgrp/dgrp_net_ops.c
index dc826b2cf907..5448fc78bcad 100644
--- a/drivers/staging/dgrp/dgrp_net_ops.c
+++ b/drivers/staging/dgrp/dgrp_net_ops.c
@@ -784,7 +784,6 @@ out_err:
784static int dgrp_net_open(struct inode *inode, struct file *file) 784static int dgrp_net_open(struct inode *inode, struct file *file)
785{ 785{
786 struct nd_struct *nd; 786 struct nd_struct *nd;
787 struct proc_dir_entry *de;
788 ulong lock_flags; 787 ulong lock_flags;
789 int rtn; 788 int rtn;
790 789
@@ -808,13 +807,7 @@ static int dgrp_net_open(struct inode *inode, struct file *file)
808 /* 807 /*
809 * Get the node pointer, and fail if it doesn't exist. 808 * Get the node pointer, and fail if it doesn't exist.
810 */ 809 */
811 de = PDE(inode); 810 nd = PDE_DATA(inode);
812 if (!de) {
813 rtn = -ENXIO;
814 goto done;
815 }
816
817 nd = (struct nd_struct *) de->data;
818 if (!nd) { 811 if (!nd) {
819 rtn = -ENXIO; 812 rtn = -ENXIO;
820 goto done; 813 goto done;
diff --git a/drivers/staging/dgrp/dgrp_ports_ops.c b/drivers/staging/dgrp/dgrp_ports_ops.c
index 48e9079c6355..4ce030815f27 100644
--- a/drivers/staging/dgrp/dgrp_ports_ops.c
+++ b/drivers/staging/dgrp/dgrp_ports_ops.c
@@ -149,7 +149,7 @@ static int dgrp_ports_open(struct inode *inode, struct file *file)
149 rtn = seq_open(file, &ports_seq_ops); 149 rtn = seq_open(file, &ports_seq_ops);
150 if (!rtn) { 150 if (!rtn) {
151 seq = file->private_data; 151 seq = file->private_data;
152 seq->private = PDE(inode)->data; 152 seq->private = PDE_DATA(inode);
153 } 153 }
154 154
155 return rtn; 155 return rtn;
diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c
index f64ee07c15ac..e2da0fb3f98e 100644
--- a/drivers/staging/silicom/bpctl_mod.c
+++ b/drivers/staging/silicom/bpctl_mod.c
@@ -7250,7 +7250,7 @@ static int procfs_add(char *proc_name, const struct file_operations *fops,
7250#define RO_FOPS(name) \ 7250#define RO_FOPS(name) \
7251static int name##_open(struct inode *inode, struct file *file) \ 7251static int name##_open(struct inode *inode, struct file *file) \
7252{ \ 7252{ \
7253 return single_open(file, show_##name, PDE(inode)->data);\ 7253 return single_open(file, show_##name, PDE_DATA(inode));\
7254} \ 7254} \
7255static const struct file_operations name##_ops = { \ 7255static const struct file_operations name##_ops = { \
7256 .open = name##_open, \ 7256 .open = name##_open, \
@@ -7262,7 +7262,7 @@ static const struct file_operations name##_ops = { \
7262#define RW_FOPS(name) \ 7262#define RW_FOPS(name) \
7263static int name##_open(struct inode *inode, struct file *file) \ 7263static int name##_open(struct inode *inode, struct file *file) \
7264{ \ 7264{ \
7265 return single_open(file, show_##name, PDE(inode)->data);\ 7265 return single_open(file, show_##name, PDE_DATA(inode));\
7266} \ 7266} \
7267static const struct file_operations name##_ops = { \ 7267static const struct file_operations name##_ops = { \
7268 .open = name##_open, \ 7268 .open = name##_open, \
@@ -7351,7 +7351,7 @@ static ssize_t bypass_write(struct file *file, const char __user *buffer,
7351 if (bypass_param < 0) 7351 if (bypass_param < 0)
7352 return -1; 7352 return -1;
7353 7353
7354 set_bypass_fn(PDE(file_inode(file))->data, bypass_param); 7354 set_bypass_fn(PDE_DATA(file_inode(file)), bypass_param);
7355 return count; 7355 return count;
7356} 7356}
7357static int show_bypass(struct seq_file *m, void *v) 7357static int show_bypass(struct seq_file *m, void *v)
@@ -7375,7 +7375,7 @@ static ssize_t tap_write(struct file *file, const char __user *buffer,
7375 if (tap_param < 0) 7375 if (tap_param < 0)
7376 return -1; 7376 return -1;
7377 7377
7378 set_tap_fn(PDE(file_inode(file))->data, tap_param); 7378 set_tap_fn(PDE_DATA(file_inode(file)), tap_param);
7379 return count; 7379 return count;
7380} 7380}
7381static int show_tap(struct seq_file *m, void *v) 7381static int show_tap(struct seq_file *m, void *v)
@@ -7399,7 +7399,7 @@ static ssize_t disc_write(struct file *file, const char __user *buffer,
7399 if (tap_param < 0) 7399 if (tap_param < 0)
7400 return -1; 7400 return -1;
7401 7401
7402 set_disc_fn(PDE(file_inode(file))->data, tap_param); 7402 set_disc_fn(PDE_DATA(file_inode(file)), tap_param);
7403 return count; 7403 return count;
7404} 7404}
7405static int show_disc(struct seq_file *m, void *v) 7405static int show_disc(struct seq_file *m, void *v)
@@ -7461,7 +7461,7 @@ RO_FOPS(disc_change)
7461static ssize_t bypass_wd_write(struct file *file, const char __user *buffer, 7461static ssize_t bypass_wd_write(struct file *file, const char __user *buffer,
7462 size_t count, loff_t *pos) 7462 size_t count, loff_t *pos)
7463{ 7463{
7464 bpctl_dev_t *dev = PDE(file_inode(file))->data; 7464 bpctl_dev_t *dev = PDE_DATA(file_inode(file));
7465 int timeout; 7465 int timeout;
7466 int ret = kstrtoint_from_user(buffer, count, 10, &timeout); 7466 int ret = kstrtoint_from_user(buffer, count, 10, &timeout);
7467 if (ret) 7467 if (ret)
@@ -7507,7 +7507,7 @@ RO_FOPS(wd_expire_time)
7507static ssize_t tpl_write(struct file *file, const char __user *buffer, 7507static ssize_t tpl_write(struct file *file, const char __user *buffer,
7508 size_t count, loff_t *pos) 7508 size_t count, loff_t *pos)
7509{ 7509{
7510 bpctl_dev_t *dev = PDE(file_inode(file))->data; 7510 bpctl_dev_t *dev = PDE_DATA(file_inode(file));
7511 int tpl_param = user_on_off(buffer, count); 7511 int tpl_param = user_on_off(buffer, count);
7512 if (tpl_param < 0) 7512 if (tpl_param < 0)
7513 return -1; 7513 return -1;
@@ -7533,7 +7533,7 @@ RW_FOPS(tpl)
7533static ssize_t wait_at_pwup_write(struct file *file, const char __user *buffer, 7533static ssize_t wait_at_pwup_write(struct file *file, const char __user *buffer,
7534 size_t count, loff_t *pos) 7534 size_t count, loff_t *pos)
7535{ 7535{
7536 bpctl_dev_t *dev = PDE(file_inode(file))->data; 7536 bpctl_dev_t *dev = PDE_DATA(file_inode(file));
7537 int tpl_param = user_on_off(buffer, count); 7537 int tpl_param = user_on_off(buffer, count);
7538 if (tpl_param < 0) 7538 if (tpl_param < 0)
7539 return -1; 7539 return -1;
@@ -7558,7 +7558,7 @@ RW_FOPS(wait_at_pwup)
7558static ssize_t hw_reset_write(struct file *file, const char __user *buffer, 7558static ssize_t hw_reset_write(struct file *file, const char __user *buffer,
7559 size_t count, loff_t *pos) 7559 size_t count, loff_t *pos)
7560{ 7560{
7561 bpctl_dev_t *dev = PDE(file_inode(file))->data; 7561 bpctl_dev_t *dev = PDE_DATA(file_inode(file));
7562 int tpl_param = user_on_off(buffer, count); 7562 int tpl_param = user_on_off(buffer, count);
7563 if (tpl_param < 0) 7563 if (tpl_param < 0)
7564 return -1; 7564 return -1;
@@ -7603,7 +7603,7 @@ static ssize_t dis_bypass_write(struct file *file, const char __user *buffer,
7603 if (bypass_param < 0) 7603 if (bypass_param < 0)
7604 return -EINVAL; 7604 return -EINVAL;
7605 7605
7606 set_dis_bypass_fn(PDE(file_inode(file))->data, bypass_param); 7606 set_dis_bypass_fn(PDE_DATA(file_inode(file)), bypass_param);
7607 return count; 7607 return count;
7608} 7608}
7609static int show_dis_bypass(struct seq_file *m, void *v) 7609static int show_dis_bypass(struct seq_file *m, void *v)
@@ -7627,7 +7627,7 @@ static ssize_t dis_tap_write(struct file *file, const char __user *buffer,
7627 if (tap_param < 0) 7627 if (tap_param < 0)
7628 return -EINVAL; 7628 return -EINVAL;
7629 7629
7630 set_dis_tap_fn(PDE(file_inode(file))->data, tap_param); 7630 set_dis_tap_fn(PDE_DATA(file_inode(file)), tap_param);
7631 return count; 7631 return count;
7632} 7632}
7633static int show_dis_tap(struct seq_file *m, void *v) 7633static int show_dis_tap(struct seq_file *m, void *v)
@@ -7651,7 +7651,7 @@ static ssize_t dis_disc_write(struct file *file, const char __user *buffer,
7651 if (tap_param < 0) 7651 if (tap_param < 0)
7652 return -EINVAL; 7652 return -EINVAL;
7653 7653
7654 set_dis_disc_fn(PDE(file_inode(file))->data, tap_param); 7654 set_dis_disc_fn(PDE_DATA(file_inode(file)), tap_param);
7655 return count; 7655 return count;
7656} 7656}
7657static int show_dis_disc(struct seq_file *m, void *v) 7657static int show_dis_disc(struct seq_file *m, void *v)
@@ -7675,7 +7675,7 @@ static ssize_t bypass_pwup_write(struct file *file, const char __user *buffer,
7675 if (bypass_param < 0) 7675 if (bypass_param < 0)
7676 return -EINVAL; 7676 return -EINVAL;
7677 7677
7678 set_bypass_pwup_fn(PDE(file_inode(file))->data, bypass_param); 7678 set_bypass_pwup_fn(PDE_DATA(file_inode(file)), bypass_param);
7679 return count; 7679 return count;
7680} 7680}
7681static int show_bypass_pwup(struct seq_file *m, void *v) 7681static int show_bypass_pwup(struct seq_file *m, void *v)
@@ -7699,7 +7699,7 @@ static ssize_t bypass_pwoff_write(struct file *file, const char __user *buffer,
7699 if (bypass_param < 0) 7699 if (bypass_param < 0)
7700 return -EINVAL; 7700 return -EINVAL;
7701 7701
7702 set_bypass_pwoff_fn(PDE(file_inode(file))->data, bypass_param); 7702 set_bypass_pwoff_fn(PDE_DATA(file_inode(file)), bypass_param);
7703 return count; 7703 return count;
7704} 7704}
7705static int show_bypass_pwoff(struct seq_file *m, void *v) 7705static int show_bypass_pwoff(struct seq_file *m, void *v)
@@ -7723,7 +7723,7 @@ static ssize_t tap_pwup_write(struct file *file, const char __user *buffer,
7723 if (tap_param < 0) 7723 if (tap_param < 0)
7724 return -EINVAL; 7724 return -EINVAL;
7725 7725
7726 set_tap_pwup_fn(PDE(file_inode(file))->data, tap_param); 7726 set_tap_pwup_fn(PDE_DATA(file_inode(file)), tap_param);
7727 return count; 7727 return count;
7728} 7728}
7729static int show_tap_pwup(struct seq_file *m, void *v) 7729static int show_tap_pwup(struct seq_file *m, void *v)
@@ -7747,7 +7747,7 @@ static ssize_t disc_pwup_write(struct file *file, const char __user *buffer,
7747 if (tap_param < 0) 7747 if (tap_param < 0)
7748 return -EINVAL; 7748 return -EINVAL;
7749 7749
7750 set_disc_pwup_fn(PDE(file_inode(file))->data, tap_param); 7750 set_disc_pwup_fn(PDE_DATA(file_inode(file)), tap_param);
7751 return count; 7751 return count;
7752} 7752}
7753static int show_disc_pwup(struct seq_file *m, void *v) 7753static int show_disc_pwup(struct seq_file *m, void *v)
@@ -7771,7 +7771,7 @@ static ssize_t std_nic_write(struct file *file, const char __user *buffer,
7771 if (bypass_param < 0) 7771 if (bypass_param < 0)
7772 return -EINVAL; 7772 return -EINVAL;
7773 7773
7774 set_std_nic_fn(PDE(file_inode(file))->data, bypass_param); 7774 set_std_nic_fn(PDE_DATA(file_inode(file)), bypass_param);
7775 return count; 7775 return count;
7776} 7776}
7777static int show_std_nic(struct seq_file *m, void *v) 7777static int show_std_nic(struct seq_file *m, void *v)
@@ -7812,7 +7812,7 @@ static ssize_t wd_exp_mode_write(struct file *file, const char __user *buffer,
7812 else if (strcmp(kbuf, "disc") == 0) 7812 else if (strcmp(kbuf, "disc") == 0)
7813 bypass_param = 2; 7813 bypass_param = 2;
7814 7814
7815 set_wd_exp_mode_fn(PDE(file_inode(file))->data, bypass_param); 7815 set_wd_exp_mode_fn(PDE_DATA(file_inode(file)), bypass_param);
7816 7816
7817 return count; 7817 return count;
7818} 7818}
@@ -7839,7 +7839,7 @@ static ssize_t wd_autoreset_write(struct file *file, const char __user *buffer,
7839 int ret = kstrtoint_from_user(buffer, count, 10, &timeout); 7839 int ret = kstrtoint_from_user(buffer, count, 10, &timeout);
7840 if (ret) 7840 if (ret)
7841 return ret; 7841 return ret;
7842 set_wd_autoreset_fn(PDE(file_inode(file))->data, timeout); 7842 set_wd_autoreset_fn(PDE_DATA(file_inode(file)), timeout);
7843 return count; 7843 return count;
7844} 7844}
7845static int show_wd_autoreset(struct seq_file *m, void *v) 7845static int show_wd_autoreset(struct seq_file *m, void *v)
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index a400002dfa84..19cc749f8386 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -1711,7 +1711,7 @@ static int uart_proc_show(struct seq_file *m, void *v)
1711 1711
1712static int uart_proc_open(struct inode *inode, struct file *file) 1712static int uart_proc_open(struct inode *inode, struct file *file)
1713{ 1713{
1714 return single_open(file, uart_proc_show, PDE(inode)->data); 1714 return single_open(file, uart_proc_show, PDE_DATA(inode));
1715} 1715}
1716 1716
1717static const struct file_operations uart_proc_fops = { 1717static const struct file_operations uart_proc_fops = {
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index 45dd2929a671..88966e0508a5 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -221,7 +221,7 @@ static int proc_udc_show(struct seq_file *s, void *unused)
221 221
222static int proc_udc_open(struct inode *inode, struct file *file) 222static int proc_udc_open(struct inode *inode, struct file *file)
223{ 223{
224 return single_open(file, proc_udc_show, PDE(inode)->data); 224 return single_open(file, proc_udc_show, PDE_DATA(inode));
225} 225}
226 226
227static const struct file_operations proc_ops = { 227static const struct file_operations proc_ops = {
diff --git a/drivers/usb/gadget/lpc32xx_udc.c b/drivers/usb/gadget/lpc32xx_udc.c
index aa04089d6899..1049d3745d7a 100644
--- a/drivers/usb/gadget/lpc32xx_udc.c
+++ b/drivers/usb/gadget/lpc32xx_udc.c
@@ -565,7 +565,7 @@ static int proc_udc_show(struct seq_file *s, void *unused)
565 565
566static int proc_udc_open(struct inode *inode, struct file *file) 566static int proc_udc_open(struct inode *inode, struct file *file)
567{ 567{
568 return single_open(file, proc_udc_show, PDE(inode)->data); 568 return single_open(file, proc_udc_show, PDE_DATA(inode));
569} 569}
570 570
571static const struct file_operations proc_ops = { 571static const struct file_operations proc_ops = {
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c
index d9297eebbf73..1e4cfb05f70b 100644
--- a/drivers/usb/gadget/rndis.c
+++ b/drivers/usb/gadget/rndis.c
@@ -1065,7 +1065,7 @@ static int rndis_proc_show(struct seq_file *m, void *v)
1065static ssize_t rndis_proc_write(struct file *file, const char __user *buffer, 1065static ssize_t rndis_proc_write(struct file *file, const char __user *buffer,
1066 size_t count, loff_t *ppos) 1066 size_t count, loff_t *ppos)
1067{ 1067{
1068 rndis_params *p = PDE(file_inode(file))->data; 1068 rndis_params *p = PDE_DATA(file_inode(file));
1069 u32 speed = 0; 1069 u32 speed = 0;
1070 int i, fl_speed = 0; 1070 int i, fl_speed = 0;
1071 1071
@@ -1109,7 +1109,7 @@ static ssize_t rndis_proc_write(struct file *file, const char __user *buffer,
1109 1109
1110static int rndis_proc_open(struct inode *inode, struct file *file) 1110static int rndis_proc_open(struct inode *inode, struct file *file)
1111{ 1111{
1112 return single_open(file, rndis_proc_show, PDE(inode)->data); 1112 return single_open(file, rndis_proc_show, PDE_DATA(inode));
1113} 1113}
1114 1114
1115static const struct file_operations rndis_proc_fops = { 1115static const struct file_operations rndis_proc_fops = {
diff --git a/drivers/usb/host/isp1362-hcd.c b/drivers/usb/host/isp1362-hcd.c
index 9137caadb1c8..b04e8ece4d35 100644
--- a/drivers/usb/host/isp1362-hcd.c
+++ b/drivers/usb/host/isp1362-hcd.c
@@ -2175,7 +2175,7 @@ static int proc_isp1362_show(struct seq_file *s, void *unused)
2175 2175
2176static int proc_isp1362_open(struct inode *inode, struct file *file) 2176static int proc_isp1362_open(struct inode *inode, struct file *file)
2177{ 2177{
2178 return single_open(file, proc_isp1362_show, PDE(inode)->data); 2178 return single_open(file, proc_isp1362_show, PDE_DATA(inode));
2179} 2179}
2180 2180
2181static const struct file_operations proc_ops = { 2181static const struct file_operations proc_ops = {
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
index d62f0404baaa..313d0bbfff29 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
@@ -1494,7 +1494,7 @@ static int proc_sl811h_show(struct seq_file *s, void *unused)
1494 1494
1495static int proc_sl811h_open(struct inode *inode, struct file *file) 1495static int proc_sl811h_open(struct inode *inode, struct file *file)
1496{ 1496{
1497 return single_open(file, proc_sl811h_show, PDE(inode)->data); 1497 return single_open(file, proc_sl811h_show, PDE_DATA(inode));
1498} 1498}
1499 1499
1500static const struct file_operations proc_ops = { 1500static const struct file_operations proc_ops = {
diff --git a/drivers/video/bfin_adv7393fb.c b/drivers/video/bfin_adv7393fb.c
index b65c1f9dc154..a54f7f7d763b 100644
--- a/drivers/video/bfin_adv7393fb.c
+++ b/drivers/video/bfin_adv7393fb.c
@@ -349,7 +349,7 @@ static ssize_t
349adv7393_write_proc(struct file *file, const char __user * buffer, 349adv7393_write_proc(struct file *file, const char __user * buffer,
350 size_t count, loff_t *ppos) 350 size_t count, loff_t *ppos)
351{ 351{
352 struct adv7393fb_device *fbdev = PDE(file_inode(file))->data; 352 struct adv7393fb_device *fbdev = PDE_DATA(file_inode(file));
353 unsigned int val; 353 unsigned int val;
354 int ret; 354 int ret;
355 355
diff --git a/drivers/zorro/proc.c b/drivers/zorro/proc.c
index 73b33837e12c..6d3a602c004b 100644
--- a/drivers/zorro/proc.c
+++ b/drivers/zorro/proc.c
@@ -47,9 +47,7 @@ proc_bus_zorro_lseek(struct file *file, loff_t off, int whence)
47static ssize_t 47static ssize_t
48proc_bus_zorro_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) 48proc_bus_zorro_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos)
49{ 49{
50 struct inode *ino = file_inode(file); 50 struct zorro_dev *z = PDE_DATA(file_inode(file));
51 struct proc_dir_entry *dp = PDE(ino);
52 struct zorro_dev *z = dp->data;
53 struct ConfigDev cd; 51 struct ConfigDev cd;
54 loff_t pos = *ppos; 52 loff_t pos = *ppos;
55 53
diff --git a/fs/afs/proc.c b/fs/afs/proc.c
index 096b23f821a1..526e4bbbde59 100644
--- a/fs/afs/proc.c
+++ b/fs/afs/proc.c
@@ -190,7 +190,7 @@ static int afs_proc_cells_open(struct inode *inode, struct file *file)
190 return ret; 190 return ret;
191 191
192 m = file->private_data; 192 m = file->private_data;
193 m->private = PDE(inode)->data; 193 m->private = PDE_DATA(inode);
194 194
195 return 0; 195 return 0;
196} 196}
@@ -448,7 +448,7 @@ static int afs_proc_cell_volumes_open(struct inode *inode, struct file *file)
448 struct seq_file *m; 448 struct seq_file *m;
449 int ret; 449 int ret;
450 450
451 cell = PDE(inode)->data; 451 cell = PDE_DATA(inode);
452 if (!cell) 452 if (!cell)
453 return -ENOENT; 453 return -ENOENT;
454 454
@@ -554,7 +554,7 @@ static int afs_proc_cell_vlservers_open(struct inode *inode, struct file *file)
554 struct seq_file *m; 554 struct seq_file *m;
555 int ret; 555 int ret;
556 556
557 cell = PDE(inode)->data; 557 cell = PDE_DATA(inode);
558 if (!cell) 558 if (!cell)
559 return -ENOENT; 559 return -ENOENT;
560 560
@@ -659,7 +659,7 @@ static int afs_proc_cell_servers_open(struct inode *inode, struct file *file)
659 struct seq_file *m; 659 struct seq_file *m;
660 int ret; 660 int ret;
661 661
662 cell = PDE(inode)->data; 662 cell = PDE_DATA(inode);
663 if (!cell) 663 if (!cell)
664 return -ENOENT; 664 return -ENOENT;
665 665
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index ee6614bdb639..28e421c208a5 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2149,7 +2149,7 @@ static const struct seq_operations ext4_mb_seq_groups_ops = {
2149 2149
2150static int ext4_mb_seq_groups_open(struct inode *inode, struct file *file) 2150static int ext4_mb_seq_groups_open(struct inode *inode, struct file *file)
2151{ 2151{
2152 struct super_block *sb = PDE(inode)->data; 2152 struct super_block *sb = PDE_DATA(inode);
2153 int rc; 2153 int rc;
2154 2154
2155 rc = seq_open(file, &ext4_mb_seq_groups_ops); 2155 rc = seq_open(file, &ext4_mb_seq_groups_ops);
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 5d6d53578124..c65510548355 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1802,7 +1802,7 @@ static int options_seq_show(struct seq_file *seq, void *offset)
1802 1802
1803static int options_open_fs(struct inode *inode, struct file *file) 1803static int options_open_fs(struct inode *inode, struct file *file)
1804{ 1804{
1805 return single_open(file, options_seq_show, PDE(inode)->data); 1805 return single_open(file, options_seq_show, PDE_DATA(inode));
1806} 1806}
1807 1807
1808static const struct file_operations ext4_seq_options_fops = { 1808static const struct file_operations ext4_seq_options_fops = {
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index ed10991ab006..154592ea5632 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -950,7 +950,7 @@ static const struct seq_operations jbd2_seq_info_ops = {
950 950
951static int jbd2_seq_info_open(struct inode *inode, struct file *file) 951static int jbd2_seq_info_open(struct inode *inode, struct file *file)
952{ 952{
953 journal_t *journal = PDE(inode)->data; 953 journal_t *journal = PDE_DATA(inode);
954 struct jbd2_stats_proc_session *s; 954 struct jbd2_stats_proc_session *s;
955 int rc, size; 955 int rc, size;
956 956
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index 51fcb201e289..c0ad720c37b9 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -346,7 +346,7 @@ void proc_free_inum(unsigned int inum)
346 346
347static void *proc_follow_link(struct dentry *dentry, struct nameidata *nd) 347static void *proc_follow_link(struct dentry *dentry, struct nameidata *nd)
348{ 348{
349 nd_set_link(nd, PDE(dentry->d_inode)->data); 349 nd_set_link(nd, PDE_DATA(dentry->d_inode));
350 return NULL; 350 return NULL;
351} 351}
352 352
diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
index 30b590f5bd35..e0043c7e7ab7 100644
--- a/fs/proc/proc_devtree.c
+++ b/fs/proc/proc_devtree.c
@@ -41,7 +41,7 @@ static int property_proc_show(struct seq_file *m, void *v)
41 41
42static int property_proc_open(struct inode *inode, struct file *file) 42static int property_proc_open(struct inode *inode, struct file *file)
43{ 43{
44 return single_open(file, property_proc_show, PDE(inode)->data); 44 return single_open(file, property_proc_show, PDE_DATA(inode));
45} 45}
46 46
47static const struct file_operations property_proc_fops = { 47static const struct file_operations property_proc_fops = {
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 4f4137a0bd8a..5ae73e273e7e 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -306,6 +306,11 @@ static inline struct proc_dir_entry *PDE(const struct inode *inode)
306 return PROC_I(inode)->pde; 306 return PROC_I(inode)->pde;
307} 307}
308 308
309static inline void *PDE_DATA(const struct inode *inode)
310{
311 return PROC_I(inode)->pde->data;
312}
313
309static inline struct net *PDE_NET(struct proc_dir_entry *pde) 314static inline struct net *PDE_NET(struct proc_dir_entry *pde)
310{ 315{
311 return pde->parent->data; 316 return pde->parent->data;
diff --git a/ipc/util.c b/ipc/util.c
index 464a8abd779f..b6db68131a0e 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -964,7 +964,7 @@ static int sysvipc_proc_open(struct inode *inode, struct file *file)
964 seq = file->private_data; 964 seq = file->private_data;
965 seq->private = iter; 965 seq->private = iter;
966 966
967 iter->iface = PDE(inode)->data; 967 iter->iface = PDE_DATA(inode);
968 iter->ns = get_ipc_ns(current->nsproxy->ipc_ns); 968 iter->ns = get_ipc_ns(current->nsproxy->ipc_ns);
969out: 969out:
970 return ret; 970 return ret;
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)
76static ssize_t write_irq_affinity(int type, struct file *file, 76static 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
132static int irq_affinity_proc_open(struct inode *inode, struct file *file) 132static 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
137static int irq_affinity_list_proc_open(struct inode *inode, struct file *file) 137static 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
142static int irq_affinity_hint_proc_open(struct inode *inode, struct file *file) 142static 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
147static const struct file_operations irq_affinity_proc_fops = { 147static const struct file_operations irq_affinity_proc_fops = {
@@ -212,7 +212,7 @@ out:
212 212
213static int default_affinity_open(struct inode *inode, struct file *file) 213static 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
218static const struct file_operations default_affinity_proc_fops = { 218static 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
234static int irq_node_proc_open(struct inode *inode, struct file *file) 234static 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
239static const struct file_operations irq_node_proc_fops = { 239static 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
257static int irq_spurious_proc_open(struct inode *inode, struct file *file) 257static 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
262static const struct file_operations irq_spurious_proc_fops = { 262static const struct file_operations irq_spurious_proc_fops = {
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c
index dc526ec965e4..959ddbb0ca4d 100644
--- a/net/8021q/vlanproc.c
+++ b/net/8021q/vlanproc.c
@@ -93,7 +93,7 @@ static const struct file_operations vlan_fops = {
93 93
94static int vlandev_seq_open(struct inode *inode, struct file *file) 94static int vlandev_seq_open(struct inode *inode, struct file *file)
95{ 95{
96 return single_open(file, vlandev_seq_show, PDE(inode)->data); 96 return single_open(file, vlandev_seq_show, PDE_DATA(inode));
97} 97}
98 98
99static const struct file_operations vlandev_fops = { 99static const struct file_operations vlandev_fops = {
diff --git a/net/atm/proc.c b/net/atm/proc.c
index 6ac35ff0d6b9..bbb6461a4b7f 100644
--- a/net/atm/proc.c
+++ b/net/atm/proc.c
@@ -385,7 +385,7 @@ static ssize_t proc_dev_atm_read(struct file *file, char __user *buf,
385 page = get_zeroed_page(GFP_KERNEL); 385 page = get_zeroed_page(GFP_KERNEL);
386 if (!page) 386 if (!page)
387 return -ENOMEM; 387 return -ENOMEM;
388 dev = PDE(file_inode(file))->data; 388 dev = PDE_DATA(file_inode(file));
389 if (!dev->ops->proc_read) 389 if (!dev->ops->proc_read)
390 length = -EINVAL; 390 length = -EINVAL;
391 else { 391 else {
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
index d3ee69b35a78..82040e46b24b 100644
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -617,7 +617,7 @@ static int bt_seq_open(struct inode *inode, struct file *file)
617 struct bt_sock_list *sk_list; 617 struct bt_sock_list *sk_list;
618 struct bt_seq_state *s; 618 struct bt_seq_state *s;
619 619
620 sk_list = PDE(inode)->data; 620 sk_list = PDE_DATA(inode);
621 s = __seq_open_private(file, &bt_seq_ops, 621 s = __seq_open_private(file, &bt_seq_ops,
622 sizeof(struct bt_seq_state)); 622 sizeof(struct bt_seq_state));
623 if (!s) 623 if (!s)
diff --git a/net/bluetooth/cmtp/capi.c b/net/bluetooth/cmtp/capi.c
index a4a9d4b6816c..cd75e4d64b90 100644
--- a/net/bluetooth/cmtp/capi.c
+++ b/net/bluetooth/cmtp/capi.c
@@ -539,7 +539,7 @@ static int cmtp_proc_show(struct seq_file *m, void *v)
539 539
540static int cmtp_proc_open(struct inode *inode, struct file *file) 540static int cmtp_proc_open(struct inode *inode, struct file *file)
541{ 541{
542 return single_open(file, cmtp_proc_show, PDE(inode)->data); 542 return single_open(file, cmtp_proc_show, PDE_DATA(inode));
543} 543}
544 544
545static const struct file_operations cmtp_proc_fops = { 545static const struct file_operations cmtp_proc_fops = {
diff --git a/net/can/bcm.c b/net/can/bcm.c
index 5dcb20076f39..8f113e6ff327 100644
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -226,7 +226,7 @@ static int bcm_proc_show(struct seq_file *m, void *v)
226 226
227static int bcm_proc_open(struct inode *inode, struct file *file) 227static int bcm_proc_open(struct inode *inode, struct file *file)
228{ 228{
229 return single_open(file, bcm_proc_show, PDE(inode)->data); 229 return single_open(file, bcm_proc_show, PDE_DATA(inode));
230} 230}
231 231
232static const struct file_operations bcm_proc_fops = { 232static const struct file_operations bcm_proc_fops = {
diff --git a/net/can/proc.c b/net/can/proc.c
index 1ab8c888f102..b543470c8f8b 100644
--- a/net/can/proc.c
+++ b/net/can/proc.c
@@ -378,7 +378,7 @@ static int can_rcvlist_proc_show(struct seq_file *m, void *v)
378 378
379static int can_rcvlist_proc_open(struct inode *inode, struct file *file) 379static int can_rcvlist_proc_open(struct inode *inode, struct file *file)
380{ 380{
381 return single_open(file, can_rcvlist_proc_show, PDE(inode)->data); 381 return single_open(file, can_rcvlist_proc_show, PDE_DATA(inode));
382} 382}
383 383
384static const struct file_operations can_rcvlist_proc_fops = { 384static const struct file_operations can_rcvlist_proc_fops = {
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 3863b8f639c5..537301a2c31f 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2714,7 +2714,7 @@ static int neigh_stat_seq_open(struct inode *inode, struct file *file)
2714 2714
2715 if (!ret) { 2715 if (!ret) {
2716 struct seq_file *sf = file->private_data; 2716 struct seq_file *sf = file->private_data;
2717 sf->private = PDE(inode)->data; 2717 sf->private = PDE_DATA(inode);
2718 } 2718 }
2719 return ret; 2719 return ret;
2720}; 2720};
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 6048fc1da1c2..f6af4fe59f2e 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -508,7 +508,7 @@ out:
508 508
509static int pgctrl_open(struct inode *inode, struct file *file) 509static int pgctrl_open(struct inode *inode, struct file *file)
510{ 510{
511 return single_open(file, pgctrl_show, PDE(inode)->data); 511 return single_open(file, pgctrl_show, PDE_DATA(inode));
512} 512}
513 513
514static const struct file_operations pktgen_fops = { 514static const struct file_operations pktgen_fops = {
@@ -1685,7 +1685,7 @@ static ssize_t pktgen_if_write(struct file *file,
1685 1685
1686static int pktgen_if_open(struct inode *inode, struct file *file) 1686static int pktgen_if_open(struct inode *inode, struct file *file)
1687{ 1687{
1688 return single_open(file, pktgen_if_show, PDE(inode)->data); 1688 return single_open(file, pktgen_if_show, PDE_DATA(inode));
1689} 1689}
1690 1690
1691static const struct file_operations pktgen_if_fops = { 1691static const struct file_operations pktgen_if_fops = {
@@ -1823,7 +1823,7 @@ out:
1823 1823
1824static int pktgen_thread_open(struct inode *inode, struct file *file) 1824static int pktgen_thread_open(struct inode *inode, struct file *file)
1825{ 1825{
1826 return single_open(file, pktgen_thread_show, PDE(inode)->data); 1826 return single_open(file, pktgen_thread_show, PDE_DATA(inode));
1827} 1827}
1828 1828
1829static const struct file_operations pktgen_thread_fops = { 1829static const struct file_operations pktgen_thread_fops = {
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c
index 5852b249054f..e4738fef070a 100644
--- a/net/ipv4/netfilter/ipt_CLUSTERIP.c
+++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c
@@ -631,7 +631,7 @@ static int clusterip_proc_open(struct inode *inode, struct file *file)
631 631
632 if (!ret) { 632 if (!ret) {
633 struct seq_file *sf = file->private_data; 633 struct seq_file *sf = file->private_data;
634 struct clusterip_config *c = PDE(inode)->data; 634 struct clusterip_config *c = PDE_DATA(inode);
635 635
636 sf->private = c; 636 sf->private = c;
637 637
@@ -643,7 +643,7 @@ static int clusterip_proc_open(struct inode *inode, struct file *file)
643 643
644static int clusterip_proc_release(struct inode *inode, struct file *file) 644static int clusterip_proc_release(struct inode *inode, struct file *file)
645{ 645{
646 struct clusterip_config *c = PDE(inode)->data; 646 struct clusterip_config *c = PDE_DATA(inode);
647 int ret; 647 int ret;
648 648
649 ret = seq_release(inode, file); 649 ret = seq_release(inode, file);
@@ -657,7 +657,7 @@ static int clusterip_proc_release(struct inode *inode, struct file *file)
657static ssize_t clusterip_proc_write(struct file *file, const char __user *input, 657static ssize_t clusterip_proc_write(struct file *file, const char __user *input,
658 size_t size, loff_t *ofs) 658 size_t size, loff_t *ofs)
659{ 659{
660 struct clusterip_config *c = PDE(file_inode(file))->data; 660 struct clusterip_config *c = PDE_DATA(file_inode(file));
661#define PROC_WRITELEN 10 661#define PROC_WRITELEN 10
662 char buffer[PROC_WRITELEN+1]; 662 char buffer[PROC_WRITELEN+1];
663 unsigned long nodenum; 663 unsigned long nodenum;
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index d09203c63264..fc55a1c79bd9 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -2580,7 +2580,7 @@ static void tcp_seq_stop(struct seq_file *seq, void *v)
2580 2580
2581int tcp_seq_open(struct inode *inode, struct file *file) 2581int tcp_seq_open(struct inode *inode, struct file *file)
2582{ 2582{
2583 struct tcp_seq_afinfo *afinfo = PDE(inode)->data; 2583 struct tcp_seq_afinfo *afinfo = PDE_DATA(inode);
2584 struct tcp_iter_state *s; 2584 struct tcp_iter_state *s;
2585 int err; 2585 int err;
2586 2586
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 0a073a263720..d27264318315 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -2093,7 +2093,7 @@ static void udp_seq_stop(struct seq_file *seq, void *v)
2093 2093
2094int udp_seq_open(struct inode *inode, struct file *file) 2094int udp_seq_open(struct inode *inode, struct file *file)
2095{ 2095{
2096 struct udp_seq_afinfo *afinfo = PDE(inode)->data; 2096 struct udp_seq_afinfo *afinfo = PDE_DATA(inode);
2097 struct udp_iter_state *s; 2097 struct udp_iter_state *s;
2098 int err; 2098 int err;
2099 2099
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c
index bbbe53a99b57..7ea6e180139c 100644
--- a/net/ipv6/proc.c
+++ b/net/ipv6/proc.c
@@ -247,7 +247,7 @@ static int snmp6_dev_seq_show(struct seq_file *seq, void *v)
247 247
248static int snmp6_dev_seq_open(struct inode *inode, struct file *file) 248static int snmp6_dev_seq_open(struct inode *inode, struct file *file)
249{ 249{
250 return single_open(file, snmp6_dev_seq_show, PDE(inode)->data); 250 return single_open(file, snmp6_dev_seq_show, PDE_DATA(inode));
251} 251}
252 252
253static const struct file_operations snmp6_dev_seq_fops = { 253static const struct file_operations snmp6_dev_seq_fops = {
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
index 686c7715d777..67fb7bff9bbc 100644
--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -999,7 +999,7 @@ static int xt_table_open(struct inode *inode, struct file *file)
999 sizeof(struct xt_names_priv)); 999 sizeof(struct xt_names_priv));
1000 if (!ret) { 1000 if (!ret) {
1001 priv = ((struct seq_file *)file->private_data)->private; 1001 priv = ((struct seq_file *)file->private_data)->private;
1002 priv->af = (unsigned long)PDE(inode)->data; 1002 priv->af = (unsigned long)PDE_DATA(inode);
1003 } 1003 }
1004 return ret; 1004 return ret;
1005} 1005}
@@ -1147,7 +1147,7 @@ static int xt_match_open(struct inode *inode, struct file *file)
1147 1147
1148 seq = file->private_data; 1148 seq = file->private_data;
1149 seq->private = trav; 1149 seq->private = trav;
1150 trav->nfproto = (unsigned long)PDE(inode)->data; 1150 trav->nfproto = (unsigned long)PDE_DATA(inode);
1151 return 0; 1151 return 0;
1152} 1152}
1153 1153
@@ -1211,7 +1211,7 @@ static int xt_target_open(struct inode *inode, struct file *file)
1211 1211
1212 seq = file->private_data; 1212 seq = file->private_data;
1213 seq->private = trav; 1213 seq->private = trav;
1214 trav->nfproto = (unsigned long)PDE(inode)->data; 1214 trav->nfproto = (unsigned long)PDE_DATA(inode);
1215 return 0; 1215 return 0;
1216} 1216}
1217 1217
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c
index f330e8beaf69..ebfad037b11f 100644
--- a/net/netfilter/xt_hashlimit.c
+++ b/net/netfilter/xt_hashlimit.c
@@ -841,7 +841,7 @@ static int dl_proc_open(struct inode *inode, struct file *file)
841 841
842 if (!ret) { 842 if (!ret) {
843 struct seq_file *sf = file->private_data; 843 struct seq_file *sf = file->private_data;
844 sf->private = PDE(inode)->data; 844 sf->private = PDE_DATA(inode);
845 } 845 }
846 return ret; 846 return ret;
847} 847}
diff --git a/net/netfilter/xt_recent.c b/net/netfilter/xt_recent.c
index d9cad315229d..3db2d387cf52 100644
--- a/net/netfilter/xt_recent.c
+++ b/net/netfilter/xt_recent.c
@@ -525,14 +525,13 @@ static const struct seq_operations recent_seq_ops = {
525 525
526static int recent_seq_open(struct inode *inode, struct file *file) 526static int recent_seq_open(struct inode *inode, struct file *file)
527{ 527{
528 struct proc_dir_entry *pde = PDE(inode);
529 struct recent_iter_state *st; 528 struct recent_iter_state *st;
530 529
531 st = __seq_open_private(file, &recent_seq_ops, sizeof(*st)); 530 st = __seq_open_private(file, &recent_seq_ops, sizeof(*st));
532 if (st == NULL) 531 if (st == NULL)
533 return -ENOMEM; 532 return -ENOMEM;
534 533
535 st->table = pde->data; 534 st->table = PDE_DATA(inode);
536 return 0; 535 return 0;
537} 536}
538 537
@@ -540,8 +539,7 @@ static ssize_t
540recent_mt_proc_write(struct file *file, const char __user *input, 539recent_mt_proc_write(struct file *file, const char __user *input,
541 size_t size, loff_t *loff) 540 size_t size, loff_t *loff)
542{ 541{
543 const struct proc_dir_entry *pde = PDE(file_inode(file)); 542 struct recent_table *t = PDE_DATA(file_inode(file));
544 struct recent_table *t = pde->data;
545 struct recent_entry *e; 543 struct recent_entry *e;
546 char buf[sizeof("+b335:1d35:1e55:dead:c0de:1715:5afe:c0de")]; 544 char buf[sizeof("+b335:1d35:1e55:dead:c0de:1715:5afe:c0de")];
547 const char *c = buf; 545 const char *c = buf;
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
index 25d58e766014..d9828b6799a3 100644
--- a/net/sunrpc/cache.c
+++ b/net/sunrpc/cache.c
@@ -1461,7 +1461,7 @@ static ssize_t write_flush(struct file *file, const char __user *buf,
1461static ssize_t cache_read_procfs(struct file *filp, char __user *buf, 1461static ssize_t cache_read_procfs(struct file *filp, char __user *buf,
1462 size_t count, loff_t *ppos) 1462 size_t count, loff_t *ppos)
1463{ 1463{
1464 struct cache_detail *cd = PDE(file_inode(filp))->data; 1464 struct cache_detail *cd = PDE_DATA(file_inode(filp));
1465 1465
1466 return cache_read(filp, buf, count, ppos, cd); 1466 return cache_read(filp, buf, count, ppos, cd);
1467} 1467}
@@ -1469,14 +1469,14 @@ static ssize_t cache_read_procfs(struct file *filp, char __user *buf,
1469static ssize_t cache_write_procfs(struct file *filp, const char __user *buf, 1469static ssize_t cache_write_procfs(struct file *filp, const char __user *buf,
1470 size_t count, loff_t *ppos) 1470 size_t count, loff_t *ppos)
1471{ 1471{
1472 struct cache_detail *cd = PDE(file_inode(filp))->data; 1472 struct cache_detail *cd = PDE_DATA(file_inode(filp));
1473 1473
1474 return cache_write(filp, buf, count, ppos, cd); 1474 return cache_write(filp, buf, count, ppos, cd);
1475} 1475}
1476 1476
1477static unsigned int cache_poll_procfs(struct file *filp, poll_table *wait) 1477static unsigned int cache_poll_procfs(struct file *filp, poll_table *wait)
1478{ 1478{
1479 struct cache_detail *cd = PDE(file_inode(filp))->data; 1479 struct cache_detail *cd = PDE_DATA(file_inode(filp));
1480 1480
1481 return cache_poll(filp, wait, cd); 1481 return cache_poll(filp, wait, cd);
1482} 1482}
@@ -1485,21 +1485,21 @@ static long cache_ioctl_procfs(struct file *filp,
1485 unsigned int cmd, unsigned long arg) 1485 unsigned int cmd, unsigned long arg)
1486{ 1486{
1487 struct inode *inode = file_inode(filp); 1487 struct inode *inode = file_inode(filp);
1488 struct cache_detail *cd = PDE(inode)->data; 1488 struct cache_detail *cd = PDE_DATA(inode);
1489 1489
1490 return cache_ioctl(inode, filp, cmd, arg, cd); 1490 return cache_ioctl(inode, filp, cmd, arg, cd);
1491} 1491}
1492 1492
1493static int cache_open_procfs(struct inode *inode, struct file *filp) 1493static int cache_open_procfs(struct inode *inode, struct file *filp)
1494{ 1494{
1495 struct cache_detail *cd = PDE(inode)->data; 1495 struct cache_detail *cd = PDE_DATA(inode);
1496 1496
1497 return cache_open(inode, filp, cd); 1497 return cache_open(inode, filp, cd);
1498} 1498}
1499 1499
1500static int cache_release_procfs(struct inode *inode, struct file *filp) 1500static int cache_release_procfs(struct inode *inode, struct file *filp)
1501{ 1501{
1502 struct cache_detail *cd = PDE(inode)->data; 1502 struct cache_detail *cd = PDE_DATA(inode);
1503 1503
1504 return cache_release(inode, filp, cd); 1504 return cache_release(inode, filp, cd);
1505} 1505}
@@ -1517,14 +1517,14 @@ static const struct file_operations cache_file_operations_procfs = {
1517 1517
1518static int content_open_procfs(struct inode *inode, struct file *filp) 1518static int content_open_procfs(struct inode *inode, struct file *filp)
1519{ 1519{
1520 struct cache_detail *cd = PDE(inode)->data; 1520 struct cache_detail *cd = PDE_DATA(inode);
1521 1521
1522 return content_open(inode, filp, cd); 1522 return content_open(inode, filp, cd);
1523} 1523}
1524 1524
1525static int content_release_procfs(struct inode *inode, struct file *filp) 1525static int content_release_procfs(struct inode *inode, struct file *filp)
1526{ 1526{
1527 struct cache_detail *cd = PDE(inode)->data; 1527 struct cache_detail *cd = PDE_DATA(inode);
1528 1528
1529 return content_release(inode, filp, cd); 1529 return content_release(inode, filp, cd);
1530} 1530}
@@ -1538,14 +1538,14 @@ static const struct file_operations content_file_operations_procfs = {
1538 1538
1539static int open_flush_procfs(struct inode *inode, struct file *filp) 1539static int open_flush_procfs(struct inode *inode, struct file *filp)
1540{ 1540{
1541 struct cache_detail *cd = PDE(inode)->data; 1541 struct cache_detail *cd = PDE_DATA(inode);
1542 1542
1543 return open_flush(inode, filp, cd); 1543 return open_flush(inode, filp, cd);
1544} 1544}
1545 1545
1546static int release_flush_procfs(struct inode *inode, struct file *filp) 1546static int release_flush_procfs(struct inode *inode, struct file *filp)
1547{ 1547{
1548 struct cache_detail *cd = PDE(inode)->data; 1548 struct cache_detail *cd = PDE_DATA(inode);
1549 1549
1550 return release_flush(inode, filp, cd); 1550 return release_flush(inode, filp, cd);
1551} 1551}
@@ -1553,7 +1553,7 @@ static int release_flush_procfs(struct inode *inode, struct file *filp)
1553static ssize_t read_flush_procfs(struct file *filp, char __user *buf, 1553static ssize_t read_flush_procfs(struct file *filp, char __user *buf,
1554 size_t count, loff_t *ppos) 1554 size_t count, loff_t *ppos)
1555{ 1555{
1556 struct cache_detail *cd = PDE(file_inode(filp))->data; 1556 struct cache_detail *cd = PDE_DATA(file_inode(filp));
1557 1557
1558 return read_flush(filp, buf, count, ppos, cd); 1558 return read_flush(filp, buf, count, ppos, cd);
1559} 1559}
@@ -1562,7 +1562,7 @@ static ssize_t write_flush_procfs(struct file *filp,
1562 const char __user *buf, 1562 const char __user *buf,
1563 size_t count, loff_t *ppos) 1563 size_t count, loff_t *ppos)
1564{ 1564{
1565 struct cache_detail *cd = PDE(file_inode(filp))->data; 1565 struct cache_detail *cd = PDE_DATA(file_inode(filp));
1566 1566
1567 return write_flush(filp, buf, count, ppos, cd); 1567 return write_flush(filp, buf, count, ppos, cd);
1568} 1568}
diff --git a/net/sunrpc/stats.c b/net/sunrpc/stats.c
index bc2068ee795b..21b75cb08c03 100644
--- a/net/sunrpc/stats.c
+++ b/net/sunrpc/stats.c
@@ -64,7 +64,7 @@ static int rpc_proc_show(struct seq_file *seq, void *v) {
64 64
65static int rpc_proc_open(struct inode *inode, struct file *file) 65static int rpc_proc_open(struct inode *inode, struct file *file)
66{ 66{
67 return single_open(file, rpc_proc_show, PDE(inode)->data); 67 return single_open(file, rpc_proc_show, PDE_DATA(inode));
68} 68}
69 69
70static const struct file_operations rpc_proc_fops = { 70static const struct file_operations rpc_proc_fops = {
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;