diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-03-31 18:16:14 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-09 14:13:32 -0400 |
commit | d9dda78bad879595d8c4220a067fc029d6484a16 (patch) | |
tree | 376c47ed566b719009e753e917104b150a639b11 /drivers | |
parent | 8510e30b46cd5467b2f930bef68a276dbc2c7d7c (diff) |
procfs: new helper - PDE_DATA(inode)
The only part of proc_dir_entry the code outside of fs/proc
really cares about is PDE(inode)->data. Provide a helper
for that; static inline for now, eventually will be moved
to fs/proc, along with the knowledge of struct proc_dir_entry
layout.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers')
57 files changed, 158 insertions, 202 deletions
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 | ||
195 | static int acpi_ac_open_fs(struct inode *inode, struct file *file) | 195 | static 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 | ||
200 | static int acpi_ac_add_fs(struct acpi_device *device) | 200 | static 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 | } \ |
930 | static int acpi_battery_##_name##_open_fs(struct inode *inode, struct file *file) \ | 930 | static 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 | ||
935 | DECLARE_FILE_FUNCTIONS(info); | 935 | DECLARE_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 | ||
129 | static int acpi_button_state_open_fs(struct inode *inode, struct file *file) | 129 | static 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 | ||
134 | static const struct file_operations acpi_button_state_fops = { | 134 | static 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 | ||
121 | static int acpi_system_alarm_open_fs(struct inode *inode, struct file *file) | 121 | static 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 | ||
126 | static int get_date_field(char **p, u32 * value) | 126 | static int get_date_field(char **p, u32 * value) |
@@ -397,7 +397,7 @@ static int | |||
397 | acpi_system_wakeup_device_open_fs(struct inode *inode, struct file *file) | 397 | acpi_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 | ||
403 | static const struct file_operations acpi_system_wakeup_device_fops = { | 403 | static 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 | ||
585 | static int acpi_battery_info_open_fs(struct inode *inode, struct file *file) | 585 | static 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 | ||
590 | static int acpi_battery_read_state(struct seq_file *seq, void *offset) | 590 | static 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 | ||
624 | static int acpi_battery_state_open_fs(struct inode *inode, struct file *file) | 624 | static 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 | ||
629 | static int acpi_battery_read_alarm(struct seq_file *seq, void *offset) | 629 | static 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 | ||
689 | static int acpi_battery_alarm_open_fs(struct inode *inode, struct file *file) | 689 | static 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 | ||
694 | static const struct file_operations acpi_battery_info_fops = { | 694 | static 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 | ||
737 | static int acpi_ac_state_open_fs(struct inode *inode, struct file *file) | 737 | static 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 | ||
742 | static const struct file_operations acpi_ac_state_fops = { | 742 | static 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 | ||
6474 | static int dac960_initial_status_proc_open(struct inode *inode, struct file *file) | 6474 | static 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 | ||
6479 | static const struct file_operations dac960_initial_status_proc_fops = { | 6479 | static 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 | ||
6520 | static int dac960_current_status_proc_open(struct inode *inode, struct file *file) | 6520 | static 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 | ||
6525 | static const struct file_operations dac960_current_status_proc_fops = { | 6525 | static 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 | ||
6541 | static int dac960_user_command_proc_open(struct inode *inode, struct file *file) | 6541 | static 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 | ||
6546 | static ssize_t dac960_user_command_proc_write(struct file *file, | 6546 | static 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 | ||
297 | static int ida_proc_open(struct inode *inode, struct file *file) | 297 | static 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 | ||
302 | static const struct file_operations ida_proc_fops = { | 302 | static 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) | |||
314 | static int drbd_proc_open(struct inode *inode, struct file *file) | 314 | static 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 | ||
2649 | static int pkt_seq_open(struct inode *inode, struct file *file) | 2649 | static 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 | ||
2654 | static const struct file_operations pkt_proc_fops = { | 2654 | static 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 | ||
526 | static int ps3vram_proc_open(struct inode *inode, struct file *file) | 526 | static 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 | ||
531 | static const struct file_operations ps3vram_proc_fops = { | 531 | static 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 | ||
1918 | static int smi_ipmb_proc_open(struct inode *inode, struct file *file) | 1918 | static 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 | ||
1923 | static const struct file_operations smi_ipmb_proc_ops = { | 1923 | static 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 | ||
1939 | static int smi_version_proc_open(struct inode *inode, struct file *file) | 1939 | static 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 | ||
1944 | static const struct file_operations smi_version_proc_ops = { | 1944 | static 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 | ||
2014 | static int smi_stats_proc_open(struct inode *inode, struct file *file) | 2014 | static 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 | ||
2019 | static const struct file_operations smi_stats_proc_ops = { | 2019 | static 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 | ||
2840 | static int smi_type_proc_open(struct inode *inode, struct file *file) | 2840 | static 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 | ||
2845 | static const struct file_operations smi_type_proc_ops = { | 2845 | static 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 | ||
2883 | static int smi_si_stats_proc_open(struct inode *inode, struct file *file) | 2883 | static 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 | ||
2888 | static const struct file_operations smi_si_stats_proc_ops = { | 2888 | static 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 | ||
2911 | static int smi_params_proc_open(struct inode *inode, struct file *file) | 2911 | static 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 | ||
2916 | static const struct file_operations smi_params_proc_ops = { | 2916 | static 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 | ||
64 | static int drm_proc_open(struct inode *inode, struct file *file) | 64 | static 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 | ||
1409 | static int idecd_capacity_proc_open(struct inode *inode, struct file *file) | 1409 | static 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 | ||
1414 | static const struct file_operations idecd_capacity_proc_fops = { | 1414 | static 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 | ||
54 | static int idedisk_cache_proc_open(struct inode *inode, struct file *file) | 54 | static 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 | ||
59 | static const struct file_operations idedisk_cache_proc_fops = { | 59 | static 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 | ||
75 | static int idedisk_capacity_proc_open(struct inode *inode, struct file *file) | 75 | static 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 | ||
80 | static const struct file_operations idedisk_capacity_proc_fops = { | 80 | static 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 | ||
116 | static int idedisk_sv_proc_open(struct inode *inode, struct file *file) | 116 | static 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 | ||
121 | static const struct file_operations idedisk_sv_proc_fops = { | 121 | static 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 | ||
134 | static int idedisk_st_proc_open(struct inode *inode, struct file *file) | 134 | static 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 | ||
139 | static const struct file_operations idedisk_st_proc_fops = { | 139 | static 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 | ||
16 | static int idefloppy_capacity_proc_open(struct inode *inode, struct file *file) | 16 | static 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 | ||
21 | static const struct file_operations idefloppy_capacity_proc_fops = { | 21 | static 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 | ||
59 | static int ide_imodel_proc_open(struct inode *inode, struct file *file) | 59 | static 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 | ||
64 | static const struct file_operations ide_imodel_proc_fops = { | 64 | static 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 | ||
83 | static int ide_mate_proc_open(struct inode *inode, struct file *file) | 83 | static 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 | ||
88 | static const struct file_operations ide_mate_proc_fops = { | 88 | static 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 | ||
104 | static int ide_channel_proc_open(struct inode *inode, struct file *file) | 104 | static 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 | ||
109 | static const struct file_operations ide_channel_proc_fops = { | 109 | static 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 | ||
144 | static int ide_identify_proc_open(struct inode *inode, struct file *file) | 144 | static 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 | ||
149 | static const struct file_operations ide_identify_proc_fops = { | 149 | static 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 | ||
326 | static int ide_settings_proc_open(struct inode *inode, struct file *file) | 326 | static 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) | |||
333 | static ssize_t ide_settings_proc_write(struct file *file, const char __user *buffer, | 333 | static 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 | ||
475 | static int ide_geometry_proc_open(struct inode *inode, struct file *file) | 475 | static 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 | ||
480 | const struct file_operations ide_geometry_proc_fops = { | 480 | const 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 | ||
498 | static int ide_dmodel_proc_open(struct inode *inode, struct file *file) | 498 | static 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 | ||
503 | static const struct file_operations ide_dmodel_proc_fops = { | 503 | static 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 | ||
526 | static int ide_driver_proc_open(struct inode *inode, struct file *file) | 526 | static 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 | ||
531 | static int ide_replace_subdriver(ide_drive_t *drive, const char *driver) | 531 | static 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) | |||
558 | static ssize_t ide_driver_proc_write(struct file *file, const char __user *buffer, | 558 | static 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 | ||
602 | static int ide_media_proc_open(struct inode *inode, struct file *file) | 602 | static 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 | ||
607 | static const struct file_operations ide_media_proc_fops = { | 607 | static 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 | ||
1848 | static int idetape_name_proc_open(struct inode *inode, struct file *file) | 1848 | static 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 | ||
1853 | static const struct file_operations idetape_name_proc_fops = { | 1853 | static 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 | ||
2335 | static int gigaset_proc_open(struct inode *inode, struct file *file) | 2335 | static 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 | ||
2340 | static const struct file_operations gigaset_proc_fops = { | 2340 | static 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 | ||
703 | static int b1ctl_proc_open(struct inode *inode, struct file *file) | 703 | static 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 | ||
708 | const struct file_operations b1ctl_proc_fops = { | 708 | const 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 | ||
945 | static int b1dmactl_proc_open(struct inode *inode, struct file *file) | 945 | static 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 | ||
950 | const struct file_operations b1dmactl_proc_fops = { | 950 | const 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 | ||
1130 | static int c4_proc_open(struct inode *inode, struct file *file) | 1130 | static 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 | ||
1135 | static const struct file_operations c4_proc_fops = { | 1135 | static 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) | |||
145 | static ssize_t grp_opt_proc_write(struct file *file, const char __user *buffer, | 145 | static 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, | |||
172 | static ssize_t d_l1_down_proc_write(struct file *file, const char __user *buffer, | 172 | static 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 | ||
211 | static int d_l1_down_proc_open(struct inode *inode, struct file *file) | 211 | static 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 | ||
216 | static const struct file_operations d_l1_down_proc_fops = { | 216 | static 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 | ||
237 | static int grp_opt_proc_open(struct inode *inode, struct file *file) | 237 | static 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 | ||
242 | static const struct file_operations grp_opt_proc_fops = { | 242 | static const struct file_operations grp_opt_proc_fops = { |
@@ -251,7 +251,7 @@ static const struct file_operations grp_opt_proc_fops = { | |||
251 | static ssize_t info_proc_write(struct file *file, const char __user *buffer, | 251 | static 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 | ||
336 | static int info_proc_open(struct inode *inode, struct file *file) | 336 | static 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 | ||
341 | static const struct file_operations info_proc_fops = { | 341 | static 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 | ||
470 | static int hycapi_proc_open(struct inode *inode, struct file *file) | 470 | static 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 | ||
475 | static const struct file_operations hycapi_proc_fops = { | 475 | static 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) | |||
202 | static int | 202 | static int |
203 | hysdn_log_open(struct inode *ino, struct file *filep) | 203 | hysdn_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 | |||
286 | hysdn_log_poll(struct file *file, poll_table *wait) | 286 | hysdn_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 | ||
870 | static int pmu_battery_proc_open(struct inode *inode, struct file *file) | 870 | static 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 | ||
875 | static const struct file_operations pmu_battery_proc_fops = { | 875 | static 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 | ||
131 | static int zoran_open(struct inode *inode, struct file *file) | 131 | static 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 | ||
137 | static ssize_t zoran_write(struct file *file, const char __user *buffer, | 137 | static 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 | ||
6657 | static int mpt_summary_proc_open(struct inode *inode, struct file *file) | 6657 | static 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 | ||
6662 | static const struct file_operations mpt_summary_proc_fops = { | 6662 | static 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 | ||
6806 | static int mpt_iocinfo_proc_open(struct inode *inode, struct file *file) | 6806 | static 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 | ||
6811 | static const struct file_operations mpt_iocinfo_proc_fops = { | 6811 | static 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 | ||
1600 | static int i2o_seq_open_hrt(struct inode *inode, struct file *file) | 1600 | static 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 | ||
1605 | static int i2o_seq_open_lct(struct inode *inode, struct file *file) | 1605 | static 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 | ||
1610 | static int i2o_seq_open_status(struct inode *inode, struct file *file) | 1610 | static 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 | ||
1615 | static int i2o_seq_open_hw(struct inode *inode, struct file *file) | 1615 | static 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 | ||
1620 | static int i2o_seq_open_ddm_table(struct inode *inode, struct file *file) | 1620 | static 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 | ||
1625 | static int i2o_seq_open_driver_store(struct inode *inode, struct file *file) | 1625 | static 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 | ||
1630 | static int i2o_seq_open_drivers_stored(struct inode *inode, struct file *file) | 1630 | static 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 | ||
1635 | static int i2o_seq_open_groups(struct inode *inode, struct file *file) | 1635 | static 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 | ||
1640 | static int i2o_seq_open_phys_device(struct inode *inode, struct file *file) | 1640 | static 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 | ||
1645 | static int i2o_seq_open_claimed(struct inode *inode, struct file *file) | 1645 | static 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 | ||
1650 | static int i2o_seq_open_users(struct inode *inode, struct file *file) | 1650 | static 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 | ||
1655 | static int i2o_seq_open_priv_msgs(struct inode *inode, struct file *file) | 1655 | static 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 | ||
1660 | static int i2o_seq_open_authorized_users(struct inode *inode, struct file *file) | 1660 | static 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 | ||
1666 | static int i2o_seq_open_dev_identity(struct inode *inode, struct file *file) | 1666 | static 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 | ||
1671 | static int i2o_seq_open_ddm_identity(struct inode *inode, struct file *file) | 1671 | static 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 | ||
1676 | static int i2o_seq_open_uinfo(struct inode *inode, struct file *file) | 1676 | static 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 | ||
1681 | static int i2o_seq_open_sgl_limits(struct inode *inode, struct file *file) | 1681 | static 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 | ||
1686 | static int i2o_seq_open_sensors(struct inode *inode, struct file *file) | 1686 | static 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 | ||
1691 | static int i2o_seq_open_dev_name(struct inode *inode, struct file *file) | 1691 | static 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 | ||
1696 | static const struct file_operations i2o_seq_fops_lct = { | 1696 | static 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 = { | |||
218 | static int bond_info_open(struct inode *inode, struct file *file) | 218 | static 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 | ||
384 | static int vlsi_seq_open(struct inode *inode, struct file *file) | 384 | static 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 | ||
389 | static const struct file_operations vlsi_proc_fops = { | 389 | static 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, | |||
4663 | static int proc_status_open(struct inode *inode, struct file *file) | 4663 | static 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) | |||
4809 | static void proc_config_on_close(struct inode *inode, struct file *file) | 4807 | static 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) | |||
5021 | static int proc_config_open(struct inode *inode, struct file *file) | 5018 | static 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) | |||
5112 | static void proc_SSID_on_close(struct inode *inode, struct file *file) | 5108 | static 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 | ||
5149 | static void proc_APList_on_close( struct inode *inode, struct file *file ) { | 5144 | static 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 | ||
5284 | static void proc_wepkey_on_close( struct inode *inode, struct file *file ) { | 5278 | static 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 ) { | |||
5335 | static int proc_wepkey_open( struct inode *inode, struct file *file ) | 5328 | static 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 ) | |||
5384 | static int proc_SSID_open(struct inode *inode, struct file *file) | 5376 | static 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 | ||
5429 | static int proc_APList_open( struct inode *inode, struct file *file ) { | 5420 | static 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 | ||
5469 | static int proc_BSSList_open( struct inode *inode, struct file *file ) { | 5459 | static 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 | ||
173 | static int led_proc_open(struct inode *inode, struct file *file) | 173 | static 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 | ||
179 | static ssize_t led_proc_write(struct file *file, const char *buf, | 179 | static 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) | |||
46 | static ssize_t | 46 | static ssize_t |
47 | proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) | 47 | proc_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 | |||
133 | proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos) | 131 | proc_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 { | |||
212 | static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd, | 209 | static 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 |
254 | static int proc_bus_pci_mmap(struct file *file, struct vm_area_struct *vma) | 250 | static 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 | ||
845 | static int dispatch_proc_open(struct inode *inode, struct file *file) | 845 | static 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 | ||
850 | static ssize_t dispatch_proc_write(struct file *file, | 850 | static 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 | ||
554 | static int lcd_proc_open(struct inode *inode, struct file *file) | 554 | static 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 | ||
559 | static int set_lcd_brightness(struct toshiba_acpi_dev *dev, int value) | 559 | static int set_lcd_brightness(struct toshiba_acpi_dev *dev, int value) |
@@ -583,7 +583,7 @@ static int set_lcd_status(struct backlight_device *bd) | |||
583 | static ssize_t lcd_proc_write(struct file *file, const char __user *buf, | 583 | static 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 | ||
645 | static int video_proc_open(struct inode *inode, struct file *file) | 645 | static 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 | ||
650 | static ssize_t video_proc_write(struct file *file, const char __user *buf, | 650 | static 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 | ||
745 | static int fan_proc_open(struct inode *inode, struct file *file) | 745 | static 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 | ||
750 | static ssize_t fan_proc_write(struct file *file, const char __user *buf, | 750 | static 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 | ||
817 | static int keys_proc_open(struct inode *inode, struct file *file) | 817 | static 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 | ||
822 | static ssize_t keys_proc_write(struct file *file, const char __user *buf, | 822 | static 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 | ||
860 | static int version_proc_open(struct inode *inode, struct file *file) | 860 | static 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 | ||
865 | static const struct file_operations version_proc_fops = { | 865 | static 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) | |||
55 | static ssize_t isapnp_proc_bus_read(struct file *file, char __user * buf, | 55 | static 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 | ||
239 | static int pnpbios_proc_open(struct inode *inode, struct file *file) | 239 | static 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 | ||
244 | static ssize_t pnpbios_proc_write(struct file *file, const char __user *buf, | 244 | static 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) | |||
110 | static int rtc_proc_open(struct inode *inode, struct file *file) | 110 | static 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); | |||
48 | static ssize_t proc_scsi_host_write(struct file *file, const char __user *buf, | 48 | static 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 | ||
79 | static int proc_scsi_host_open(struct inode *inode, struct file *file) | 79 | static 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) | |||
1065 | static ssize_t rndis_proc_write(struct file *file, const char __user *buffer, | 1065 | static 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 | ||
1110 | static int rndis_proc_open(struct inode *inode, struct file *file) | 1110 | static 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 | ||
1115 | static const struct file_operations rndis_proc_fops = { | 1115 | static 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 = { | |||
67 | static int dgrp_mon_open(struct inode *inode, struct file *file) | 67 | static 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: | |||
784 | static int dgrp_net_open(struct inode *inode, struct file *file) | 784 | static 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) \ |
7251 | static int name##_open(struct inode *inode, struct file *file) \ | 7251 | static 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 | } \ |
7255 | static const struct file_operations name##_ops = { \ | 7255 | static 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) \ |
7263 | static int name##_open(struct inode *inode, struct file *file) \ | 7263 | static 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 | } \ |
7267 | static const struct file_operations name##_ops = { \ | 7267 | static 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 | } |
7357 | static int show_bypass(struct seq_file *m, void *v) | 7357 | static 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 | } |
7381 | static int show_tap(struct seq_file *m, void *v) | 7381 | static 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 | } |
7405 | static int show_disc(struct seq_file *m, void *v) | 7405 | static int show_disc(struct seq_file *m, void *v) |
@@ -7461,7 +7461,7 @@ RO_FOPS(disc_change) | |||
7461 | static ssize_t bypass_wd_write(struct file *file, const char __user *buffer, | 7461 | static 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) | |||
7507 | static ssize_t tpl_write(struct file *file, const char __user *buffer, | 7507 | static 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) | |||
7533 | static ssize_t wait_at_pwup_write(struct file *file, const char __user *buffer, | 7533 | static 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) | |||
7558 | static ssize_t hw_reset_write(struct file *file, const char __user *buffer, | 7558 | static 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 | } |
7609 | static int show_dis_bypass(struct seq_file *m, void *v) | 7609 | static 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 | } |
7633 | static int show_dis_tap(struct seq_file *m, void *v) | 7633 | static 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 | } |
7657 | static int show_dis_disc(struct seq_file *m, void *v) | 7657 | static 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 | } |
7681 | static int show_bypass_pwup(struct seq_file *m, void *v) | 7681 | static 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 | } |
7705 | static int show_bypass_pwoff(struct seq_file *m, void *v) | 7705 | static 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 | } |
7729 | static int show_tap_pwup(struct seq_file *m, void *v) | 7729 | static 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 | } |
7753 | static int show_disc_pwup(struct seq_file *m, void *v) | 7753 | static 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 | } |
7777 | static int show_std_nic(struct seq_file *m, void *v) | 7777 | static 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 | } |
7845 | static int show_wd_autoreset(struct seq_file *m, void *v) | 7845 | static 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 | ||
1712 | static int uart_proc_open(struct inode *inode, struct file *file) | 1712 | static 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 | ||
1717 | static const struct file_operations uart_proc_fops = { | 1717 | static 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 | ||
222 | static int proc_udc_open(struct inode *inode, struct file *file) | 222 | static 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 | ||
227 | static const struct file_operations proc_ops = { | 227 | static 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 | ||
566 | static int proc_udc_open(struct inode *inode, struct file *file) | 566 | static 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 | ||
571 | static const struct file_operations proc_ops = { | 571 | static 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) | |||
1065 | static ssize_t rndis_proc_write(struct file *file, const char __user *buffer, | 1065 | static 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 | ||
1110 | static int rndis_proc_open(struct inode *inode, struct file *file) | 1110 | static 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 | ||
1115 | static const struct file_operations rndis_proc_fops = { | 1115 | static 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 | ||
2176 | static int proc_isp1362_open(struct inode *inode, struct file *file) | 2176 | static 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 | ||
2181 | static const struct file_operations proc_ops = { | 2181 | static 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 | ||
1495 | static int proc_sl811h_open(struct inode *inode, struct file *file) | 1495 | static 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 | ||
1500 | static const struct file_operations proc_ops = { | 1500 | static 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 | |||
349 | adv7393_write_proc(struct file *file, const char __user * buffer, | 349 | adv7393_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) | |||
47 | static ssize_t | 47 | static ssize_t |
48 | proc_bus_zorro_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) | 48 | proc_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 | ||