Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

proc: convert everything to "struct proc_ops"

The most notable change is DEFINE_SHOW_ATTRIBUTE macro split in
seq_file.h.

Conversion rule is:

llseek => proc_lseek
unlocked_ioctl => proc_ioctl

xxx => proc_xxx

delete ".owner = THIS_MODULE" line

[akpm@linux-foundation.org: fix drivers/isdn/capi/kcapi_proc.c]
[sfr@canb.auug.org.au: fix kernel/sched/psi.c]
Link: http://lkml.kernel.org/r/20200122180545.36222f50@canb.auug.org.au
Link: http://lkml.kernel.org/r/20191225172546.GB13378@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Alexey Dobriyan and committed by
Linus Torvalds
97a32539 d56c0d45

+960 -1005
+8 -9
arch/alpha/kernel/srm_env.c
··· 119 119 return res; 120 120 } 121 121 122 - static const struct file_operations srm_env_proc_fops = { 123 - .owner = THIS_MODULE, 124 - .open = srm_env_proc_open, 125 - .read = seq_read, 126 - .llseek = seq_lseek, 127 - .release = single_release, 128 - .write = srm_env_proc_write, 122 + static const struct proc_ops srm_env_proc_ops = { 123 + .proc_open = srm_env_proc_open, 124 + .proc_read = seq_read, 125 + .proc_lseek = seq_lseek, 126 + .proc_release = single_release, 127 + .proc_write = srm_env_proc_write, 129 128 }; 130 129 131 130 static int __init ··· 181 182 entry = srm_named_entries; 182 183 while (entry->name && entry->id) { 183 184 if (!proc_create_data(entry->name, 0644, named_dir, 184 - &srm_env_proc_fops, (void *)entry->id)) 185 + &srm_env_proc_ops, (void *)entry->id)) 185 186 goto cleanup; 186 187 entry++; 187 188 } ··· 193 194 char name[4]; 194 195 sprintf(name, "%ld", var_num); 195 196 if (!proc_create_data(name, 0644, numbered_dir, 196 - &srm_env_proc_fops, (void *)var_num)) 197 + &srm_env_proc_ops, (void *)var_num)) 197 198 goto cleanup; 198 199 } 199 200
+4 -4
arch/arm/kernel/atags_proc.c
··· 17 17 return simple_read_from_buffer(buf, count, ppos, b->data, b->size); 18 18 } 19 19 20 - static const struct file_operations atags_fops = { 21 - .read = atags_read, 22 - .llseek = default_llseek, 20 + static const struct proc_ops atags_proc_ops = { 21 + .proc_read = atags_read, 22 + .proc_lseek = default_llseek, 23 23 }; 24 24 25 25 #define BOOT_PARAMS_SIZE 1536 ··· 61 61 b->size = size; 62 62 memcpy(b->data, atags_copy, size); 63 63 64 - tags_entry = proc_create_data("atags", 0400, NULL, &atags_fops, b); 64 + tags_entry = proc_create_data("atags", 0400, NULL, &atags_proc_ops, b); 65 65 if (!tags_entry) 66 66 goto nomem; 67 67
+7 -7
arch/arm/mm/alignment.c
··· 162 162 return count; 163 163 } 164 164 165 - static const struct file_operations alignment_proc_fops = { 166 - .open = alignment_proc_open, 167 - .read = seq_read, 168 - .llseek = seq_lseek, 169 - .release = single_release, 170 - .write = alignment_proc_write, 165 + static const struct proc_ops alignment_proc_ops = { 166 + .proc_open = alignment_proc_open, 167 + .proc_read = seq_read, 168 + .proc_lseek = seq_lseek, 169 + .proc_release = single_release, 170 + .proc_write = alignment_proc_write, 171 171 }; 172 172 #endif /* CONFIG_PROC_FS */ 173 173 ··· 1016 1016 struct proc_dir_entry *res; 1017 1017 1018 1018 res = proc_create("cpu/alignment", S_IWUSR | S_IRUGO, NULL, 1019 - &alignment_proc_fops); 1019 + &alignment_proc_ops); 1020 1020 if (!res) 1021 1021 return -ENOMEM; 1022 1022 #endif
+12 -12
arch/ia64/kernel/salinfo.c
··· 331 331 return size; 332 332 } 333 333 334 - static const struct file_operations salinfo_event_fops = { 335 - .open = salinfo_event_open, 336 - .read = salinfo_event_read, 337 - .llseek = noop_llseek, 334 + static const struct proc_ops salinfo_event_proc_ops = { 335 + .proc_open = salinfo_event_open, 336 + .proc_read = salinfo_event_read, 337 + .proc_lseek = noop_llseek, 338 338 }; 339 339 340 340 static int ··· 534 534 return count; 535 535 } 536 536 537 - static const struct file_operations salinfo_data_fops = { 538 - .open = salinfo_log_open, 539 - .release = salinfo_log_release, 540 - .read = salinfo_log_read, 541 - .write = salinfo_log_write, 542 - .llseek = default_llseek, 537 + static const struct proc_ops salinfo_data_proc_ops = { 538 + .proc_open = salinfo_log_open, 539 + .proc_release = salinfo_log_release, 540 + .proc_read = salinfo_log_read, 541 + .proc_write = salinfo_log_write, 542 + .proc_lseek = default_llseek, 543 543 }; 544 544 545 545 static int salinfo_cpu_online(unsigned int cpu) ··· 617 617 continue; 618 618 619 619 entry = proc_create_data("event", S_IRUSR, dir, 620 - &salinfo_event_fops, data); 620 + &salinfo_event_proc_ops, data); 621 621 if (!entry) 622 622 continue; 623 623 *sdir++ = entry; 624 624 625 625 entry = proc_create_data("data", S_IRUSR | S_IWUSR, dir, 626 - &salinfo_data_fops, data); 626 + &salinfo_data_proc_ops, data); 627 627 if (!entry) 628 628 continue; 629 629 *sdir++ = entry;
+4 -4
arch/m68k/kernel/bootinfo_proc.c
··· 26 26 bootinfo_size); 27 27 } 28 28 29 - static const struct file_operations bootinfo_fops = { 30 - .read = bootinfo_read, 31 - .llseek = default_llseek, 29 + static const struct proc_ops bootinfo_proc_ops = { 30 + .proc_read = bootinfo_read, 31 + .proc_lseek = default_llseek, 32 32 }; 33 33 34 34 void __init save_bootinfo(const struct bi_record *bi) ··· 67 67 if (!bootinfo_copy) 68 68 return -ENOMEM; 69 69 70 - pde = proc_create_data("bootinfo", 0400, NULL, &bootinfo_fops, NULL); 70 + pde = proc_create_data("bootinfo", 0400, NULL, &bootinfo_proc_ops, NULL); 71 71 if (!pde) { 72 72 kfree(bootinfo_copy); 73 73 return -ENOMEM;
+14 -17
arch/mips/lasat/picvue_proc.c
··· 89 89 return count; 90 90 } 91 91 92 - static const struct file_operations pvc_line_proc_fops = { 93 - .owner = THIS_MODULE, 94 - .open = pvc_line_proc_open, 95 - .read = seq_read, 96 - .llseek = seq_lseek, 97 - .release = single_release, 98 - .write = pvc_line_proc_write, 92 + static const struct proc_ops pvc_line_proc_ops = { 93 + .proc_open = pvc_line_proc_open, 94 + .proc_read = seq_read, 95 + .proc_lseek = seq_lseek, 96 + .proc_release = single_release, 97 + .proc_write = pvc_line_proc_write, 99 98 }; 100 99 101 100 static ssize_t pvc_scroll_proc_write(struct file *file, const char __user *buf, ··· 147 148 return single_open(file, pvc_scroll_proc_show, NULL); 148 149 } 149 150 150 - static const struct file_operations pvc_scroll_proc_fops = { 151 - .owner = THIS_MODULE, 152 - .open = pvc_scroll_proc_open, 153 - .read = seq_read, 154 - .llseek = seq_lseek, 155 - .release = single_release, 156 - .write = pvc_scroll_proc_write, 151 + static const struct proc_ops pvc_scroll_proc_ops = { 152 + .proc_open = pvc_scroll_proc_open, 153 + .proc_read = seq_read, 154 + .proc_lseek = seq_lseek, 155 + .proc_release = single_release, 156 + .proc_write = pvc_scroll_proc_write, 157 157 }; 158 158 159 159 void pvc_proc_timerfunc(struct timer_list *unused) ··· 187 189 } 188 190 for (i = 0; i < PVC_NLINES; i++) { 189 191 proc_entry = proc_create_data(pvc_linename[i], 0644, dir, 190 - &pvc_line_proc_fops, &pvc_linedata[i]); 192 + &pvc_line_proc_ops, &pvc_linedata[i]); 191 193 if (proc_entry == NULL) 192 194 goto error; 193 195 } 194 - proc_entry = proc_create("scroll", 0644, dir, 195 - &pvc_scroll_proc_fops); 196 + proc_entry = proc_create("scroll", 0644, dir, &pvc_scroll_proc_ops); 196 197 if (proc_entry == NULL) 197 198 goto error; 198 199
+5 -5
arch/powerpc/kernel/proc_powerpc.c
··· 39 39 return 0; 40 40 } 41 41 42 - static const struct file_operations page_map_fops = { 43 - .llseek = page_map_seek, 44 - .read = page_map_read, 45 - .mmap = page_map_mmap 42 + static const struct proc_ops page_map_proc_ops = { 43 + .proc_lseek = page_map_seek, 44 + .proc_read = page_map_read, 45 + .proc_mmap = page_map_mmap, 46 46 }; 47 47 48 48 ··· 51 51 struct proc_dir_entry *pde; 52 52 53 53 pde = proc_create_data("powerpc/systemcfg", S_IFREG | 0444, NULL, 54 - &page_map_fops, vdso_data); 54 + &page_map_proc_ops, vdso_data); 55 55 if (!pde) 56 56 return 1; 57 57 proc_set_size(pde, PAGE_SIZE);
+35 -35
arch/powerpc/kernel/rtas-proc.c
··· 159 159 return single_open(file, ppc_rtas_poweron_show, NULL); 160 160 } 161 161 162 - static const struct file_operations ppc_rtas_poweron_operations = { 163 - .open = poweron_open, 164 - .read = seq_read, 165 - .llseek = seq_lseek, 166 - .write = ppc_rtas_poweron_write, 167 - .release = single_release, 162 + static const struct proc_ops ppc_rtas_poweron_proc_ops = { 163 + .proc_open = poweron_open, 164 + .proc_read = seq_read, 165 + .proc_lseek = seq_lseek, 166 + .proc_write = ppc_rtas_poweron_write, 167 + .proc_release = single_release, 168 168 }; 169 169 170 170 static int progress_open(struct inode *inode, struct file *file) ··· 172 172 return single_open(file, ppc_rtas_progress_show, NULL); 173 173 } 174 174 175 - static const struct file_operations ppc_rtas_progress_operations = { 176 - .open = progress_open, 177 - .read = seq_read, 178 - .llseek = seq_lseek, 179 - .write = ppc_rtas_progress_write, 180 - .release = single_release, 175 + static const struct proc_ops ppc_rtas_progress_proc_ops = { 176 + .proc_open = progress_open, 177 + .proc_read = seq_read, 178 + .proc_lseek = seq_lseek, 179 + .proc_write = ppc_rtas_progress_write, 180 + .proc_release = single_release, 181 181 }; 182 182 183 183 static int clock_open(struct inode *inode, struct file *file) ··· 185 185 return single_open(file, ppc_rtas_clock_show, NULL); 186 186 } 187 187 188 - static const struct file_operations ppc_rtas_clock_operations = { 189 - .open = clock_open, 190 - .read = seq_read, 191 - .llseek = seq_lseek, 192 - .write = ppc_rtas_clock_write, 193 - .release = single_release, 188 + static const struct proc_ops ppc_rtas_clock_proc_ops = { 189 + .proc_open = clock_open, 190 + .proc_read = seq_read, 191 + .proc_lseek = seq_lseek, 192 + .proc_write = ppc_rtas_clock_write, 193 + .proc_release = single_release, 194 194 }; 195 195 196 196 static int tone_freq_open(struct inode *inode, struct file *file) ··· 198 198 return single_open(file, ppc_rtas_tone_freq_show, NULL); 199 199 } 200 200 201 - static const struct file_operations ppc_rtas_tone_freq_operations = { 202 - .open = tone_freq_open, 203 - .read = seq_read, 204 - .llseek = seq_lseek, 205 - .write = ppc_rtas_tone_freq_write, 206 - .release = single_release, 201 + static const struct proc_ops ppc_rtas_tone_freq_proc_ops = { 202 + .proc_open = tone_freq_open, 203 + .proc_read = seq_read, 204 + .proc_lseek = seq_lseek, 205 + .proc_write = ppc_rtas_tone_freq_write, 206 + .proc_release = single_release, 207 207 }; 208 208 209 209 static int tone_volume_open(struct inode *inode, struct file *file) ··· 211 211 return single_open(file, ppc_rtas_tone_volume_show, NULL); 212 212 } 213 213 214 - static const struct file_operations ppc_rtas_tone_volume_operations = { 215 - .open = tone_volume_open, 216 - .read = seq_read, 217 - .llseek = seq_lseek, 218 - .write = ppc_rtas_tone_volume_write, 219 - .release = single_release, 214 + static const struct proc_ops ppc_rtas_tone_volume_proc_ops = { 215 + .proc_open = tone_volume_open, 216 + .proc_read = seq_read, 217 + .proc_lseek = seq_lseek, 218 + .proc_write = ppc_rtas_tone_volume_write, 219 + .proc_release = single_release, 220 220 }; 221 221 222 222 static int ppc_rtas_find_all_sensors(void); ··· 238 238 return -ENODEV; 239 239 240 240 proc_create("powerpc/rtas/progress", 0644, NULL, 241 - &ppc_rtas_progress_operations); 241 + &ppc_rtas_progress_proc_ops); 242 242 proc_create("powerpc/rtas/clock", 0644, NULL, 243 - &ppc_rtas_clock_operations); 243 + &ppc_rtas_clock_proc_ops); 244 244 proc_create("powerpc/rtas/poweron", 0644, NULL, 245 - &ppc_rtas_poweron_operations); 245 + &ppc_rtas_poweron_proc_ops); 246 246 proc_create_single("powerpc/rtas/sensors", 0444, NULL, 247 247 ppc_rtas_sensors_show); 248 248 proc_create("powerpc/rtas/frequency", 0644, NULL, 249 - &ppc_rtas_tone_freq_operations); 249 + &ppc_rtas_tone_freq_proc_ops); 250 250 proc_create("powerpc/rtas/volume", 0644, NULL, 251 - &ppc_rtas_tone_volume_operations); 251 + &ppc_rtas_tone_volume_proc_ops); 252 252 proc_create_single("powerpc/rtas/rmo_buffer", 0400, NULL, 253 253 ppc_rtas_rmo_buf_show); 254 254 return 0;
+17 -17
arch/powerpc/kernel/rtas_flash.c
··· 655 655 const char *filename; 656 656 const char *rtas_call_name; 657 657 int *status; 658 - const struct file_operations fops; 658 + const struct proc_ops ops; 659 659 }; 660 660 661 661 static const struct rtas_flash_file rtas_flash_files[] = { ··· 663 663 .filename = "powerpc/rtas/" FIRMWARE_FLASH_NAME, 664 664 .rtas_call_name = "ibm,update-flash-64-and-reboot", 665 665 .status = &rtas_update_flash_data.status, 666 - .fops.read = rtas_flash_read_msg, 667 - .fops.write = rtas_flash_write, 668 - .fops.release = rtas_flash_release, 669 - .fops.llseek = default_llseek, 666 + .ops.proc_read = rtas_flash_read_msg, 667 + .ops.proc_write = rtas_flash_write, 668 + .ops.proc_release = rtas_flash_release, 669 + .ops.proc_lseek = default_llseek, 670 670 }, 671 671 { 672 672 .filename = "powerpc/rtas/" FIRMWARE_UPDATE_NAME, 673 673 .rtas_call_name = "ibm,update-flash-64-and-reboot", 674 674 .status = &rtas_update_flash_data.status, 675 - .fops.read = rtas_flash_read_num, 676 - .fops.write = rtas_flash_write, 677 - .fops.release = rtas_flash_release, 678 - .fops.llseek = default_llseek, 675 + .ops.proc_read = rtas_flash_read_num, 676 + .ops.proc_write = rtas_flash_write, 677 + .ops.proc_release = rtas_flash_release, 678 + .ops.proc_lseek = default_llseek, 679 679 }, 680 680 { 681 681 .filename = "powerpc/rtas/" VALIDATE_FLASH_NAME, 682 682 .rtas_call_name = "ibm,validate-flash-image", 683 683 .status = &rtas_validate_flash_data.status, 684 - .fops.read = validate_flash_read, 685 - .fops.write = validate_flash_write, 686 - .fops.release = validate_flash_release, 687 - .fops.llseek = default_llseek, 684 + .ops.proc_read = validate_flash_read, 685 + .ops.proc_write = validate_flash_write, 686 + .ops.proc_release = validate_flash_release, 687 + .ops.proc_lseek = default_llseek, 688 688 }, 689 689 { 690 690 .filename = "powerpc/rtas/" MANAGE_FLASH_NAME, 691 691 .rtas_call_name = "ibm,manage-flash-image", 692 692 .status = &rtas_manage_flash_data.status, 693 - .fops.read = manage_flash_read, 694 - .fops.write = manage_flash_write, 695 - .fops.llseek = default_llseek, 693 + .ops.proc_read = manage_flash_read, 694 + .ops.proc_write = manage_flash_write, 695 + .ops.proc_lseek = default_llseek, 696 696 } 697 697 }; 698 698 ··· 723 723 const struct rtas_flash_file *f = &rtas_flash_files[i]; 724 724 int token; 725 725 726 - if (!proc_create(f->filename, 0600, NULL, &f->fops)) 726 + if (!proc_create(f->filename, 0600, NULL, &f->ops)) 727 727 goto enomem; 728 728 729 729 /*
+7 -7
arch/powerpc/kernel/rtasd.c
··· 385 385 return 0; 386 386 } 387 387 388 - static const struct file_operations proc_rtas_log_operations = { 389 - .read = rtas_log_read, 390 - .poll = rtas_log_poll, 391 - .open = rtas_log_open, 392 - .release = rtas_log_release, 393 - .llseek = noop_llseek, 388 + static const struct proc_ops rtas_log_proc_ops = { 389 + .proc_read = rtas_log_read, 390 + .proc_poll = rtas_log_poll, 391 + .proc_open = rtas_log_open, 392 + .proc_release = rtas_log_release, 393 + .proc_lseek = noop_llseek, 394 394 }; 395 395 396 396 static int enable_surveillance(int timeout) ··· 572 572 return -ENODEV; 573 573 574 574 entry = proc_create("powerpc/rtas/error_log", 0400, NULL, 575 - &proc_rtas_log_operations); 575 + &rtas_log_proc_ops); 576 576 if (!entry) 577 577 printk(KERN_ERR "Failed to create error_log proc entry\n"); 578 578
+6 -6
arch/powerpc/mm/numa.c
··· 1616 1616 return count; 1617 1617 } 1618 1618 1619 - static const struct file_operations topology_ops = { 1620 - .read = seq_read, 1621 - .write = topology_write, 1622 - .open = topology_open, 1623 - .release = single_release 1619 + static const struct proc_ops topology_proc_ops = { 1620 + .proc_read = seq_read, 1621 + .proc_write = topology_write, 1622 + .proc_open = topology_open, 1623 + .proc_release = single_release, 1624 1624 }; 1625 1625 1626 1626 static int topology_update_init(void) ··· 1630 1630 if (vphn_enabled) 1631 1631 topology_schedule_update(); 1632 1632 1633 - if (!proc_create("powerpc/topology_updates", 0644, NULL, &topology_ops)) 1633 + if (!proc_create("powerpc/topology_updates", 0644, NULL, &topology_proc_ops)) 1634 1634 return -ENOMEM; 1635 1635 1636 1636 topology_inited = 1;
+12 -12
arch/powerpc/platforms/pseries/lpar.c
··· 582 582 return single_open(file, vcpudispatch_stats_display, NULL); 583 583 } 584 584 585 - static const struct file_operations vcpudispatch_stats_proc_ops = { 586 - .open = vcpudispatch_stats_open, 587 - .read = seq_read, 588 - .write = vcpudispatch_stats_write, 589 - .llseek = seq_lseek, 590 - .release = single_release, 585 + static const struct proc_ops vcpudispatch_stats_proc_ops = { 586 + .proc_open = vcpudispatch_stats_open, 587 + .proc_read = seq_read, 588 + .proc_write = vcpudispatch_stats_write, 589 + .proc_lseek = seq_lseek, 590 + .proc_release = single_release, 591 591 }; 592 592 593 593 static ssize_t vcpudispatch_stats_freq_write(struct file *file, ··· 626 626 return single_open(file, vcpudispatch_stats_freq_display, NULL); 627 627 } 628 628 629 - static const struct file_operations vcpudispatch_stats_freq_proc_ops = { 630 - .open = vcpudispatch_stats_freq_open, 631 - .read = seq_read, 632 - .write = vcpudispatch_stats_freq_write, 633 - .llseek = seq_lseek, 634 - .release = single_release, 629 + static const struct proc_ops vcpudispatch_stats_freq_proc_ops = { 630 + .proc_open = vcpudispatch_stats_freq_open, 631 + .proc_read = seq_read, 632 + .proc_write = vcpudispatch_stats_freq_write, 633 + .proc_lseek = seq_lseek, 634 + .proc_release = single_release, 635 635 }; 636 636 637 637 static int __init vcpudispatch_stats_procfs_init(void)
+7 -7
arch/powerpc/platforms/pseries/lparcfg.c
··· 698 698 return single_open(file, lparcfg_data, NULL); 699 699 } 700 700 701 - static const struct file_operations lparcfg_fops = { 702 - .read = seq_read, 703 - .write = lparcfg_write, 704 - .open = lparcfg_open, 705 - .release = single_release, 706 - .llseek = seq_lseek, 701 + static const struct proc_ops lparcfg_proc_ops = { 702 + .proc_read = seq_read, 703 + .proc_write = lparcfg_write, 704 + .proc_open = lparcfg_open, 705 + .proc_release = single_release, 706 + .proc_lseek = seq_lseek, 707 707 }; 708 708 709 709 static int __init lparcfg_init(void) ··· 714 714 if (firmware_has_feature(FW_FEATURE_SPLPAR)) 715 715 mode |= 0200; 716 716 717 - if (!proc_create("powerpc/lparcfg", mode, NULL, &lparcfg_fops)) { 717 + if (!proc_create("powerpc/lparcfg", mode, NULL, &lparcfg_proc_ops)) { 718 718 printk(KERN_ERR "Failed to create powerpc/lparcfg\n"); 719 719 return -EIO; 720 720 }
+4 -4
arch/powerpc/platforms/pseries/reconfig.c
··· 391 391 return rv ? rv : count; 392 392 } 393 393 394 - static const struct file_operations ofdt_fops = { 395 - .write = ofdt_write, 396 - .llseek = noop_llseek, 394 + static const struct proc_ops ofdt_proc_ops = { 395 + .proc_write = ofdt_write, 396 + .proc_lseek = noop_llseek, 397 397 }; 398 398 399 399 /* create /proc/powerpc/ofdt write-only by root */ ··· 401 401 { 402 402 struct proc_dir_entry *ent; 403 403 404 - ent = proc_create("powerpc/ofdt", 0200, NULL, &ofdt_fops); 404 + ent = proc_create("powerpc/ofdt", 0200, NULL, &ofdt_proc_ops); 405 405 if (ent) 406 406 proc_set_size(ent, 0); 407 407
+7 -8
arch/powerpc/platforms/pseries/scanlog.c
··· 152 152 return 0; 153 153 } 154 154 155 - static const struct file_operations scanlog_fops = { 156 - .owner = THIS_MODULE, 157 - .read = scanlog_read, 158 - .write = scanlog_write, 159 - .open = scanlog_open, 160 - .release = scanlog_release, 161 - .llseek = noop_llseek, 155 + static const struct proc_ops scanlog_proc_ops = { 156 + .proc_read = scanlog_read, 157 + .proc_write = scanlog_write, 158 + .proc_open = scanlog_open, 159 + .proc_release = scanlog_release, 160 + .proc_lseek = noop_llseek, 162 161 }; 163 162 164 163 static int __init scanlog_init(void) ··· 175 176 goto err; 176 177 177 178 ent = proc_create("powerpc/rtas/scan-log-dump", 0400, NULL, 178 - &scanlog_fops); 179 + &scanlog_proc_ops); 179 180 if (!ent) 180 181 goto err; 181 182 return 0;
+8 -9
arch/sh/mm/alignment.c
··· 152 152 return count; 153 153 } 154 154 155 - static const struct file_operations alignment_proc_fops = { 156 - .owner = THIS_MODULE, 157 - .open = alignment_proc_open, 158 - .read = seq_read, 159 - .llseek = seq_lseek, 160 - .release = single_release, 161 - .write = alignment_proc_write, 155 + static const struct proc_ops alignment_proc_ops = { 156 + .proc_open = alignment_proc_open, 157 + .proc_read = seq_read, 158 + .proc_lseek = seq_lseek, 159 + .proc_release = single_release, 160 + .proc_write = alignment_proc_write, 162 161 }; 163 162 164 163 /* ··· 175 176 return -ENOMEM; 176 177 177 178 res = proc_create_data("alignment", S_IWUSR | S_IRUGO, dir, 178 - &alignment_proc_fops, &se_usermode); 179 + &alignment_proc_ops, &se_usermode); 179 180 if (!res) 180 181 return -ENOMEM; 181 182 182 183 res = proc_create_data("kernel_alignment", S_IWUSR | S_IRUGO, dir, 183 - &alignment_proc_fops, &se_kernmode_warn); 184 + &alignment_proc_ops, &se_kernmode_warn); 184 185 if (!res) 185 186 return -ENOMEM; 186 187
+7 -8
arch/sparc/kernel/led.c
··· 104 104 return count; 105 105 } 106 106 107 - static const struct file_operations led_proc_fops = { 108 - .owner = THIS_MODULE, 109 - .open = led_proc_open, 110 - .read = seq_read, 111 - .llseek = seq_lseek, 112 - .release = single_release, 113 - .write = led_proc_write, 107 + static const struct proc_ops led_proc_ops = { 108 + .proc_open = led_proc_open, 109 + .proc_read = seq_read, 110 + .proc_lseek = seq_lseek, 111 + .proc_release = single_release, 112 + .proc_write = led_proc_write, 114 113 }; 115 114 116 115 static struct proc_dir_entry *led; ··· 120 121 { 121 122 timer_setup(&led_blink_timer, led_blink, 0); 122 123 123 - led = proc_create("led", 0, NULL, &led_proc_fops); 124 + led = proc_create("led", 0, NULL, &led_proc_ops); 124 125 if (!led) 125 126 return -ENOMEM; 126 127
+4 -5
arch/um/drivers/mconsole_kern.c
··· 752 752 return count; 753 753 } 754 754 755 - static const struct file_operations mconsole_proc_fops = { 756 - .owner = THIS_MODULE, 757 - .write = mconsole_proc_write, 758 - .llseek = noop_llseek, 755 + static const struct proc_ops mconsole_proc_ops = { 756 + .proc_write = mconsole_proc_write, 757 + .proc_lseek = noop_llseek, 759 758 }; 760 759 761 760 static int create_proc_mconsole(void) ··· 764 765 if (notify_socket == NULL) 765 766 return 0; 766 767 767 - ent = proc_create("mconsole", 0200, NULL, &mconsole_proc_fops); 768 + ent = proc_create("mconsole", 0200, NULL, &mconsole_proc_ops); 768 769 if (ent == NULL) { 769 770 printk(KERN_INFO "create_proc_mconsole : proc_create failed\n"); 770 771 return 0;
+7 -8
arch/um/kernel/exitcode.c
··· 55 55 return count; 56 56 } 57 57 58 - static const struct file_operations exitcode_proc_fops = { 59 - .owner = THIS_MODULE, 60 - .open = exitcode_proc_open, 61 - .read = seq_read, 62 - .llseek = seq_lseek, 63 - .release = single_release, 64 - .write = exitcode_proc_write, 58 + static const struct proc_ops exitcode_proc_ops = { 59 + .proc_open = exitcode_proc_open, 60 + .proc_read = seq_read, 61 + .proc_lseek = seq_lseek, 62 + .proc_release = single_release, 63 + .proc_write = exitcode_proc_write, 65 64 }; 66 65 67 66 static int make_proc_exitcode(void) 68 67 { 69 68 struct proc_dir_entry *ent; 70 69 71 - ent = proc_create("exitcode", 0600, NULL, &exitcode_proc_fops); 70 + ent = proc_create("exitcode", 0600, NULL, &exitcode_proc_ops); 72 71 if (ent == NULL) { 73 72 printk(KERN_WARNING "make_proc_exitcode : Failed to register " 74 73 "/proc/exitcode\n");
+7 -8
arch/um/kernel/process.c
··· 348 348 return count; 349 349 } 350 350 351 - static const struct file_operations sysemu_proc_fops = { 352 - .owner = THIS_MODULE, 353 - .open = sysemu_proc_open, 354 - .read = seq_read, 355 - .llseek = seq_lseek, 356 - .release = single_release, 357 - .write = sysemu_proc_write, 351 + static const struct proc_ops sysemu_proc_ops = { 352 + .proc_open = sysemu_proc_open, 353 + .proc_read = seq_read, 354 + .proc_lseek = seq_lseek, 355 + .proc_release = single_release, 356 + .proc_write = sysemu_proc_write, 358 357 }; 359 358 360 359 int __init make_proc_sysemu(void) ··· 362 363 if (!sysemu_supported) 363 364 return 0; 364 365 365 - ent = proc_create("sysemu", 0600, NULL, &sysemu_proc_fops); 366 + ent = proc_create("sysemu", 0600, NULL, &sysemu_proc_ops); 366 367 367 368 if (ent == NULL) 368 369 {
+11 -10
arch/x86/kernel/cpu/mtrr/if.c
··· 396 396 return single_open(file, mtrr_seq_show, NULL); 397 397 } 398 398 399 - static const struct file_operations mtrr_fops = { 400 - .owner = THIS_MODULE, 401 - .open = mtrr_open, 402 - .read = seq_read, 403 - .llseek = seq_lseek, 404 - .write = mtrr_write, 405 - .unlocked_ioctl = mtrr_ioctl, 406 - .compat_ioctl = mtrr_ioctl, 407 - .release = mtrr_close, 399 + static const struct proc_ops mtrr_proc_ops = { 400 + .proc_open = mtrr_open, 401 + .proc_read = seq_read, 402 + .proc_lseek = seq_lseek, 403 + .proc_write = mtrr_write, 404 + .proc_ioctl = mtrr_ioctl, 405 + #ifdef CONFIG_COMPAT 406 + .proc_compat_ioctl = mtrr_ioctl, 407 + #endif 408 + .proc_release = mtrr_close, 408 409 }; 409 410 410 411 static int __init mtrr_if_init(void) ··· 418 417 (!cpu_has(c, X86_FEATURE_CENTAUR_MCR))) 419 418 return -ENODEV; 420 419 421 - proc_create("mtrr", S_IWUSR | S_IRUGO, NULL, &mtrr_fops); 420 + proc_create("mtrr", S_IWUSR | S_IRUGO, NULL, &mtrr_proc_ops); 422 421 return 0; 423 422 } 424 423 arch_initcall(mtrr_if_init);
+7 -7
arch/x86/platform/uv/tlb_uv.c
··· 1668 1668 return 0; 1669 1669 } 1670 1670 1671 - static const struct file_operations proc_uv_ptc_operations = { 1672 - .open = ptc_proc_open, 1673 - .read = seq_read, 1674 - .write = ptc_proc_write, 1675 - .llseek = seq_lseek, 1676 - .release = seq_release, 1671 + static const struct proc_ops uv_ptc_proc_ops = { 1672 + .proc_open = ptc_proc_open, 1673 + .proc_read = seq_read, 1674 + .proc_write = ptc_proc_write, 1675 + .proc_lseek = seq_lseek, 1676 + .proc_release = seq_release, 1677 1677 }; 1678 1678 1679 1679 static const struct file_operations tunables_fops = { ··· 1691 1691 return 0; 1692 1692 1693 1693 proc_uv_ptc = proc_create(UV_PTC_BASENAME, 0444, NULL, 1694 - &proc_uv_ptc_operations); 1694 + &uv_ptc_proc_ops); 1695 1695 if (!proc_uv_ptc) { 1696 1696 pr_err("unable to create %s proc entry\n", 1697 1697 UV_PTC_BASENAME);
+5 -5
arch/xtensa/platforms/iss/simdisk.c
··· 251 251 return err; 252 252 } 253 253 254 - static const struct file_operations fops = { 255 - .read = proc_read_simdisk, 256 - .write = proc_write_simdisk, 257 - .llseek = default_llseek, 254 + static const struct proc_ops simdisk_proc_ops = { 255 + .proc_read = proc_read_simdisk, 256 + .proc_write = proc_write_simdisk, 257 + .proc_lseek = default_llseek, 258 258 }; 259 259 260 260 static int __init simdisk_setup(struct simdisk *dev, int which, ··· 290 290 set_capacity(dev->gd, 0); 291 291 add_disk(dev->gd); 292 292 293 - dev->procfile = proc_create_data(tmp, 0644, procdir, &fops, dev); 293 + dev->procfile = proc_create_data(tmp, 0644, procdir, &simdisk_proc_ops, dev); 294 294 return 0; 295 295 296 296 out_alloc_disk:
+7 -8
drivers/acpi/battery.c
··· 1202 1202 return single_open(file, acpi_battery_alarm_proc_show, PDE_DATA(inode)); 1203 1203 } 1204 1204 1205 - static const struct file_operations acpi_battery_alarm_fops = { 1206 - .owner = THIS_MODULE, 1207 - .open = acpi_battery_alarm_proc_open, 1208 - .read = seq_read, 1209 - .write = acpi_battery_write_alarm, 1210 - .llseek = seq_lseek, 1211 - .release = single_release, 1205 + static const struct proc_ops acpi_battery_alarm_proc_ops = { 1206 + .proc_open = acpi_battery_alarm_proc_open, 1207 + .proc_read = seq_read, 1208 + .proc_write = acpi_battery_write_alarm, 1209 + .proc_lseek = seq_lseek, 1210 + .proc_release = single_release, 1212 1211 }; 1213 1212 1214 1213 static int acpi_battery_add_fs(struct acpi_device *device) ··· 1227 1228 acpi_battery_state_proc_show, acpi_driver_data(device))) 1228 1229 return -ENODEV; 1229 1230 if (!proc_create_data("alarm", S_IFREG | S_IRUGO | S_IWUSR, 1230 - acpi_device_dir(device), &acpi_battery_alarm_fops, 1231 + acpi_device_dir(device), &acpi_battery_alarm_proc_ops, 1231 1232 acpi_driver_data(device))) 1232 1233 return -ENODEV; 1233 1234 return 0;
+7 -8
drivers/acpi/proc.c
··· 136 136 PDE_DATA(inode)); 137 137 } 138 138 139 - static const struct file_operations acpi_system_wakeup_device_fops = { 140 - .owner = THIS_MODULE, 141 - .open = acpi_system_wakeup_device_open_fs, 142 - .read = seq_read, 143 - .write = acpi_system_write_wakeup_device, 144 - .llseek = seq_lseek, 145 - .release = single_release, 139 + static const struct proc_ops acpi_system_wakeup_device_proc_ops = { 140 + .proc_open = acpi_system_wakeup_device_open_fs, 141 + .proc_read = seq_read, 142 + .proc_write = acpi_system_write_wakeup_device, 143 + .proc_lseek = seq_lseek, 144 + .proc_release = single_release, 146 145 }; 147 146 148 147 void __init acpi_sleep_proc_init(void) 149 148 { 150 149 /* 'wakeup device' [R/W] */ 151 150 proc_create("wakeup", S_IFREG | S_IRUGO | S_IWUSR, 152 - acpi_root_dir, &acpi_system_wakeup_device_fops); 151 + acpi_root_dir, &acpi_system_wakeup_device_proc_ops); 153 152 }
+7 -8
drivers/hwmon/dell-smm-hwmon.c
··· 595 595 return single_open(file, i8k_proc_show, NULL); 596 596 } 597 597 598 - static const struct file_operations i8k_fops = { 599 - .owner = THIS_MODULE, 600 - .open = i8k_open_fs, 601 - .read = seq_read, 602 - .llseek = seq_lseek, 603 - .release = single_release, 604 - .unlocked_ioctl = i8k_ioctl, 598 + static const struct proc_ops i8k_proc_ops = { 599 + .proc_open = i8k_open_fs, 600 + .proc_read = seq_read, 601 + .proc_lseek = seq_lseek, 602 + .proc_release = single_release, 603 + .proc_ioctl = i8k_ioctl, 605 604 }; 606 605 607 606 static void __init i8k_init_procfs(void) 608 607 { 609 608 /* Register the proc entry */ 610 - proc_create("i8k", 0, NULL, &i8k_fops); 609 + proc_create("i8k", 0, NULL, &i8k_proc_ops); 611 610 } 612 611 613 612 static void __exit i8k_exit_procfs(void)
+9 -10
drivers/ide/ide-proc.c
··· 381 381 return -EINVAL; 382 382 } 383 383 384 - static const struct file_operations ide_settings_proc_fops = { 385 - .owner = THIS_MODULE, 386 - .open = ide_settings_proc_open, 387 - .read = seq_read, 388 - .llseek = seq_lseek, 389 - .release = single_release, 390 - .write = ide_settings_proc_write, 384 + static const struct proc_ops ide_settings_proc_ops = { 385 + .proc_open = ide_settings_proc_open, 386 + .proc_read = seq_read, 387 + .proc_lseek = seq_lseek, 388 + .proc_release = single_release, 389 + .proc_write = ide_settings_proc_write, 391 390 }; 392 391 393 392 int ide_capacity_proc_show(struct seq_file *m, void *v) ··· 545 546 if (drive->proc) { 546 547 ide_add_proc_entries(drive->proc, generic_drive_entries, drive); 547 548 proc_create_data("settings", S_IFREG|S_IRUSR|S_IWUSR, 548 - drive->proc, &ide_settings_proc_fops, 549 + drive->proc, &ide_settings_proc_ops, 549 550 drive); 550 551 } 551 552 sprintf(name, "ide%d/%s", (drive->name[2]-'a')/2, drive->name); ··· 614 615 return 0; 615 616 } 616 617 617 - DEFINE_SHOW_ATTRIBUTE(ide_drivers); 618 + DEFINE_PROC_SHOW_ATTRIBUTE(ide_drivers); 618 619 619 620 void proc_ide_create(void) 620 621 { ··· 623 624 if (!proc_ide_root) 624 625 return; 625 626 626 - proc_create("drivers", 0, proc_ide_root, &ide_drivers_fops); 627 + proc_create("drivers", 0, proc_ide_root, &ide_drivers_proc_ops); 627 628 } 628 629 629 630 void proc_ide_destroy(void)
+13 -15
drivers/input/input.c
··· 1216 1216 return seq_open(file, &input_devices_seq_ops); 1217 1217 } 1218 1218 1219 - static const struct file_operations input_devices_fileops = { 1220 - .owner = THIS_MODULE, 1221 - .open = input_proc_devices_open, 1222 - .poll = input_proc_devices_poll, 1223 - .read = seq_read, 1224 - .llseek = seq_lseek, 1225 - .release = seq_release, 1219 + static const struct proc_ops input_devices_proc_ops = { 1220 + .proc_open = input_proc_devices_open, 1221 + .proc_poll = input_proc_devices_poll, 1222 + .proc_read = seq_read, 1223 + .proc_lseek = seq_lseek, 1224 + .proc_release = seq_release, 1226 1225 }; 1227 1226 1228 1227 static void *input_handlers_seq_start(struct seq_file *seq, loff_t *pos) ··· 1279 1280 return seq_open(file, &input_handlers_seq_ops); 1280 1281 } 1281 1282 1282 - static const struct file_operations input_handlers_fileops = { 1283 - .owner = THIS_MODULE, 1284 - .open = input_proc_handlers_open, 1285 - .read = seq_read, 1286 - .llseek = seq_lseek, 1287 - .release = seq_release, 1283 + static const struct proc_ops input_handlers_proc_ops = { 1284 + .proc_open = input_proc_handlers_open, 1285 + .proc_read = seq_read, 1286 + .proc_lseek = seq_lseek, 1287 + .proc_release = seq_release, 1288 1288 }; 1289 1289 1290 1290 static int __init input_proc_init(void) ··· 1295 1297 return -ENOMEM; 1296 1298 1297 1299 entry = proc_create("devices", 0, proc_bus_input_dir, 1298 - &input_devices_fileops); 1300 + &input_devices_proc_ops); 1299 1301 if (!entry) 1300 1302 goto fail1; 1301 1303 1302 1304 entry = proc_create("handlers", 0, proc_bus_input_dir, 1303 - &input_handlers_fileops); 1305 + &input_handlers_proc_ops); 1304 1306 if (!entry) 1305 1307 goto fail2; 1306 1308
+3 -3
drivers/isdn/capi/kcapi_proc.c
··· 199 199 return 0; 200 200 } 201 201 202 - static const struct file_operations empty_fops = { 203 - .read = empty_read, 202 + static const struct proc_ops empty_proc_ops = { 203 + .proc_read = empty_read, 204 204 }; 205 205 206 206 // --------------------------------------------------------------------------- ··· 214 214 proc_create_seq("capi/contrstats", 0, NULL, &seq_contrstats_ops); 215 215 proc_create_seq("capi/applications", 0, NULL, &seq_applications_ops); 216 216 proc_create_seq("capi/applstats", 0, NULL, &seq_applstats_ops); 217 - proc_create("capi/driver", 0, NULL, &empty_fops); 217 + proc_create("capi/driver", 0, NULL, &empty_proc_ops); 218 218 } 219 219 220 220 void
+8 -9
drivers/macintosh/via-pmu.c
··· 212 212 static int pmu_irqstats_proc_show(struct seq_file *m, void *v); 213 213 static int pmu_battery_proc_show(struct seq_file *m, void *v); 214 214 static void pmu_pass_intr(unsigned char *data, int len); 215 - static const struct file_operations pmu_options_proc_fops; 215 + static const struct proc_ops pmu_options_proc_ops; 216 216 217 217 #ifdef CONFIG_ADB 218 218 const struct adb_driver via_pmu_driver = { ··· 573 573 proc_pmu_irqstats = proc_create_single("interrupts", 0, 574 574 proc_pmu_root, pmu_irqstats_proc_show); 575 575 proc_pmu_options = proc_create("options", 0600, proc_pmu_root, 576 - &pmu_options_proc_fops); 576 + &pmu_options_proc_ops); 577 577 } 578 578 return 0; 579 579 } ··· 974 974 return fcount; 975 975 } 976 976 977 - static const struct file_operations pmu_options_proc_fops = { 978 - .owner = THIS_MODULE, 979 - .open = pmu_options_proc_open, 980 - .read = seq_read, 981 - .llseek = seq_lseek, 982 - .release = single_release, 983 - .write = pmu_options_proc_write, 977 + static const struct proc_ops pmu_options_proc_ops = { 978 + .proc_open = pmu_options_proc_open, 979 + .proc_read = seq_read, 980 + .proc_lseek = seq_lseek, 981 + .proc_release = single_release, 982 + .proc_write = pmu_options_proc_write, 984 983 }; 985 984 986 985 #ifdef CONFIG_ADB
+7 -8
drivers/md/md.c
··· 8279 8279 return mask; 8280 8280 } 8281 8281 8282 - static const struct file_operations md_seq_fops = { 8283 - .owner = THIS_MODULE, 8284 - .open = md_seq_open, 8285 - .read = seq_read, 8286 - .llseek = seq_lseek, 8287 - .release = seq_release, 8288 - .poll = mdstat_poll, 8282 + static const struct proc_ops mdstat_proc_ops = { 8283 + .proc_open = md_seq_open, 8284 + .proc_read = seq_read, 8285 + .proc_lseek = seq_lseek, 8286 + .proc_release = seq_release, 8287 + .proc_poll = mdstat_poll, 8289 8288 }; 8290 8289 8291 8290 int register_md_personality(struct md_personality *p) ··· 9453 9454 { 9454 9455 pr_debug("md: sizeof(mdp_super_t) = %d\n", (int)sizeof(mdp_super_t)); 9455 9456 9456 - proc_create("mdstat", S_IRUGO, NULL, &md_seq_fops); 9457 + proc_create("mdstat", S_IRUGO, NULL, &mdstat_proc_ops); 9457 9458 } 9458 9459 9459 9460 static int __init md_init(void)
+21 -21
drivers/misc/sgi-gru/gruprocfs.c
··· 255 255 } 256 256 257 257 /* *INDENT-OFF* */ 258 - static const struct file_operations statistics_fops = { 259 - .open = statistics_open, 260 - .read = seq_read, 261 - .write = statistics_write, 262 - .llseek = seq_lseek, 263 - .release = single_release, 258 + static const struct proc_ops statistics_proc_ops = { 259 + .proc_open = statistics_open, 260 + .proc_read = seq_read, 261 + .proc_write = statistics_write, 262 + .proc_lseek = seq_lseek, 263 + .proc_release = single_release, 264 264 }; 265 265 266 - static const struct file_operations mcs_statistics_fops = { 267 - .open = mcs_statistics_open, 268 - .read = seq_read, 269 - .write = mcs_statistics_write, 270 - .llseek = seq_lseek, 271 - .release = single_release, 266 + static const struct proc_ops mcs_statistics_proc_ops = { 267 + .proc_open = mcs_statistics_open, 268 + .proc_read = seq_read, 269 + .proc_write = mcs_statistics_write, 270 + .proc_lseek = seq_lseek, 271 + .proc_release = single_release, 272 272 }; 273 273 274 - static const struct file_operations options_fops = { 275 - .open = options_open, 276 - .read = seq_read, 277 - .write = options_write, 278 - .llseek = seq_lseek, 279 - .release = single_release, 274 + static const struct proc_ops options_proc_ops = { 275 + .proc_open = options_open, 276 + .proc_read = seq_read, 277 + .proc_write = options_write, 278 + .proc_lseek = seq_lseek, 279 + .proc_release = single_release, 280 280 }; 281 281 282 282 static struct proc_dir_entry *proc_gru __read_mostly; ··· 286 286 proc_gru = proc_mkdir("sgi_uv/gru", NULL); 287 287 if (!proc_gru) 288 288 return -1; 289 - if (!proc_create("statistics", 0644, proc_gru, &statistics_fops)) 289 + if (!proc_create("statistics", 0644, proc_gru, &statistics_proc_ops)) 290 290 goto err; 291 - if (!proc_create("mcs_statistics", 0644, proc_gru, &mcs_statistics_fops)) 291 + if (!proc_create("mcs_statistics", 0644, proc_gru, &mcs_statistics_proc_ops)) 292 292 goto err; 293 - if (!proc_create("debug_options", 0644, proc_gru, &options_fops)) 293 + if (!proc_create("debug_options", 0644, proc_gru, &options_proc_ops)) 294 294 goto err; 295 295 if (!proc_create_seq("cch_status", 0444, proc_gru, &cch_seq_ops)) 296 296 goto err;
+45 -53
drivers/net/wireless/cisco/airo.c
··· 4420 4420 static int proc_config_open( struct inode *inode, struct file *file ); 4421 4421 static int proc_wepkey_open( struct inode *inode, struct file *file ); 4422 4422 4423 - static const struct file_operations proc_statsdelta_ops = { 4424 - .owner = THIS_MODULE, 4425 - .read = proc_read, 4426 - .open = proc_statsdelta_open, 4427 - .release = proc_close, 4428 - .llseek = default_llseek, 4423 + static const struct proc_ops proc_statsdelta_ops = { 4424 + .proc_read = proc_read, 4425 + .proc_open = proc_statsdelta_open, 4426 + .proc_release = proc_close, 4427 + .proc_lseek = default_llseek, 4429 4428 }; 4430 4429 4431 - static const struct file_operations proc_stats_ops = { 4432 - .owner = THIS_MODULE, 4433 - .read = proc_read, 4434 - .open = proc_stats_open, 4435 - .release = proc_close, 4436 - .llseek = default_llseek, 4430 + static const struct proc_ops proc_stats_ops = { 4431 + .proc_read = proc_read, 4432 + .proc_open = proc_stats_open, 4433 + .proc_release = proc_close, 4434 + .proc_lseek = default_llseek, 4437 4435 }; 4438 4436 4439 - static const struct file_operations proc_status_ops = { 4440 - .owner = THIS_MODULE, 4441 - .read = proc_read, 4442 - .open = proc_status_open, 4443 - .release = proc_close, 4444 - .llseek = default_llseek, 4437 + static const struct proc_ops proc_status_ops = { 4438 + .proc_read = proc_read, 4439 + .proc_open = proc_status_open, 4440 + .proc_release = proc_close, 4441 + .proc_lseek = default_llseek, 4445 4442 }; 4446 4443 4447 - static const struct file_operations proc_SSID_ops = { 4448 - .owner = THIS_MODULE, 4449 - .read = proc_read, 4450 - .write = proc_write, 4451 - .open = proc_SSID_open, 4452 - .release = proc_close, 4453 - .llseek = default_llseek, 4444 + static const struct proc_ops proc_SSID_ops = { 4445 + .proc_read = proc_read, 4446 + .proc_write = proc_write, 4447 + .proc_open = proc_SSID_open, 4448 + .proc_release = proc_close, 4449 + .proc_lseek = default_llseek, 4454 4450 }; 4455 4451 4456 - static const struct file_operations proc_BSSList_ops = { 4457 - .owner = THIS_MODULE, 4458 - .read = proc_read, 4459 - .write = proc_write, 4460 - .open = proc_BSSList_open, 4461 - .release = proc_close, 4462 - .llseek = default_llseek, 4452 + static const struct proc_ops proc_BSSList_ops = { 4453 + .proc_read = proc_read, 4454 + .proc_write = proc_write, 4455 + .proc_open = proc_BSSList_open, 4456 + .proc_release = proc_close, 4457 + .proc_lseek = default_llseek, 4463 4458 }; 4464 4459 4465 - static const struct file_operations proc_APList_ops = { 4466 - .owner = THIS_MODULE, 4467 - .read = proc_read, 4468 - .write = proc_write, 4469 - .open = proc_APList_open, 4470 - .release = proc_close, 4471 - .llseek = default_llseek, 4460 + static const struct proc_ops proc_APList_ops = { 4461 + .proc_read = proc_read, 4462 + .proc_write = proc_write, 4463 + .proc_open = proc_APList_open, 4464 + .proc_release = proc_close, 4465 + .proc_lseek = default_llseek, 4472 4466 }; 4473 4467 4474 - static const struct file_operations proc_config_ops = { 4475 - .owner = THIS_MODULE, 4476 - .read = proc_read, 4477 - .write = proc_write, 4478 - .open = proc_config_open, 4479 - .release = proc_close, 4480 - .llseek = default_llseek, 4468 + static const struct proc_ops proc_config_ops = { 4469 + .proc_read = proc_read, 4470 + .proc_write = proc_write, 4471 + .proc_open = proc_config_open, 4472 + .proc_release = proc_close, 4473 + .proc_lseek = default_llseek, 4481 4474 }; 4482 4475 4483 - static const struct file_operations proc_wepkey_ops = { 4484 - .owner = THIS_MODULE, 4485 - .read = proc_read, 4486 - .write = proc_write, 4487 - .open = proc_wepkey_open, 4488 - .release = proc_close, 4489 - .llseek = default_llseek, 4476 + static const struct proc_ops proc_wepkey_ops = { 4477 + .proc_read = proc_read, 4478 + .proc_write = proc_write, 4479 + .proc_open = proc_wepkey_open, 4480 + .proc_release = proc_close, 4481 + .proc_lseek = default_llseek, 4490 4482 }; 4491 4483 4492 4484 static struct proc_dir_entry *airo_entry;
+7 -8
drivers/net/wireless/intel/ipw2x00/libipw_module.c
··· 240 240 return strnlen(buf, len); 241 241 } 242 242 243 - static const struct file_operations debug_level_proc_fops = { 244 - .owner = THIS_MODULE, 245 - .open = debug_level_proc_open, 246 - .read = seq_read, 247 - .llseek = seq_lseek, 248 - .release = single_release, 249 - .write = debug_level_proc_write, 243 + static const struct proc_ops debug_level_proc_ops = { 244 + .proc_open = debug_level_proc_open, 245 + .proc_read = seq_read, 246 + .proc_lseek = seq_lseek, 247 + .proc_release = single_release, 248 + .proc_write = debug_level_proc_write, 250 249 }; 251 250 #endif /* CONFIG_LIBIPW_DEBUG */ 252 251 ··· 262 263 return -EIO; 263 264 } 264 265 e = proc_create("debug_level", 0644, libipw_proc, 265 - &debug_level_proc_fops); 266 + &debug_level_proc_ops); 266 267 if (!e) { 267 268 remove_proc_entry(DRV_PROCNAME, init_net.proc_net); 268 269 libipw_proc = NULL;
+2 -2
drivers/net/wireless/intersil/hostap/hostap_hw.c
··· 126 126 127 127 #ifdef PRISM2_DOWNLOAD_SUPPORT 128 128 /* hostap_download.c */ 129 - static const struct file_operations prism2_download_aux_dump_proc_fops; 129 + static const struct proc_ops prism2_download_aux_dump_proc_ops; 130 130 static u8 * prism2_read_pda(struct net_device *dev); 131 131 static int prism2_download(local_info_t *local, 132 132 struct prism2_download_param *param); ··· 3094 3094 local->func->reset_port = prism2_reset_port; 3095 3095 local->func->schedule_reset = prism2_schedule_reset; 3096 3096 #ifdef PRISM2_DOWNLOAD_SUPPORT 3097 - local->func->read_aux_fops = &prism2_download_aux_dump_proc_fops; 3097 + local->func->read_aux_proc_ops = &prism2_download_aux_dump_proc_ops; 3098 3098 local->func->download = prism2_download; 3099 3099 #endif /* PRISM2_DOWNLOAD_SUPPORT */ 3100 3100 local->func->tx = prism2_tx_80211;
+7 -7
drivers/net/wireless/intersil/hostap/hostap_proc.c
··· 211 211 return count; 212 212 } 213 213 214 - static const struct file_operations prism2_pda_proc_fops = { 215 - .read = prism2_pda_proc_read, 216 - .llseek = generic_file_llseek, 214 + static const struct proc_ops prism2_pda_proc_ops = { 215 + .proc_read = prism2_pda_proc_read, 216 + .proc_lseek = generic_file_llseek, 217 217 }; 218 218 219 219 ··· 223 223 return 0; 224 224 } 225 225 226 - static const struct file_operations prism2_aux_dump_proc_fops = { 227 - .read = prism2_aux_dump_proc_no_read, 226 + static const struct proc_ops prism2_aux_dump_proc_ops = { 227 + .proc_read = prism2_aux_dump_proc_no_read, 228 228 }; 229 229 230 230 ··· 379 379 proc_create_seq_data("wds", 0, local->proc, 380 380 &prism2_wds_proc_seqops, local); 381 381 proc_create_data("pda", 0, local->proc, 382 - &prism2_pda_proc_fops, local); 382 + &prism2_pda_proc_ops, local); 383 383 proc_create_data("aux_dump", 0, local->proc, 384 - local->func->read_aux_fops ?: &prism2_aux_dump_proc_fops, 384 + local->func->read_aux_proc_ops ?: &prism2_aux_dump_proc_ops, 385 385 local); 386 386 proc_create_seq_data("bss_list", 0, local->proc, 387 387 &prism2_bss_list_proc_seqops, local);
+1 -1
drivers/net/wireless/intersil/hostap/hostap_wlan.h
··· 599 599 struct prism2_download_param *param); 600 600 int (*tx)(struct sk_buff *skb, struct net_device *dev); 601 601 int (*set_tim)(struct net_device *dev, int aid, int set); 602 - const struct file_operations *read_aux_fops; 602 + const struct proc_ops *read_aux_proc_ops; 603 603 604 604 int need_tx_headroom; /* number of bytes of headroom needed before 605 605 * IEEE 802.11 header */
+9 -11
drivers/net/wireless/ray_cs.c
··· 2717 2717 return count; 2718 2718 } 2719 2719 2720 - static const struct file_operations ray_cs_essid_proc_fops = { 2721 - .owner = THIS_MODULE, 2722 - .write = ray_cs_essid_proc_write, 2723 - .llseek = noop_llseek, 2720 + static const struct proc_ops ray_cs_essid_proc_ops = { 2721 + .proc_write = ray_cs_essid_proc_write, 2722 + .proc_lseek = noop_llseek, 2724 2723 }; 2725 2724 2726 2725 static ssize_t int_proc_write(struct file *file, const char __user *buffer, ··· 2750 2751 return count; 2751 2752 } 2752 2753 2753 - static const struct file_operations int_proc_fops = { 2754 - .owner = THIS_MODULE, 2755 - .write = int_proc_write, 2756 - .llseek = noop_llseek, 2754 + static const struct proc_ops int_proc_ops = { 2755 + .proc_write = int_proc_write, 2756 + .proc_lseek = noop_llseek, 2757 2757 }; 2758 2758 #endif 2759 2759 ··· 2788 2790 proc_mkdir("driver/ray_cs", NULL); 2789 2791 2790 2792 proc_create_single("driver/ray_cs/ray_cs", 0, NULL, ray_cs_proc_show); 2791 - proc_create("driver/ray_cs/essid", 0200, NULL, &ray_cs_essid_proc_fops); 2792 - proc_create_data("driver/ray_cs/net_type", 0200, NULL, &int_proc_fops, 2793 + proc_create("driver/ray_cs/essid", 0200, NULL, &ray_cs_essid_proc_ops); 2794 + proc_create_data("driver/ray_cs/net_type", 0200, NULL, &int_proc_ops, 2793 2795 &net_type); 2794 - proc_create_data("driver/ray_cs/translate", 0200, NULL, &int_proc_fops, 2796 + proc_create_data("driver/ray_cs/translate", 0200, NULL, &int_proc_ops, 2795 2797 &translate); 2796 2798 #endif 2797 2799 if (translate != 0)
+8 -9
drivers/parisc/led.c
··· 230 230 return -EINVAL; 231 231 } 232 232 233 - static const struct file_operations led_proc_fops = { 234 - .owner = THIS_MODULE, 235 - .open = led_proc_open, 236 - .read = seq_read, 237 - .llseek = seq_lseek, 238 - .release = single_release, 239 - .write = led_proc_write, 233 + static const struct proc_ops led_proc_ops = { 234 + .proc_open = led_proc_open, 235 + .proc_read = seq_read, 236 + .proc_lseek = seq_lseek, 237 + .proc_release = single_release, 238 + .proc_write = led_proc_write, 240 239 }; 241 240 242 241 static int __init led_create_procfs(void) ··· 251 252 if (!lcd_no_led_support) 252 253 { 253 254 ent = proc_create_data("led", S_IRUGO|S_IWUSR, proc_pdc_root, 254 - &led_proc_fops, (void *)LED_NOLCD); /* LED */ 255 + &led_proc_ops, (void *)LED_NOLCD); /* LED */ 255 256 if (!ent) return -1; 256 257 } 257 258 258 259 if (led_type == LED_HASLCD) 259 260 { 260 261 ent = proc_create_data("lcd", S_IRUGO|S_IWUSR, proc_pdc_root, 261 - &led_proc_fops, (void *)LED_HASLCD); /* LCD */ 262 + &led_proc_ops, (void *)LED_HASLCD); /* LCD */ 262 263 if (!ent) return -1; 263 264 } 264 265
+13 -12
drivers/pci/proc.c
··· 306 306 } 307 307 #endif /* HAVE_PCI_MMAP */ 308 308 309 - static const struct file_operations proc_bus_pci_operations = { 310 - .owner = THIS_MODULE, 311 - .llseek = proc_bus_pci_lseek, 312 - .read = proc_bus_pci_read, 313 - .write = proc_bus_pci_write, 314 - .unlocked_ioctl = proc_bus_pci_ioctl, 315 - .compat_ioctl = proc_bus_pci_ioctl, 309 + static const struct proc_ops proc_bus_pci_ops = { 310 + .proc_lseek = proc_bus_pci_lseek, 311 + .proc_read = proc_bus_pci_read, 312 + .proc_write = proc_bus_pci_write, 313 + .proc_ioctl = proc_bus_pci_ioctl, 314 + #ifdef CONFIG_COMPAT 315 + .proc_compat_ioctl = proc_bus_pci_ioctl, 316 + #endif 316 317 #ifdef HAVE_PCI_MMAP 317 - .open = proc_bus_pci_open, 318 - .release = proc_bus_pci_release, 319 - .mmap = proc_bus_pci_mmap, 318 + .proc_open = proc_bus_pci_open, 319 + .proc_release = proc_bus_pci_release, 320 + .proc_mmap = proc_bus_pci_mmap, 320 321 #ifdef HAVE_ARCH_PCI_GET_UNMAPPED_AREA 321 - .get_unmapped_area = get_pci_unmapped_area, 322 + .proc_get_unmapped_area = get_pci_unmapped_area, 322 323 #endif /* HAVE_ARCH_PCI_GET_UNMAPPED_AREA */ 323 324 #endif /* HAVE_PCI_MMAP */ 324 325 }; ··· 425 424 426 425 sprintf(name, "%02x.%x", PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); 427 426 e = proc_create_data(name, S_IFREG | S_IRUGO | S_IWUSR, bus->procdir, 428 - &proc_bus_pci_operations, dev); 427 + &proc_bus_pci_ops, dev); 429 428 if (!e) 430 429 return -ENOMEM; 431 430 proc_set_size(e, dev->cfg_size);
+7 -8
drivers/platform/x86/thinkpad_acpi.c
··· 907 907 return ret; 908 908 } 909 909 910 - static const struct file_operations dispatch_proc_fops = { 911 - .owner = THIS_MODULE, 912 - .open = dispatch_proc_open, 913 - .read = seq_read, 914 - .llseek = seq_lseek, 915 - .release = single_release, 916 - .write = dispatch_proc_write, 910 + static const struct proc_ops dispatch_proc_ops = { 911 + .proc_open = dispatch_proc_open, 912 + .proc_read = seq_read, 913 + .proc_lseek = seq_lseek, 914 + .proc_release = single_release, 915 + .proc_write = dispatch_proc_write, 917 916 }; 918 917 919 918 static char *next_cmd(char **cmds) ··· 9983 9984 if (ibm->write) 9984 9985 mode |= S_IWUSR; 9985 9986 entry = proc_create_data(ibm->name, mode, proc_dir, 9986 - &dispatch_proc_fops, ibm); 9987 + &dispatch_proc_ops, ibm); 9987 9988 if (!entry) { 9988 9989 pr_err("unable to create proc entry %s\n", ibm->name); 9989 9990 ret = -ENODEV;
+28 -32
drivers/platform/x86/toshiba_acpi.c
··· 1432 1432 return count; 1433 1433 } 1434 1434 1435 - static const struct file_operations lcd_proc_fops = { 1436 - .owner = THIS_MODULE, 1437 - .open = lcd_proc_open, 1438 - .read = seq_read, 1439 - .llseek = seq_lseek, 1440 - .release = single_release, 1441 - .write = lcd_proc_write, 1435 + static const struct proc_ops lcd_proc_ops = { 1436 + .proc_open = lcd_proc_open, 1437 + .proc_read = seq_read, 1438 + .proc_lseek = seq_lseek, 1439 + .proc_release = single_release, 1440 + .proc_write = lcd_proc_write, 1442 1441 }; 1443 1442 1444 1443 /* Video-Out */ ··· 1538 1539 return ret ? -EIO : count; 1539 1540 } 1540 1541 1541 - static const struct file_operations video_proc_fops = { 1542 - .owner = THIS_MODULE, 1543 - .open = video_proc_open, 1544 - .read = seq_read, 1545 - .llseek = seq_lseek, 1546 - .release = single_release, 1547 - .write = video_proc_write, 1542 + static const struct proc_ops video_proc_ops = { 1543 + .proc_open = video_proc_open, 1544 + .proc_read = seq_read, 1545 + .proc_lseek = seq_lseek, 1546 + .proc_release = single_release, 1547 + .proc_write = video_proc_write, 1548 1548 }; 1549 1549 1550 1550 /* Fan status */ ··· 1615 1617 return count; 1616 1618 } 1617 1619 1618 - static const struct file_operations fan_proc_fops = { 1619 - .owner = THIS_MODULE, 1620 - .open = fan_proc_open, 1621 - .read = seq_read, 1622 - .llseek = seq_lseek, 1623 - .release = single_release, 1624 - .write = fan_proc_write, 1620 + static const struct proc_ops fan_proc_ops = { 1621 + .proc_open = fan_proc_open, 1622 + .proc_read = seq_read, 1623 + .proc_lseek = seq_lseek, 1624 + .proc_release = single_release, 1625 + .proc_write = fan_proc_write, 1625 1626 }; 1626 1627 1627 1628 static int keys_proc_show(struct seq_file *m, void *v) ··· 1659 1662 return count; 1660 1663 } 1661 1664 1662 - static const struct file_operations keys_proc_fops = { 1663 - .owner = THIS_MODULE, 1664 - .open = keys_proc_open, 1665 - .read = seq_read, 1666 - .llseek = seq_lseek, 1667 - .release = single_release, 1668 - .write = keys_proc_write, 1665 + static const struct proc_ops keys_proc_ops = { 1666 + .proc_open = keys_proc_open, 1667 + .proc_read = seq_read, 1668 + .proc_lseek = seq_lseek, 1669 + .proc_release = single_release, 1670 + .proc_write = keys_proc_write, 1669 1671 }; 1670 1672 1671 1673 static int __maybe_unused version_proc_show(struct seq_file *m, void *v) ··· 1684 1688 { 1685 1689 if (dev->backlight_dev) 1686 1690 proc_create_data("lcd", S_IRUGO | S_IWUSR, toshiba_proc_dir, 1687 - &lcd_proc_fops, dev); 1691 + &lcd_proc_ops, dev); 1688 1692 if (dev->video_supported) 1689 1693 proc_create_data("video", S_IRUGO | S_IWUSR, toshiba_proc_dir, 1690 - &video_proc_fops, dev); 1694 + &video_proc_ops, dev); 1691 1695 if (dev->fan_supported) 1692 1696 proc_create_data("fan", S_IRUGO | S_IWUSR, toshiba_proc_dir, 1693 - &fan_proc_fops, dev); 1697 + &fan_proc_ops, dev); 1694 1698 if (dev->hotkey_dev) 1695 1699 proc_create_data("keys", S_IRUGO | S_IWUSR, toshiba_proc_dir, 1696 - &keys_proc_fops, dev); 1700 + &keys_proc_ops, dev); 1697 1701 proc_create_single_data("version", S_IRUGO, toshiba_proc_dir, 1698 1702 version_proc_show, dev); 1699 1703 }
+4 -5
drivers/pnp/isapnp/proc.c
··· 49 49 return nbytes; 50 50 } 51 51 52 - static const struct file_operations isapnp_proc_bus_file_operations = { 53 - .owner = THIS_MODULE, 54 - .llseek = isapnp_proc_bus_lseek, 55 - .read = isapnp_proc_bus_read, 52 + static const struct proc_ops isapnp_proc_bus_proc_ops = { 53 + .proc_lseek = isapnp_proc_bus_lseek, 54 + .proc_read = isapnp_proc_bus_read, 56 55 }; 57 56 58 57 static int isapnp_proc_attach_device(struct pnp_dev *dev) ··· 68 69 } 69 70 sprintf(name, "%02x", dev->number); 70 71 e = dev->procent = proc_create_data(name, S_IFREG | S_IRUGO, de, 71 - &isapnp_proc_bus_file_operations, dev); 72 + &isapnp_proc_bus_proc_ops, dev); 72 73 if (!e) 73 74 return -ENOMEM; 74 75 proc_set_size(e, 256);
+8 -9
drivers/pnp/pnpbios/proc.c
··· 210 210 return ret; 211 211 } 212 212 213 - static const struct file_operations pnpbios_proc_fops = { 214 - .owner = THIS_MODULE, 215 - .open = pnpbios_proc_open, 216 - .read = seq_read, 217 - .llseek = seq_lseek, 218 - .release = single_release, 219 - .write = pnpbios_proc_write, 213 + static const struct proc_ops pnpbios_proc_ops = { 214 + .proc_open = pnpbios_proc_open, 215 + .proc_read = seq_read, 216 + .proc_lseek = seq_lseek, 217 + .proc_release = single_release, 218 + .proc_write = pnpbios_proc_write, 220 219 }; 221 220 222 221 int pnpbios_interface_attach_device(struct pnp_bios_node *node) ··· 227 228 if (!proc_pnp) 228 229 return -EIO; 229 230 if (!pnpbios_dont_use_current_config) { 230 - proc_create_data(name, 0644, proc_pnp, &pnpbios_proc_fops, 231 + proc_create_data(name, 0644, proc_pnp, &pnpbios_proc_ops, 231 232 (void *)(long)(node->handle)); 232 233 } 233 234 234 235 if (!proc_pnp_boot) 235 236 return -EIO; 236 - if (proc_create_data(name, 0644, proc_pnp_boot, &pnpbios_proc_fops, 237 + if (proc_create_data(name, 0644, proc_pnp_boot, &pnpbios_proc_ops, 237 238 (void *)(long)(node->handle + 0x100))) 238 239 return 0; 239 240 return -EIO;
+7 -8
drivers/s390/block/dasd_proc.c
··· 320 320 #endif /* CONFIG_DASD_PROFILE */ 321 321 } 322 322 323 - static const struct file_operations dasd_stats_proc_fops = { 324 - .owner = THIS_MODULE, 325 - .open = dasd_stats_proc_open, 326 - .read = seq_read, 327 - .llseek = seq_lseek, 328 - .release = single_release, 329 - .write = dasd_stats_proc_write, 323 + static const struct proc_ops dasd_stats_proc_ops = { 324 + .proc_open = dasd_stats_proc_open, 325 + .proc_read = seq_read, 326 + .proc_lseek = seq_lseek, 327 + .proc_release = single_release, 328 + .proc_write = dasd_stats_proc_write, 330 329 }; 331 330 332 331 /* ··· 346 347 dasd_statistics_entry = proc_create("statistics", 347 348 S_IFREG | S_IRUGO | S_IWUSR, 348 349 dasd_proc_root_entry, 349 - &dasd_stats_proc_fops); 350 + &dasd_stats_proc_ops); 350 351 if (!dasd_statistics_entry) 351 352 goto out_nostatistics; 352 353 return 0;
+7 -7
drivers/s390/cio/blacklist.c
··· 398 398 sizeof(struct ccwdev_iter)); 399 399 } 400 400 401 - static const struct file_operations cio_ignore_proc_fops = { 402 - .open = cio_ignore_proc_open, 403 - .read = seq_read, 404 - .llseek = seq_lseek, 405 - .release = seq_release_private, 406 - .write = cio_ignore_write, 401 + static const struct proc_ops cio_ignore_proc_ops = { 402 + .proc_open = cio_ignore_proc_open, 403 + .proc_read = seq_read, 404 + .proc_lseek = seq_lseek, 405 + .proc_release = seq_release_private, 406 + .proc_write = cio_ignore_write, 407 407 }; 408 408 409 409 static int ··· 412 412 struct proc_dir_entry *entry; 413 413 414 414 entry = proc_create("cio_ignore", S_IFREG | S_IRUGO | S_IWUSR, NULL, 415 - &cio_ignore_proc_fops); 415 + &cio_ignore_proc_ops); 416 416 if (!entry) 417 417 return -ENOENT; 418 418 return 0;
+5 -6
drivers/s390/cio/css.c
··· 1372 1372 return ret ? ret : count; 1373 1373 } 1374 1374 1375 - static const struct file_operations cio_settle_proc_fops = { 1376 - .open = nonseekable_open, 1377 - .write = cio_settle_write, 1378 - .llseek = no_llseek, 1375 + static const struct proc_ops cio_settle_proc_ops = { 1376 + .proc_open = nonseekable_open, 1377 + .proc_write = cio_settle_write, 1378 + .proc_lseek = no_llseek, 1379 1379 }; 1380 1380 1381 1381 static int __init cio_settle_init(void) 1382 1382 { 1383 1383 struct proc_dir_entry *entry; 1384 1384 1385 - entry = proc_create("cio_settle", S_IWUSR, NULL, 1386 - &cio_settle_proc_fops); 1385 + entry = proc_create("cio_settle", S_IWUSR, NULL, &cio_settle_proc_ops); 1387 1386 if (!entry) 1388 1387 return -ENOMEM; 1389 1388 return 0;
+8 -1
drivers/scsi/esas2r/esas2r_main.c
··· 617 617 .unlocked_ioctl = esas2r_proc_ioctl, 618 618 }; 619 619 620 + static const struct proc_ops esas2r_proc_ops = { 621 + .proc_ioctl = esas2r_proc_ioctl, 622 + #ifdef CONFIG_COMPAT 623 + .proc_compat_ioctl = compat_ptr_ioctl, 624 + #endif 625 + }; 626 + 620 627 static struct Scsi_Host *esas2r_proc_host; 621 628 static int esas2r_proc_major; 622 629 ··· 735 728 736 729 pde = proc_create(ATTONODE_NAME, 0, 737 730 sh->hostt->proc_dir, 738 - &esas2r_proc_fops); 731 + &esas2r_proc_ops); 739 732 740 733 if (!pde) { 741 734 esas2r_log_dev(ESAS2R_LOG_WARN,
+7 -8
drivers/scsi/scsi_devinfo.c
··· 736 736 return err; 737 737 } 738 738 739 - static const struct file_operations scsi_devinfo_proc_fops = { 740 - .owner = THIS_MODULE, 741 - .open = proc_scsi_devinfo_open, 742 - .read = seq_read, 743 - .write = proc_scsi_devinfo_write, 744 - .llseek = seq_lseek, 745 - .release = seq_release, 739 + static const struct proc_ops scsi_devinfo_proc_ops = { 740 + .proc_open = proc_scsi_devinfo_open, 741 + .proc_read = seq_read, 742 + .proc_write = proc_scsi_devinfo_write, 743 + .proc_lseek = seq_lseek, 744 + .proc_release = seq_release, 746 745 }; 747 746 #endif /* CONFIG_SCSI_PROC_FS */ 748 747 ··· 866 867 } 867 868 868 869 #ifdef CONFIG_SCSI_PROC_FS 869 - p = proc_create("scsi/device_info", 0, NULL, &scsi_devinfo_proc_fops); 870 + p = proc_create("scsi/device_info", 0, NULL, &scsi_devinfo_proc_ops); 870 871 if (!p) { 871 872 error = -ENOMEM; 872 873 goto out;
+14 -15
drivers/scsi/scsi_proc.c
··· 83 83 4 * PAGE_SIZE); 84 84 } 85 85 86 - static const struct file_operations proc_scsi_fops = { 87 - .open = proc_scsi_host_open, 88 - .release = single_release, 89 - .read = seq_read, 90 - .llseek = seq_lseek, 91 - .write = proc_scsi_host_write 86 + static const struct proc_ops proc_scsi_ops = { 87 + .proc_open = proc_scsi_host_open, 88 + .proc_release = single_release, 89 + .proc_read = seq_read, 90 + .proc_lseek = seq_lseek, 91 + .proc_write = proc_scsi_host_write 92 92 }; 93 93 94 94 /** ··· 146 146 147 147 sprintf(name,"%d", shost->host_no); 148 148 p = proc_create_data(name, S_IRUGO | S_IWUSR, 149 - sht->proc_dir, &proc_scsi_fops, shost); 149 + sht->proc_dir, &proc_scsi_ops, shost); 150 150 if (!p) 151 151 printk(KERN_ERR "%s: Failed to register host %d in" 152 152 "%s\n", __func__, shost->host_no, ··· 436 436 return seq_open(file, &scsi_seq_ops); 437 437 } 438 438 439 - static const struct file_operations proc_scsi_operations = { 440 - .owner = THIS_MODULE, 441 - .open = proc_scsi_open, 442 - .read = seq_read, 443 - .write = proc_scsi_write, 444 - .llseek = seq_lseek, 445 - .release = seq_release, 439 + static const struct proc_ops scsi_scsi_proc_ops = { 440 + .proc_open = proc_scsi_open, 441 + .proc_read = seq_read, 442 + .proc_write = proc_scsi_write, 443 + .proc_lseek = seq_lseek, 444 + .proc_release = seq_release, 446 445 }; 447 446 448 447 /** ··· 455 456 if (!proc_scsi) 456 457 goto err1; 457 458 458 - pde = proc_create("scsi/scsi", 0, NULL, &proc_scsi_operations); 459 + pde = proc_create("scsi/scsi", 0, NULL, &scsi_scsi_proc_ops); 459 460 if (!pde) 460 461 goto err2; 461 462
+14 -16
drivers/scsi/sg.c
··· 2322 2322 static int sg_proc_single_open_adio(struct inode *inode, struct file *file); 2323 2323 static ssize_t sg_proc_write_adio(struct file *filp, const char __user *buffer, 2324 2324 size_t count, loff_t *off); 2325 - static const struct file_operations adio_fops = { 2326 - .owner = THIS_MODULE, 2327 - .open = sg_proc_single_open_adio, 2328 - .read = seq_read, 2329 - .llseek = seq_lseek, 2330 - .write = sg_proc_write_adio, 2331 - .release = single_release, 2325 + static const struct proc_ops adio_proc_ops = { 2326 + .proc_open = sg_proc_single_open_adio, 2327 + .proc_read = seq_read, 2328 + .proc_lseek = seq_lseek, 2329 + .proc_write = sg_proc_write_adio, 2330 + .proc_release = single_release, 2332 2331 }; 2333 2332 2334 2333 static int sg_proc_single_open_dressz(struct inode *inode, struct file *file); 2335 2334 static ssize_t sg_proc_write_dressz(struct file *filp, 2336 2335 const char __user *buffer, size_t count, loff_t *off); 2337 - static const struct file_operations dressz_fops = { 2338 - .owner = THIS_MODULE, 2339 - .open = sg_proc_single_open_dressz, 2340 - .read = seq_read, 2341 - .llseek = seq_lseek, 2342 - .write = sg_proc_write_dressz, 2343 - .release = single_release, 2336 + static const struct proc_ops dressz_proc_ops = { 2337 + .proc_open = sg_proc_single_open_dressz, 2338 + .proc_read = seq_read, 2339 + .proc_lseek = seq_lseek, 2340 + .proc_write = sg_proc_write_dressz, 2341 + .proc_release = single_release, 2344 2342 }; 2345 2343 2346 2344 static int sg_proc_seq_show_version(struct seq_file *s, void *v); ··· 2379 2381 if (!p) 2380 2382 return 1; 2381 2383 2382 - proc_create("allow_dio", S_IRUGO | S_IWUSR, p, &adio_fops); 2384 + proc_create("allow_dio", S_IRUGO | S_IWUSR, p, &adio_proc_ops); 2383 2385 proc_create_seq("debug", S_IRUGO, p, &debug_seq_ops); 2384 - proc_create("def_reserved_size", S_IRUGO | S_IWUSR, p, &dressz_fops); 2386 + proc_create("def_reserved_size", S_IRUGO | S_IWUSR, p, &dressz_proc_ops); 2385 2387 proc_create_single("device_hdr", S_IRUGO, p, sg_proc_seq_show_devhdr); 2386 2388 proc_create_seq("devices", S_IRUGO, p, &dev_seq_ops); 2387 2389 proc_create_seq("device_strs", S_IRUGO, p, &devstrs_seq_ops);
+7 -7
drivers/staging/rtl8192u/ieee80211/ieee80211_module.c
··· 264 264 return single_open(file, show_debug_level, NULL); 265 265 } 266 266 267 - static const struct file_operations fops = { 268 - .open = open_debug_level, 269 - .read = seq_read, 270 - .llseek = seq_lseek, 271 - .write = write_debug_level, 272 - .release = single_release, 267 + static const struct proc_ops debug_level_proc_ops = { 268 + .proc_open = open_debug_level, 269 + .proc_read = seq_read, 270 + .proc_lseek = seq_lseek, 271 + .proc_write = write_debug_level, 272 + .proc_release = single_release, 273 273 }; 274 274 275 275 int __init ieee80211_debug_init(void) ··· 284 284 " proc directory\n"); 285 285 return -EIO; 286 286 } 287 - e = proc_create("debug_level", 0644, ieee80211_proc, &fops); 287 + e = proc_create("debug_level", 0644, ieee80211_proc, &debug_level_proc_ops); 288 288 if (!e) { 289 289 remove_proc_entry(DRV_NAME, init_net.proc_net); 290 290 ieee80211_proc = NULL;
+4 -4
drivers/tty/sysrq.c
··· 1101 1101 return count; 1102 1102 } 1103 1103 1104 - static const struct file_operations proc_sysrq_trigger_operations = { 1105 - .write = write_sysrq_trigger, 1106 - .llseek = noop_llseek, 1104 + static const struct proc_ops sysrq_trigger_proc_ops = { 1105 + .proc_write = write_sysrq_trigger, 1106 + .proc_lseek = noop_llseek, 1107 1107 }; 1108 1108 1109 1109 static void sysrq_init_procfs(void) 1110 1110 { 1111 1111 if (!proc_create("sysrq-trigger", S_IWUSR, NULL, 1112 - &proc_sysrq_trigger_operations)) 1112 + &sysrq_trigger_proc_ops)) 1113 1113 pr_err("Failed to register proc interface\n"); 1114 1114 } 1115 1115
+8 -9
drivers/usb/gadget/function/rndis.c
··· 72 72 73 73 #ifdef CONFIG_USB_GADGET_DEBUG_FILES 74 74 75 - static const struct file_operations rndis_proc_fops; 75 + static const struct proc_ops rndis_proc_ops; 76 76 77 77 #endif /* CONFIG_USB_GADGET_DEBUG_FILES */ 78 78 ··· 902 902 903 903 sprintf(name, NAME_TEMPLATE, i); 904 904 proc_entry = proc_create_data(name, 0660, NULL, 905 - &rndis_proc_fops, params); 905 + &rndis_proc_ops, params); 906 906 if (!proc_entry) { 907 907 kfree(params); 908 908 rndis_put_nr(i); ··· 1164 1164 return single_open(file, rndis_proc_show, PDE_DATA(inode)); 1165 1165 } 1166 1166 1167 - static const struct file_operations rndis_proc_fops = { 1168 - .owner = THIS_MODULE, 1169 - .open = rndis_proc_open, 1170 - .read = seq_read, 1171 - .llseek = seq_lseek, 1172 - .release = single_release, 1173 - .write = rndis_proc_write, 1167 + static const struct proc_ops rndis_proc_ops = { 1168 + .proc_open = rndis_proc_open, 1169 + .proc_read = seq_read, 1170 + .proc_lseek = seq_lseek, 1171 + .proc_release = single_release, 1172 + .proc_write = rndis_proc_write, 1174 1173 }; 1175 1174 1176 1175 #define NAME_TEMPLATE "driver/rndis-%03d"
+49 -56
drivers/video/fbdev/via/viafbdev.c
··· 1173 1173 return count; 1174 1174 } 1175 1175 1176 - static const struct file_operations viafb_dvp0_proc_fops = { 1177 - .owner = THIS_MODULE, 1178 - .open = viafb_dvp0_proc_open, 1179 - .read = seq_read, 1180 - .llseek = seq_lseek, 1181 - .release = single_release, 1182 - .write = viafb_dvp0_proc_write, 1176 + static const struct proc_ops viafb_dvp0_proc_ops = { 1177 + .proc_open = viafb_dvp0_proc_open, 1178 + .proc_read = seq_read, 1179 + .proc_lseek = seq_lseek, 1180 + .proc_release = single_release, 1181 + .proc_write = viafb_dvp0_proc_write, 1183 1182 }; 1184 1183 1185 1184 static int viafb_dvp1_proc_show(struct seq_file *m, void *v) ··· 1237 1238 return count; 1238 1239 } 1239 1240 1240 - static const struct file_operations viafb_dvp1_proc_fops = { 1241 - .owner = THIS_MODULE, 1242 - .open = viafb_dvp1_proc_open, 1243 - .read = seq_read, 1244 - .llseek = seq_lseek, 1245 - .release = single_release, 1246 - .write = viafb_dvp1_proc_write, 1241 + static const struct proc_ops viafb_dvp1_proc_ops = { 1242 + .proc_open = viafb_dvp1_proc_open, 1243 + .proc_read = seq_read, 1244 + .proc_lseek = seq_lseek, 1245 + .proc_release = single_release, 1246 + .proc_write = viafb_dvp1_proc_write, 1247 1247 }; 1248 1248 1249 1249 static int viafb_dfph_proc_show(struct seq_file *m, void *v) ··· 1271 1273 return count; 1272 1274 } 1273 1275 1274 - static const struct file_operations viafb_dfph_proc_fops = { 1275 - .owner = THIS_MODULE, 1276 - .open = viafb_dfph_proc_open, 1277 - .read = seq_read, 1278 - .llseek = seq_lseek, 1279 - .release = single_release, 1280 - .write = viafb_dfph_proc_write, 1276 + static const struct proc_ops viafb_dfph_proc_ops = { 1277 + .proc_open = viafb_dfph_proc_open, 1278 + .proc_read = seq_read, 1279 + .proc_lseek = seq_lseek, 1280 + .proc_release = single_release, 1281 + .proc_write = viafb_dfph_proc_write, 1281 1282 }; 1282 1283 1283 1284 static int viafb_dfpl_proc_show(struct seq_file *m, void *v) ··· 1305 1308 return count; 1306 1309 } 1307 1310 1308 - static const struct file_operations viafb_dfpl_proc_fops = { 1309 - .owner = THIS_MODULE, 1310 - .open = viafb_dfpl_proc_open, 1311 - .read = seq_read, 1312 - .llseek = seq_lseek, 1313 - .release = single_release, 1314 - .write = viafb_dfpl_proc_write, 1311 + static const struct proc_ops viafb_dfpl_proc_ops = { 1312 + .proc_open = viafb_dfpl_proc_open, 1313 + .proc_read = seq_read, 1314 + .proc_lseek = seq_lseek, 1315 + .proc_release = single_release, 1316 + .proc_write = viafb_dfpl_proc_write, 1315 1317 }; 1316 1318 1317 1319 static int viafb_vt1636_proc_show(struct seq_file *m, void *v) ··· 1440 1444 return count; 1441 1445 } 1442 1446 1443 - static const struct file_operations viafb_vt1636_proc_fops = { 1444 - .owner = THIS_MODULE, 1445 - .open = viafb_vt1636_proc_open, 1446 - .read = seq_read, 1447 - .llseek = seq_lseek, 1448 - .release = single_release, 1449 - .write = viafb_vt1636_proc_write, 1447 + static const struct proc_ops viafb_vt1636_proc_ops = { 1448 + .proc_open = viafb_vt1636_proc_open, 1449 + .proc_read = seq_read, 1450 + .proc_lseek = seq_lseek, 1451 + .proc_release = single_release, 1452 + .proc_write = viafb_vt1636_proc_write, 1450 1453 }; 1451 1454 1452 1455 #endif /* CONFIG_FB_VIA_DIRECT_PROCFS */ ··· 1517 1522 return res; 1518 1523 } 1519 1524 1520 - static const struct file_operations viafb_iga1_odev_proc_fops = { 1521 - .owner = THIS_MODULE, 1522 - .open = viafb_iga1_odev_proc_open, 1523 - .read = seq_read, 1524 - .llseek = seq_lseek, 1525 - .release = single_release, 1526 - .write = viafb_iga1_odev_proc_write, 1525 + static const struct proc_ops viafb_iga1_odev_proc_ops = { 1526 + .proc_open = viafb_iga1_odev_proc_open, 1527 + .proc_read = seq_read, 1528 + .proc_lseek = seq_lseek, 1529 + .proc_release = single_release, 1530 + .proc_write = viafb_iga1_odev_proc_write, 1527 1531 }; 1528 1532 1529 1533 static int viafb_iga2_odev_proc_show(struct seq_file *m, void *v) ··· 1556 1562 return res; 1557 1563 } 1558 1564 1559 - static const struct file_operations viafb_iga2_odev_proc_fops = { 1560 - .owner = THIS_MODULE, 1561 - .open = viafb_iga2_odev_proc_open, 1562 - .read = seq_read, 1563 - .llseek = seq_lseek, 1564 - .release = single_release, 1565 - .write = viafb_iga2_odev_proc_write, 1565 + static const struct proc_ops viafb_iga2_odev_proc_ops = { 1566 + .proc_open = viafb_iga2_odev_proc_open, 1567 + .proc_read = seq_read, 1568 + .proc_lseek = seq_lseek, 1569 + .proc_release = single_release, 1570 + .proc_write = viafb_iga2_odev_proc_write, 1566 1571 }; 1567 1572 1568 1573 #define IS_VT1636(lvds_chip) ((lvds_chip).lvds_chip_name == VT1636_LVDS) ··· 1573 1580 shared->proc_entry = viafb_entry; 1574 1581 if (viafb_entry) { 1575 1582 #ifdef CONFIG_FB_VIA_DIRECT_PROCFS 1576 - proc_create("dvp0", 0, viafb_entry, &viafb_dvp0_proc_fops); 1577 - proc_create("dvp1", 0, viafb_entry, &viafb_dvp1_proc_fops); 1578 - proc_create("dfph", 0, viafb_entry, &viafb_dfph_proc_fops); 1579 - proc_create("dfpl", 0, viafb_entry, &viafb_dfpl_proc_fops); 1583 + proc_create("dvp0", 0, viafb_entry, &viafb_dvp0_proc_ops); 1584 + proc_create("dvp1", 0, viafb_entry, &viafb_dvp1_proc_ops); 1585 + proc_create("dfph", 0, viafb_entry, &viafb_dfph_proc_ops); 1586 + proc_create("dfpl", 0, viafb_entry, &viafb_dfpl_proc_ops); 1580 1587 if (IS_VT1636(shared->chip_info.lvds_chip_info) 1581 1588 || IS_VT1636(shared->chip_info.lvds_chip_info2)) 1582 1589 proc_create("vt1636", 0, viafb_entry, 1583 - &viafb_vt1636_proc_fops); 1590 + &viafb_vt1636_proc_ops); 1584 1591 #endif /* CONFIG_FB_VIA_DIRECT_PROCFS */ 1585 1592 1586 1593 proc_create_single("supported_output_devices", 0, viafb_entry, ··· 1588 1595 iga1_entry = proc_mkdir("iga1", viafb_entry); 1589 1596 shared->iga1_proc_entry = iga1_entry; 1590 1597 proc_create("output_devices", 0, iga1_entry, 1591 - &viafb_iga1_odev_proc_fops); 1598 + &viafb_iga1_odev_proc_ops); 1592 1599 iga2_entry = proc_mkdir("iga2", viafb_entry); 1593 1600 shared->iga2_proc_entry = iga2_entry; 1594 1601 proc_create("output_devices", 0, iga2_entry, 1595 - &viafb_iga2_odev_proc_fops); 1602 + &viafb_iga2_odev_proc_ops); 1596 1603 } 1597 1604 } 1598 1605 static void viafb_remove_proc(struct viafb_shared *shared)
+4 -5
drivers/zorro/proc.c
··· 56 56 return nbytes; 57 57 } 58 58 59 - static const struct file_operations proc_bus_zorro_operations = { 60 - .owner = THIS_MODULE, 61 - .llseek = proc_bus_zorro_lseek, 62 - .read = proc_bus_zorro_read, 59 + static const struct proc_ops bus_zorro_proc_ops = { 60 + .proc_lseek = proc_bus_zorro_lseek, 61 + .proc_read = proc_bus_zorro_read, 63 62 }; 64 63 65 64 static void * zorro_seq_start(struct seq_file *m, loff_t *pos) ··· 104 105 105 106 sprintf(name, "%02x", slot); 106 107 entry = proc_create_data(name, 0, proc_bus_zorro_dir, 107 - &proc_bus_zorro_operations, 108 + &bus_zorro_proc_ops, 108 109 &zorro_autocon[slot]); 109 110 if (!entry) 110 111 return -ENOMEM;
+54 -54
fs/cifs/cifs_debug.c
··· 611 611 return single_open(file, cifs_stats_proc_show, NULL); 612 612 } 613 613 614 - static const struct file_operations cifs_stats_proc_fops = { 615 - .open = cifs_stats_proc_open, 616 - .read = seq_read, 617 - .llseek = seq_lseek, 618 - .release = single_release, 619 - .write = cifs_stats_proc_write, 614 + static const struct proc_ops cifs_stats_proc_ops = { 615 + .proc_open = cifs_stats_proc_open, 616 + .proc_read = seq_read, 617 + .proc_lseek = seq_lseek, 618 + .proc_release = single_release, 619 + .proc_write = cifs_stats_proc_write, 620 620 }; 621 621 622 622 #ifdef CONFIG_CIFS_SMB_DIRECT ··· 640 640 return single_open(file, name##_proc_show, NULL); \ 641 641 } \ 642 642 \ 643 - static const struct file_operations cifs_##name##_proc_fops = { \ 644 - .open = name##_open, \ 645 - .read = seq_read, \ 646 - .llseek = seq_lseek, \ 647 - .release = single_release, \ 648 - .write = name##_write, \ 643 + static const struct proc_ops cifs_##name##_proc_fops = { \ 644 + .proc_open = name##_open, \ 645 + .proc_read = seq_read, \ 646 + .proc_lseek = seq_lseek, \ 647 + .proc_release = single_release, \ 648 + .proc_write = name##_write, \ 649 649 } 650 650 651 651 PROC_FILE_DEFINE(rdma_readwrite_threshold); ··· 659 659 #endif 660 660 661 661 static struct proc_dir_entry *proc_fs_cifs; 662 - static const struct file_operations cifsFYI_proc_fops; 663 - static const struct file_operations cifs_lookup_cache_proc_fops; 664 - static const struct file_operations traceSMB_proc_fops; 665 - static const struct file_operations cifs_security_flags_proc_fops; 666 - static const struct file_operations cifs_linux_ext_proc_fops; 662 + static const struct proc_ops cifsFYI_proc_ops; 663 + static const struct proc_ops cifs_lookup_cache_proc_ops; 664 + static const struct proc_ops traceSMB_proc_ops; 665 + static const struct proc_ops cifs_security_flags_proc_ops; 666 + static const struct proc_ops cifs_linux_ext_proc_ops; 667 667 668 668 void 669 669 cifs_proc_init(void) ··· 678 678 proc_create_single("open_files", 0400, proc_fs_cifs, 679 679 cifs_debug_files_proc_show); 680 680 681 - proc_create("Stats", 0644, proc_fs_cifs, &cifs_stats_proc_fops); 682 - proc_create("cifsFYI", 0644, proc_fs_cifs, &cifsFYI_proc_fops); 683 - proc_create("traceSMB", 0644, proc_fs_cifs, &traceSMB_proc_fops); 681 + proc_create("Stats", 0644, proc_fs_cifs, &cifs_stats_proc_ops); 682 + proc_create("cifsFYI", 0644, proc_fs_cifs, &cifsFYI_proc_ops); 683 + proc_create("traceSMB", 0644, proc_fs_cifs, &traceSMB_proc_ops); 684 684 proc_create("LinuxExtensionsEnabled", 0644, proc_fs_cifs, 685 - &cifs_linux_ext_proc_fops); 685 + &cifs_linux_ext_proc_ops); 686 686 proc_create("SecurityFlags", 0644, proc_fs_cifs, 687 - &cifs_security_flags_proc_fops); 687 + &cifs_security_flags_proc_ops); 688 688 proc_create("LookupCacheEnabled", 0644, proc_fs_cifs, 689 - &cifs_lookup_cache_proc_fops); 689 + &cifs_lookup_cache_proc_ops); 690 690 691 691 #ifdef CONFIG_CIFS_DFS_UPCALL 692 - proc_create("dfscache", 0644, proc_fs_cifs, &dfscache_proc_fops); 692 + proc_create("dfscache", 0644, proc_fs_cifs, &dfscache_proc_ops); 693 693 #endif 694 694 695 695 #ifdef CONFIG_CIFS_SMB_DIRECT ··· 774 774 return count; 775 775 } 776 776 777 - static const struct file_operations cifsFYI_proc_fops = { 778 - .open = cifsFYI_proc_open, 779 - .read = seq_read, 780 - .llseek = seq_lseek, 781 - .release = single_release, 782 - .write = cifsFYI_proc_write, 777 + static const struct proc_ops cifsFYI_proc_ops = { 778 + .proc_open = cifsFYI_proc_open, 779 + .proc_read = seq_read, 780 + .proc_lseek = seq_lseek, 781 + .proc_release = single_release, 782 + .proc_write = cifsFYI_proc_write, 783 783 }; 784 784 785 785 static int cifs_linux_ext_proc_show(struct seq_file *m, void *v) ··· 805 805 return count; 806 806 } 807 807 808 - static const struct file_operations cifs_linux_ext_proc_fops = { 809 - .open = cifs_linux_ext_proc_open, 810 - .read = seq_read, 811 - .llseek = seq_lseek, 812 - .release = single_release, 813 - .write = cifs_linux_ext_proc_write, 808 + static const struct proc_ops cifs_linux_ext_proc_ops = { 809 + .proc_open = cifs_linux_ext_proc_open, 810 + .proc_read = seq_read, 811 + .proc_lseek = seq_lseek, 812 + .proc_release = single_release, 813 + .proc_write = cifs_linux_ext_proc_write, 814 814 }; 815 815 816 816 static int cifs_lookup_cache_proc_show(struct seq_file *m, void *v) ··· 836 836 return count; 837 837 } 838 838 839 - static const struct file_operations cifs_lookup_cache_proc_fops = { 840 - .open = cifs_lookup_cache_proc_open, 841 - .read = seq_read, 842 - .llseek = seq_lseek, 843 - .release = single_release, 844 - .write = cifs_lookup_cache_proc_write, 839 + static const struct proc_ops cifs_lookup_cache_proc_ops = { 840 + .proc_open = cifs_lookup_cache_proc_open, 841 + .proc_read = seq_read, 842 + .proc_lseek = seq_lseek, 843 + .proc_release = single_release, 844 + .proc_write = cifs_lookup_cache_proc_write, 845 845 }; 846 846 847 847 static int traceSMB_proc_show(struct seq_file *m, void *v) ··· 867 867 return count; 868 868 } 869 869 870 - static const struct file_operations traceSMB_proc_fops = { 871 - .open = traceSMB_proc_open, 872 - .read = seq_read, 873 - .llseek = seq_lseek, 874 - .release = single_release, 875 - .write = traceSMB_proc_write, 870 + static const struct proc_ops traceSMB_proc_ops = { 871 + .proc_open = traceSMB_proc_open, 872 + .proc_read = seq_read, 873 + .proc_lseek = seq_lseek, 874 + .proc_release = single_release, 875 + .proc_write = traceSMB_proc_write, 876 876 }; 877 877 878 878 static int cifs_security_flags_proc_show(struct seq_file *m, void *v) ··· 978 978 return count; 979 979 } 980 980 981 - static const struct file_operations cifs_security_flags_proc_fops = { 982 - .open = cifs_security_flags_proc_open, 983 - .read = seq_read, 984 - .llseek = seq_lseek, 985 - .release = single_release, 986 - .write = cifs_security_flags_proc_write, 981 + static const struct proc_ops cifs_security_flags_proc_ops = { 982 + .proc_open = cifs_security_flags_proc_open, 983 + .proc_read = seq_read, 984 + .proc_lseek = seq_lseek, 985 + .proc_release = single_release, 986 + .proc_write = cifs_security_flags_proc_write, 987 987 }; 988 988 #else 989 989 inline void cifs_proc_init(void)
+7 -6
fs/cifs/dfs_cache.c
··· 8 8 #include <linux/jhash.h> 9 9 #include <linux/ktime.h> 10 10 #include <linux/slab.h> 11 + #include <linux/proc_fs.h> 11 12 #include <linux/nls.h> 12 13 #include <linux/workqueue.h> 13 14 #include "cifsglob.h" ··· 212 211 return single_open(file, dfscache_proc_show, NULL); 213 212 } 214 213 215 - const struct file_operations dfscache_proc_fops = { 216 - .open = dfscache_proc_open, 217 - .read = seq_read, 218 - .llseek = seq_lseek, 219 - .release = single_release, 220 - .write = dfscache_proc_write, 214 + const struct proc_ops dfscache_proc_ops = { 215 + .proc_open = dfscache_proc_open, 216 + .proc_read = seq_read, 217 + .proc_lseek = seq_lseek, 218 + .proc_release = single_release, 219 + .proc_write = dfscache_proc_write, 221 220 }; 222 221 223 222 #ifdef CONFIG_CIFS_DEBUG2
+1 -1
fs/cifs/dfs_cache.h
··· 24 24 25 25 extern int dfs_cache_init(void); 26 26 extern void dfs_cache_destroy(void); 27 - extern const struct file_operations dfscache_proc_fops; 27 + extern const struct proc_ops dfscache_proc_ops; 28 28 29 29 extern int dfs_cache_find(const unsigned int xid, struct cifs_ses *ses, 30 30 const struct nls_table *nls_codepage, int remap,
+1 -1
fs/fscache/internal.h
··· 111 111 * object-list.c 112 112 */ 113 113 #ifdef CONFIG_FSCACHE_OBJECT_LIST 114 - extern const struct file_operations fscache_objlist_fops; 114 + extern const struct proc_ops fscache_objlist_proc_ops; 115 115 116 116 extern void fscache_objlist_add(struct fscache_object *); 117 117 extern void fscache_objlist_remove(struct fscache_object *);
+6 -5
fs/fscache/object-list.c
··· 7 7 8 8 #define FSCACHE_DEBUG_LEVEL COOKIE 9 9 #include <linux/module.h> 10 + #include <linux/proc_fs.h> 10 11 #include <linux/seq_file.h> 11 12 #include <linux/slab.h> 12 13 #include <linux/key.h> ··· 406 405 return seq_release(inode, file); 407 406 } 408 407 409 - const struct file_operations fscache_objlist_fops = { 410 - .open = fscache_objlist_open, 411 - .read = seq_read, 412 - .llseek = seq_lseek, 413 - .release = fscache_objlist_release, 408 + const struct proc_ops fscache_objlist_proc_ops = { 409 + .proc_open = fscache_objlist_open, 410 + .proc_read = seq_read, 411 + .proc_lseek = seq_lseek, 412 + .proc_release = fscache_objlist_release, 414 413 };
+1 -1
fs/fscache/proc.c
··· 35 35 36 36 #ifdef CONFIG_FSCACHE_OBJECT_LIST 37 37 if (!proc_create("fs/fscache/objects", S_IFREG | 0444, NULL, 38 - &fscache_objlist_fops)) 38 + &fscache_objlist_proc_ops)) 39 39 goto error_objects; 40 40 #endif 41 41
+6 -7
fs/jbd2/journal.c
··· 1074 1074 return seq_release(inode, file); 1075 1075 } 1076 1076 1077 - static const struct file_operations jbd2_seq_info_fops = { 1078 - .owner = THIS_MODULE, 1079 - .open = jbd2_seq_info_open, 1080 - .read = seq_read, 1081 - .llseek = seq_lseek, 1082 - .release = jbd2_seq_info_release, 1077 + static const struct proc_ops jbd2_info_proc_ops = { 1078 + .proc_open = jbd2_seq_info_open, 1079 + .proc_read = seq_read, 1080 + .proc_lseek = seq_lseek, 1081 + .proc_release = jbd2_seq_info_release, 1083 1082 }; 1084 1083 1085 1084 static struct proc_dir_entry *proc_jbd2_stats; ··· 1088 1089 journal->j_proc_entry = proc_mkdir(journal->j_devname, proc_jbd2_stats); 1089 1090 if (journal->j_proc_entry) { 1090 1091 proc_create_data("info", S_IRUGO, journal->j_proc_entry, 1091 - &jbd2_seq_info_fops, journal); 1092 + &jbd2_info_proc_ops, journal); 1092 1093 } 1093 1094 } 1094 1095
+7 -7
fs/jfs/jfs_debug.c
··· 43 43 return count; 44 44 } 45 45 46 - static const struct file_operations jfs_loglevel_proc_fops = { 47 - .open = jfs_loglevel_proc_open, 48 - .read = seq_read, 49 - .llseek = seq_lseek, 50 - .release = single_release, 51 - .write = jfs_loglevel_proc_write, 46 + static const struct proc_ops jfs_loglevel_proc_ops = { 47 + .proc_open = jfs_loglevel_proc_open, 48 + .proc_read = seq_read, 49 + .proc_lseek = seq_lseek, 50 + .proc_release = single_release, 51 + .proc_write = jfs_loglevel_proc_write, 52 52 }; 53 53 #endif 54 54 ··· 68 68 #endif 69 69 #ifdef CONFIG_JFS_DEBUG 70 70 proc_create_single("TxAnchor", 0, base, jfs_txanchor_proc_show); 71 - proc_create("loglevel", 0, base, &jfs_loglevel_proc_fops); 71 + proc_create("loglevel", 0, base, &jfs_loglevel_proc_ops); 72 72 #endif 73 73 } 74 74
+6 -6
fs/lockd/procfs.c
··· 60 60 return simple_read_from_buffer(buf, size, pos, resp, sizeof(resp)); 61 61 } 62 62 63 - static const struct file_operations lockd_end_grace_operations = { 64 - .write = nlm_end_grace_write, 65 - .read = nlm_end_grace_read, 66 - .llseek = default_llseek, 67 - .release = simple_transaction_release, 63 + static const struct proc_ops lockd_end_grace_proc_ops = { 64 + .proc_write = nlm_end_grace_write, 65 + .proc_read = nlm_end_grace_read, 66 + .proc_lseek = default_llseek, 67 + .proc_release = simple_transaction_release, 68 68 }; 69 69 70 70 int __init ··· 76 76 if (!entry) 77 77 return -ENOMEM; 78 78 entry = proc_create("nlm_end_grace", S_IRUGO|S_IWUSR, entry, 79 - &lockd_end_grace_operations); 79 + &lockd_end_grace_proc_ops); 80 80 if (!entry) { 81 81 remove_proc_entry("fs/lockd", NULL); 82 82 return -ENOMEM;
+6 -7
fs/nfsd/nfsctl.c
··· 157 157 return exports_net_open(current->nsproxy->net_ns, file); 158 158 } 159 159 160 - static const struct file_operations exports_proc_operations = { 161 - .open = exports_proc_open, 162 - .read = seq_read, 163 - .llseek = seq_lseek, 164 - .release = seq_release, 160 + static const struct proc_ops exports_proc_ops = { 161 + .proc_open = exports_proc_open, 162 + .proc_read = seq_read, 163 + .proc_lseek = seq_lseek, 164 + .proc_release = seq_release, 165 165 }; 166 166 167 167 static int exports_nfsd_open(struct inode *inode, struct file *file) ··· 1431 1431 entry = proc_mkdir("fs/nfs", NULL); 1432 1432 if (!entry) 1433 1433 return -ENOMEM; 1434 - entry = proc_create("exports", 0, entry, 1435 - &exports_proc_operations); 1434 + entry = proc_create("exports", 0, entry, &exports_proc_ops); 1436 1435 if (!entry) { 1437 1436 remove_proc_entry("fs/nfs", NULL); 1438 1437 return -ENOMEM;
+6 -6
fs/nfsd/stats.c
··· 84 84 return single_open(file, nfsd_proc_show, NULL); 85 85 } 86 86 87 - static const struct file_operations nfsd_proc_fops = { 88 - .open = nfsd_proc_open, 89 - .read = seq_read, 90 - .llseek = seq_lseek, 91 - .release = single_release, 87 + static const struct proc_ops nfsd_proc_ops = { 88 + .proc_open = nfsd_proc_open, 89 + .proc_read = seq_read, 90 + .proc_lseek = seq_lseek, 91 + .proc_release = single_release, 92 92 }; 93 93 94 94 void 95 95 nfsd_stat_init(void) 96 96 { 97 - svc_proc_register(&init_net, &nfsd_svcstats, &nfsd_proc_fops); 97 + svc_proc_register(&init_net, &nfsd_svcstats, &nfsd_proc_ops); 98 98 } 99 99 100 100 void
+6 -6
fs/proc/cpuinfo.c
··· 16 16 return seq_open(file, &cpuinfo_op); 17 17 } 18 18 19 - static const struct file_operations proc_cpuinfo_operations = { 20 - .open = cpuinfo_open, 21 - .read = seq_read, 22 - .llseek = seq_lseek, 23 - .release = seq_release, 19 + static const struct proc_ops cpuinfo_proc_ops = { 20 + .proc_open = cpuinfo_open, 21 + .proc_read = seq_read, 22 + .proc_lseek = seq_lseek, 23 + .proc_release = seq_release, 24 24 }; 25 25 26 26 static int __init proc_cpuinfo_init(void) 27 27 { 28 - proc_create("cpuinfo", 0, NULL, &proc_cpuinfo_operations); 28 + proc_create("cpuinfo", 0, NULL, &cpuinfo_proc_ops); 29 29 return 0; 30 30 } 31 31 fs_initcall(proc_cpuinfo_init);
+6 -7
fs/proc/kcore.c
··· 574 574 return 0; 575 575 } 576 576 577 - static const struct file_operations proc_kcore_operations = { 578 - .read = read_kcore, 579 - .open = open_kcore, 580 - .release = release_kcore, 581 - .llseek = default_llseek, 577 + static const struct proc_ops kcore_proc_ops = { 578 + .proc_read = read_kcore, 579 + .proc_open = open_kcore, 580 + .proc_release = release_kcore, 581 + .proc_lseek = default_llseek, 582 582 }; 583 583 584 584 /* just remember that we have to update kcore */ ··· 637 637 638 638 static int __init proc_kcore_init(void) 639 639 { 640 - proc_root_kcore = proc_create("kcore", S_IRUSR, NULL, 641 - &proc_kcore_operations); 640 + proc_root_kcore = proc_create("kcore", S_IRUSR, NULL, &kcore_proc_ops); 642 641 if (!proc_root_kcore) { 643 642 pr_err("couldn't create /proc/kcore\n"); 644 643 return 0; /* Always returns 0. */
+7 -7
fs/proc/kmsg.c
··· 49 49 } 50 50 51 51 52 - static const struct file_operations proc_kmsg_operations = { 53 - .read = kmsg_read, 54 - .poll = kmsg_poll, 55 - .open = kmsg_open, 56 - .release = kmsg_release, 57 - .llseek = generic_file_llseek, 52 + static const struct proc_ops kmsg_proc_ops = { 53 + .proc_read = kmsg_read, 54 + .proc_poll = kmsg_poll, 55 + .proc_open = kmsg_open, 56 + .proc_release = kmsg_release, 57 + .proc_lseek = generic_file_llseek, 58 58 }; 59 59 60 60 static int __init proc_kmsg_init(void) 61 61 { 62 - proc_create("kmsg", S_IRUSR, NULL, &proc_kmsg_operations); 62 + proc_create("kmsg", S_IRUSR, NULL, &kmsg_proc_ops); 63 63 return 0; 64 64 } 65 65 fs_initcall(proc_kmsg_init);
+12 -12
fs/proc/page.c
··· 89 89 return ret; 90 90 } 91 91 92 - static const struct file_operations proc_kpagecount_operations = { 93 - .llseek = mem_lseek, 94 - .read = kpagecount_read, 92 + static const struct proc_ops kpagecount_proc_ops = { 93 + .proc_lseek = mem_lseek, 94 + .proc_read = kpagecount_read, 95 95 }; 96 96 97 97 /* /proc/kpageflags - an array exposing page flags ··· 263 263 return ret; 264 264 } 265 265 266 - static const struct file_operations proc_kpageflags_operations = { 267 - .llseek = mem_lseek, 268 - .read = kpageflags_read, 266 + static const struct proc_ops kpageflags_proc_ops = { 267 + .proc_lseek = mem_lseek, 268 + .proc_read = kpageflags_read, 269 269 }; 270 270 271 271 #ifdef CONFIG_MEMCG ··· 317 317 return ret; 318 318 } 319 319 320 - static const struct file_operations proc_kpagecgroup_operations = { 321 - .llseek = mem_lseek, 322 - .read = kpagecgroup_read, 320 + static const struct proc_ops kpagecgroup_proc_ops = { 321 + .proc_lseek = mem_lseek, 322 + .proc_read = kpagecgroup_read, 323 323 }; 324 324 #endif /* CONFIG_MEMCG */ 325 325 326 326 static int __init proc_page_init(void) 327 327 { 328 - proc_create("kpagecount", S_IRUSR, NULL, &proc_kpagecount_operations); 329 - proc_create("kpageflags", S_IRUSR, NULL, &proc_kpageflags_operations); 328 + proc_create("kpagecount", S_IRUSR, NULL, &kpagecount_proc_ops); 329 + proc_create("kpageflags", S_IRUSR, NULL, &kpageflags_proc_ops); 330 330 #ifdef CONFIG_MEMCG 331 - proc_create("kpagecgroup", S_IRUSR, NULL, &proc_kpagecgroup_operations); 331 + proc_create("kpagecgroup", S_IRUSR, NULL, &kpagecgroup_proc_ops); 332 332 #endif 333 333 return 0; 334 334 }
+6 -6
fs/proc/stat.c
··· 223 223 return single_open_size(file, show_stat, NULL, size); 224 224 } 225 225 226 - static const struct file_operations proc_stat_operations = { 227 - .open = stat_open, 228 - .read = seq_read, 229 - .llseek = seq_lseek, 230 - .release = single_release, 226 + static const struct proc_ops stat_proc_ops = { 227 + .proc_open = stat_open, 228 + .proc_read = seq_read, 229 + .proc_lseek = seq_lseek, 230 + .proc_release = single_release, 231 231 }; 232 232 233 233 static int __init proc_stat_init(void) 234 234 { 235 - proc_create("stat", 0, NULL, &proc_stat_operations); 235 + proc_create("stat", 0, NULL, &stat_proc_ops); 236 236 return 0; 237 237 } 238 238 fs_initcall(proc_stat_init);
+5 -5
fs/proc/vmcore.c
··· 667 667 } 668 668 #endif 669 669 670 - static const struct file_operations proc_vmcore_operations = { 671 - .read = read_vmcore, 672 - .llseek = default_llseek, 673 - .mmap = mmap_vmcore, 670 + static const struct proc_ops vmcore_proc_ops = { 671 + .proc_read = read_vmcore, 672 + .proc_lseek = default_llseek, 673 + .proc_mmap = mmap_vmcore, 674 674 }; 675 675 676 676 static struct vmcore* __init get_new_element(void) ··· 1555 1555 elfcorehdr_free(elfcorehdr_addr); 1556 1556 elfcorehdr_addr = ELFCORE_ADDR_ERR; 1557 1557 1558 - proc_vmcore = proc_create("vmcore", S_IRUSR, NULL, &proc_vmcore_operations); 1558 + proc_vmcore = proc_create("vmcore", S_IRUSR, NULL, &vmcore_proc_ops); 1559 1559 if (proc_vmcore) 1560 1560 proc_vmcore->size = vmcore_size; 1561 1561 return 0;
+13
include/linux/seq_file.h
··· 160 160 .release = single_release, \ 161 161 } 162 162 163 + #define DEFINE_PROC_SHOW_ATTRIBUTE(__name) \ 164 + static int __name ## _open(struct inode *inode, struct file *file) \ 165 + { \ 166 + return single_open(file, __name ## _show, inode->i_private); \ 167 + } \ 168 + \ 169 + static const struct proc_ops __name ## _proc_ops = { \ 170 + .proc_open = __name ## _open, \ 171 + .proc_read = seq_read, \ 172 + .proc_lseek = seq_lseek, \ 173 + .proc_release = single_release, \ 174 + } 175 + 163 176 static inline struct user_namespace *seq_user_ns(struct seq_file *seq) 164 177 { 165 178 #ifdef CONFIG_USER_NS
+2 -2
include/linux/sunrpc/stats.h
··· 63 63 void rpc_proc_unregister(struct net *,const char *); 64 64 void rpc_proc_zero(const struct rpc_program *); 65 65 struct proc_dir_entry * svc_proc_register(struct net *, struct svc_stat *, 66 - const struct file_operations *); 66 + const struct proc_ops *); 67 67 void svc_proc_unregister(struct net *, const char *); 68 68 69 69 void svc_seq_show(struct seq_file *, ··· 75 75 static inline void rpc_proc_zero(const struct rpc_program *p) {} 76 76 77 77 static inline struct proc_dir_entry *svc_proc_register(struct net *net, struct svc_stat *s, 78 - const struct file_operations *f) { return NULL; } 78 + const struct proc_ops *proc_ops) { return NULL; } 79 79 static inline void svc_proc_unregister(struct net *net, const char *p) {} 80 80 81 81 static inline void svc_seq_show(struct seq_file *seq,
+7 -7
ipc/util.c
··· 126 126 } 127 127 128 128 #ifdef CONFIG_PROC_FS 129 - static const struct file_operations sysvipc_proc_fops; 129 + static const struct proc_ops sysvipc_proc_ops; 130 130 /** 131 131 * ipc_init_proc_interface - create a proc interface for sysipc types using a seq_file interface. 132 132 * @path: Path in procfs ··· 151 151 pde = proc_create_data(path, 152 152 S_IRUGO, /* world readable */ 153 153 NULL, /* parent dir */ 154 - &sysvipc_proc_fops, 154 + &sysvipc_proc_ops, 155 155 iface); 156 156 if (!pde) 157 157 kfree(iface); ··· 884 884 return seq_release_private(inode, file); 885 885 } 886 886 887 - static const struct file_operations sysvipc_proc_fops = { 888 - .open = sysvipc_proc_open, 889 - .read = seq_read, 890 - .llseek = seq_lseek, 891 - .release = sysvipc_proc_release, 887 + static const struct proc_ops sysvipc_proc_ops = { 888 + .proc_open = sysvipc_proc_open, 889 + .proc_read = seq_read, 890 + .proc_lseek = seq_lseek, 891 + .proc_release = sysvipc_proc_release, 892 892 }; 893 893 #endif /* CONFIG_PROC_FS */
+4 -5
kernel/configs.c
··· 47 47 &kernel_config_data); 48 48 } 49 49 50 - static const struct file_operations ikconfig_file_ops = { 51 - .owner = THIS_MODULE, 52 - .read = ikconfig_read_current, 53 - .llseek = default_llseek, 50 + static const struct proc_ops config_gz_proc_ops = { 51 + .proc_read = ikconfig_read_current, 52 + .proc_lseek = default_llseek, 54 53 }; 55 54 56 55 static int __init ikconfig_init(void) ··· 58 59 59 60 /* create the current config file */ 60 61 entry = proc_create("config.gz", S_IFREG | S_IRUGO, NULL, 61 - &ikconfig_file_ops); 62 + &config_gz_proc_ops); 62 63 if (!entry) 63 64 return -ENOMEM; 64 65
+21 -21
kernel/irq/proc.c
··· 176 176 return single_open(file, irq_affinity_list_proc_show, PDE_DATA(inode)); 177 177 } 178 178 179 - static const struct file_operations irq_affinity_proc_fops = { 180 - .open = irq_affinity_proc_open, 181 - .read = seq_read, 182 - .llseek = seq_lseek, 183 - .release = single_release, 184 - .write = irq_affinity_proc_write, 179 + static const struct proc_ops irq_affinity_proc_ops = { 180 + .proc_open = irq_affinity_proc_open, 181 + .proc_read = seq_read, 182 + .proc_lseek = seq_lseek, 183 + .proc_release = single_release, 184 + .proc_write = irq_affinity_proc_write, 185 185 }; 186 186 187 - static const struct file_operations irq_affinity_list_proc_fops = { 188 - .open = irq_affinity_list_proc_open, 189 - .read = seq_read, 190 - .llseek = seq_lseek, 191 - .release = single_release, 192 - .write = irq_affinity_list_proc_write, 187 + static const struct proc_ops irq_affinity_list_proc_ops = { 188 + .proc_open = irq_affinity_list_proc_open, 189 + .proc_read = seq_read, 190 + .proc_lseek = seq_lseek, 191 + .proc_release = single_release, 192 + .proc_write = irq_affinity_list_proc_write, 193 193 }; 194 194 195 195 #ifdef CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK ··· 246 246 return single_open(file, default_affinity_show, PDE_DATA(inode)); 247 247 } 248 248 249 - static const struct file_operations default_affinity_proc_fops = { 250 - .open = default_affinity_open, 251 - .read = seq_read, 252 - .llseek = seq_lseek, 253 - .release = single_release, 254 - .write = default_affinity_write, 249 + static const struct proc_ops default_affinity_proc_ops = { 250 + .proc_open = default_affinity_open, 251 + .proc_read = seq_read, 252 + .proc_lseek = seq_lseek, 253 + .proc_release = single_release, 254 + .proc_write = default_affinity_write, 255 255 }; 256 256 257 257 static int irq_node_proc_show(struct seq_file *m, void *v) ··· 342 342 #ifdef CONFIG_SMP 343 343 /* create /proc/irq/<irq>/smp_affinity */ 344 344 proc_create_data("smp_affinity", 0644, desc->dir, 345 - &irq_affinity_proc_fops, irqp); 345 + &irq_affinity_proc_ops, irqp); 346 346 347 347 /* create /proc/irq/<irq>/affinity_hint */ 348 348 proc_create_single_data("affinity_hint", 0444, desc->dir, ··· 350 350 351 351 /* create /proc/irq/<irq>/smp_affinity_list */ 352 352 proc_create_data("smp_affinity_list", 0644, desc->dir, 353 - &irq_affinity_list_proc_fops, irqp); 353 + &irq_affinity_list_proc_ops, irqp); 354 354 355 355 proc_create_single_data("node", 0444, desc->dir, irq_node_proc_show, 356 356 irqp); ··· 401 401 { 402 402 #ifdef CONFIG_SMP 403 403 proc_create("irq/default_smp_affinity", 0644, NULL, 404 - &default_affinity_proc_fops); 404 + &default_affinity_proc_ops); 405 405 #endif 406 406 } 407 407
+6 -6
kernel/kallsyms.c
··· 698 698 } 699 699 #endif /* CONFIG_KGDB_KDB */ 700 700 701 - static const struct file_operations kallsyms_operations = { 702 - .open = kallsyms_open, 703 - .read = seq_read, 704 - .llseek = seq_lseek, 705 - .release = seq_release_private, 701 + static const struct proc_ops kallsyms_proc_ops = { 702 + .proc_open = kallsyms_open, 703 + .proc_read = seq_read, 704 + .proc_lseek = seq_lseek, 705 + .proc_release = seq_release_private, 706 706 }; 707 707 708 708 static int __init kallsyms_init(void) 709 709 { 710 - proc_create("kallsyms", 0444, NULL, &kallsyms_operations); 710 + proc_create("kallsyms", 0444, NULL, &kallsyms_proc_ops); 711 711 return 0; 712 712 } 713 713 device_initcall(kallsyms_init);
+7 -7
kernel/latencytop.c
··· 255 255 return single_open(filp, lstats_show, NULL); 256 256 } 257 257 258 - static const struct file_operations lstats_fops = { 259 - .open = lstats_open, 260 - .read = seq_read, 261 - .write = lstats_write, 262 - .llseek = seq_lseek, 263 - .release = single_release, 258 + static const struct proc_ops lstats_proc_ops = { 259 + .proc_open = lstats_open, 260 + .proc_read = seq_read, 261 + .proc_write = lstats_write, 262 + .proc_lseek = seq_lseek, 263 + .proc_release = single_release, 264 264 }; 265 265 266 266 static int __init init_lstats_procfs(void) 267 267 { 268 - proc_create("latency_stats", 0644, NULL, &lstats_fops); 268 + proc_create("latency_stats", 0644, NULL, &lstats_proc_ops); 269 269 return 0; 270 270 } 271 271
+7 -8
kernel/locking/lockdep_proc.c
··· 643 643 return seq_release(inode, file); 644 644 } 645 645 646 - static const struct file_operations proc_lock_stat_operations = { 647 - .open = lock_stat_open, 648 - .write = lock_stat_write, 649 - .read = seq_read, 650 - .llseek = seq_lseek, 651 - .release = lock_stat_release, 646 + static const struct proc_ops lock_stat_proc_ops = { 647 + .proc_open = lock_stat_open, 648 + .proc_write = lock_stat_write, 649 + .proc_read = seq_read, 650 + .proc_lseek = seq_lseek, 651 + .proc_release = lock_stat_release, 652 652 }; 653 653 #endif /* CONFIG_LOCK_STAT */ 654 654 ··· 660 660 #endif 661 661 proc_create_single("lockdep_stats", S_IRUSR, NULL, lockdep_stats_show); 662 662 #ifdef CONFIG_LOCK_STAT 663 - proc_create("lock_stat", S_IRUSR | S_IWUSR, NULL, 664 - &proc_lock_stat_operations); 663 + proc_create("lock_stat", S_IRUSR | S_IWUSR, NULL, &lock_stat_proc_ops); 665 664 #endif 666 665 667 666 return 0;
+6 -6
kernel/module.c
··· 4354 4354 return err; 4355 4355 } 4356 4356 4357 - static const struct file_operations proc_modules_operations = { 4358 - .open = modules_open, 4359 - .read = seq_read, 4360 - .llseek = seq_lseek, 4361 - .release = seq_release, 4357 + static const struct proc_ops modules_proc_ops = { 4358 + .proc_open = modules_open, 4359 + .proc_read = seq_read, 4360 + .proc_lseek = seq_lseek, 4361 + .proc_release = seq_release, 4362 4362 }; 4363 4363 4364 4364 static int __init proc_modules_init(void) 4365 4365 { 4366 - proc_create("modules", 0, NULL, &proc_modules_operations); 4366 + proc_create("modules", 0, NULL, &modules_proc_ops); 4367 4367 return 0; 4368 4368 } 4369 4369 module_init(proc_modules_init);
+12 -12
kernel/profile.c
··· 442 442 return err; 443 443 } 444 444 445 - static const struct file_operations prof_cpu_mask_proc_fops = { 446 - .open = prof_cpu_mask_proc_open, 447 - .read = seq_read, 448 - .llseek = seq_lseek, 449 - .release = single_release, 450 - .write = prof_cpu_mask_proc_write, 445 + static const struct proc_ops prof_cpu_mask_proc_ops = { 446 + .proc_open = prof_cpu_mask_proc_open, 447 + .proc_read = seq_read, 448 + .proc_lseek = seq_lseek, 449 + .proc_release = single_release, 450 + .proc_write = prof_cpu_mask_proc_write, 451 451 }; 452 452 453 453 void create_prof_cpu_mask(void) 454 454 { 455 455 /* create /proc/irq/prof_cpu_mask */ 456 - proc_create("irq/prof_cpu_mask", 0600, NULL, &prof_cpu_mask_proc_fops); 456 + proc_create("irq/prof_cpu_mask", 0600, NULL, &prof_cpu_mask_proc_ops); 457 457 } 458 458 459 459 /* ··· 517 517 return count; 518 518 } 519 519 520 - static const struct file_operations proc_profile_operations = { 521 - .read = read_profile, 522 - .write = write_profile, 523 - .llseek = default_llseek, 520 + static const struct proc_ops profile_proc_ops = { 521 + .proc_read = read_profile, 522 + .proc_write = write_profile, 523 + .proc_lseek = default_llseek, 524 524 }; 525 525 526 526 int __ref create_proc_profile(void) ··· 548 548 err = 0; 549 549 #endif 550 550 entry = proc_create("profile", S_IWUSR | S_IRUGO, 551 - NULL, &proc_profile_operations); 551 + NULL, &profile_proc_ops); 552 552 if (!entry) 553 553 goto err_state_onl; 554 554 proc_set_size(entry, (1 + prof_len) * sizeof(atomic_t));
+24 -24
kernel/sched/psi.c
··· 1251 1251 return single_release(inode, file); 1252 1252 } 1253 1253 1254 - static const struct file_operations psi_io_fops = { 1255 - .open = psi_io_open, 1256 - .read = seq_read, 1257 - .llseek = seq_lseek, 1258 - .write = psi_io_write, 1259 - .poll = psi_fop_poll, 1260 - .release = psi_fop_release, 1254 + static const struct proc_ops psi_io_proc_ops = { 1255 + .proc_open = psi_io_open, 1256 + .proc_read = seq_read, 1257 + .proc_lseek = seq_lseek, 1258 + .proc_write = psi_io_write, 1259 + .proc_poll = psi_fop_poll, 1260 + .proc_release = psi_fop_release, 1261 1261 }; 1262 1262 1263 - static const struct file_operations psi_memory_fops = { 1264 - .open = psi_memory_open, 1265 - .read = seq_read, 1266 - .llseek = seq_lseek, 1267 - .write = psi_memory_write, 1268 - .poll = psi_fop_poll, 1269 - .release = psi_fop_release, 1263 + static const struct proc_ops psi_memory_proc_ops = { 1264 + .proc_open = psi_memory_open, 1265 + .proc_read = seq_read, 1266 + .proc_lseek = seq_lseek, 1267 + .proc_write = psi_memory_write, 1268 + .proc_poll = psi_fop_poll, 1269 + .proc_release = psi_fop_release, 1270 1270 }; 1271 1271 1272 - static const struct file_operations psi_cpu_fops = { 1273 - .open = psi_cpu_open, 1274 - .read = seq_read, 1275 - .llseek = seq_lseek, 1276 - .write = psi_cpu_write, 1277 - .poll = psi_fop_poll, 1278 - .release = psi_fop_release, 1272 + static const struct proc_ops psi_cpu_proc_ops = { 1273 + .proc_open = psi_cpu_open, 1274 + .proc_read = seq_read, 1275 + .proc_lseek = seq_lseek, 1276 + .proc_write = psi_cpu_write, 1277 + .proc_poll = psi_fop_poll, 1278 + .proc_release = psi_fop_release, 1279 1279 }; 1280 1280 1281 1281 static int __init psi_proc_init(void) 1282 1282 { 1283 1283 if (psi_enable) { 1284 1284 proc_mkdir("pressure", NULL); 1285 - proc_create("pressure/io", 0, NULL, &psi_io_fops); 1286 - proc_create("pressure/memory", 0, NULL, &psi_memory_fops); 1287 - proc_create("pressure/cpu", 0, NULL, &psi_cpu_fops); 1285 + proc_create("pressure/io", 0, NULL, &psi_io_proc_ops); 1286 + proc_create("pressure/memory", 0, NULL, &psi_memory_proc_ops); 1287 + proc_create("pressure/cpu", 0, NULL, &psi_cpu_proc_ops); 1288 1288 } 1289 1289 return 0; 1290 1290 }
+7 -8
mm/slab_common.c
··· 1580 1580 return seq_open(file, &slabinfo_op); 1581 1581 } 1582 1582 1583 - static const struct file_operations proc_slabinfo_operations = { 1584 - .open = slabinfo_open, 1585 - .read = seq_read, 1586 - .write = slabinfo_write, 1587 - .llseek = seq_lseek, 1588 - .release = seq_release, 1583 + static const struct proc_ops slabinfo_proc_ops = { 1584 + .proc_open = slabinfo_open, 1585 + .proc_read = seq_read, 1586 + .proc_write = slabinfo_write, 1587 + .proc_lseek = seq_lseek, 1588 + .proc_release = seq_release, 1589 1589 }; 1590 1590 1591 1591 static int __init slab_proc_init(void) 1592 1592 { 1593 - proc_create("slabinfo", SLABINFO_RIGHTS, NULL, 1594 - &proc_slabinfo_operations); 1593 + proc_create("slabinfo", SLABINFO_RIGHTS, NULL, &slabinfo_proc_ops); 1595 1594 return 0; 1596 1595 } 1597 1596 module_init(slab_proc_init);
+7 -7
mm/swapfile.c
··· 2796 2796 return 0; 2797 2797 } 2798 2798 2799 - static const struct file_operations proc_swaps_operations = { 2800 - .open = swaps_open, 2801 - .read = seq_read, 2802 - .llseek = seq_lseek, 2803 - .release = seq_release, 2804 - .poll = swaps_poll, 2799 + static const struct proc_ops swaps_proc_ops = { 2800 + .proc_open = swaps_open, 2801 + .proc_read = seq_read, 2802 + .proc_lseek = seq_lseek, 2803 + .proc_release = seq_release, 2804 + .proc_poll = swaps_poll, 2805 2805 }; 2806 2806 2807 2807 static int __init procswaps_init(void) 2808 2808 { 2809 - proc_create("swaps", 0, NULL, &proc_swaps_operations); 2809 + proc_create("swaps", 0, NULL, &swaps_proc_ops); 2810 2810 return 0; 2811 2811 } 2812 2812 __initcall(procswaps_init);
+7 -10
net/atm/mpoa_proc.c
··· 53 53 54 54 static int parse_qos(const char *buff); 55 55 56 - /* 57 - * Define allowed FILE OPERATIONS 58 - */ 59 - static const struct file_operations mpc_file_operations = { 60 - .open = proc_mpc_open, 61 - .read = seq_read, 62 - .llseek = seq_lseek, 63 - .write = proc_mpc_write, 64 - .release = seq_release, 56 + static const struct proc_ops mpc_proc_ops = { 57 + .proc_open = proc_mpc_open, 58 + .proc_read = seq_read, 59 + .proc_lseek = seq_lseek, 60 + .proc_write = proc_mpc_write, 61 + .proc_release = seq_release, 65 62 }; 66 63 67 64 /* ··· 287 290 { 288 291 struct proc_dir_entry *p; 289 292 290 - p = proc_create(STAT_FILE_NAME, 0, atm_proc_root, &mpc_file_operations); 293 + p = proc_create(STAT_FILE_NAME, 0, atm_proc_root, &mpc_proc_ops); 291 294 if (!p) { 292 295 pr_err("Unable to initialize /proc/atm/%s\n", STAT_FILE_NAME); 293 296 return -ENOMEM;
+4 -4
net/atm/proc.c
··· 36 36 static ssize_t proc_dev_atm_read(struct file *file, char __user *buf, 37 37 size_t count, loff_t *pos); 38 38 39 - static const struct file_operations proc_atm_dev_ops = { 40 - .read = proc_dev_atm_read, 41 - .llseek = noop_llseek, 39 + static const struct proc_ops atm_dev_proc_ops = { 40 + .proc_read = proc_dev_atm_read, 41 + .proc_lseek = noop_llseek, 42 42 }; 43 43 44 44 static void add_stats(struct seq_file *seq, const char *aal, ··· 359 359 goto err_out; 360 360 361 361 dev->proc_entry = proc_create_data(dev->proc_name, 0, atm_proc_root, 362 - &proc_atm_dev_ops, dev); 362 + &atm_dev_proc_ops, dev); 363 363 if (!dev->proc_entry) 364 364 goto err_free_name; 365 365 return 0;
+22 -22
net/core/pktgen.c
··· 535 535 return single_open(file, pgctrl_show, PDE_DATA(inode)); 536 536 } 537 537 538 - static const struct file_operations pktgen_fops = { 539 - .open = pgctrl_open, 540 - .read = seq_read, 541 - .llseek = seq_lseek, 542 - .write = pgctrl_write, 543 - .release = single_release, 538 + static const struct proc_ops pktgen_proc_ops = { 539 + .proc_open = pgctrl_open, 540 + .proc_read = seq_read, 541 + .proc_lseek = seq_lseek, 542 + .proc_write = pgctrl_write, 543 + .proc_release = single_release, 544 544 }; 545 545 546 546 static int pktgen_if_show(struct seq_file *seq, void *v) ··· 1707 1707 return single_open(file, pktgen_if_show, PDE_DATA(inode)); 1708 1708 } 1709 1709 1710 - static const struct file_operations pktgen_if_fops = { 1711 - .open = pktgen_if_open, 1712 - .read = seq_read, 1713 - .llseek = seq_lseek, 1714 - .write = pktgen_if_write, 1715 - .release = single_release, 1710 + static const struct proc_ops pktgen_if_proc_ops = { 1711 + .proc_open = pktgen_if_open, 1712 + .proc_read = seq_read, 1713 + .proc_lseek = seq_lseek, 1714 + .proc_write = pktgen_if_write, 1715 + .proc_release = single_release, 1716 1716 }; 1717 1717 1718 1718 static int pktgen_thread_show(struct seq_file *seq, void *v) ··· 1844 1844 return single_open(file, pktgen_thread_show, PDE_DATA(inode)); 1845 1845 } 1846 1846 1847 - static const struct file_operations pktgen_thread_fops = { 1848 - .open = pktgen_thread_open, 1849 - .read = seq_read, 1850 - .llseek = seq_lseek, 1851 - .write = pktgen_thread_write, 1852 - .release = single_release, 1847 + static const struct proc_ops pktgen_thread_proc_ops = { 1848 + .proc_open = pktgen_thread_open, 1849 + .proc_read = seq_read, 1850 + .proc_lseek = seq_lseek, 1851 + .proc_write = pktgen_thread_write, 1852 + .proc_release = single_release, 1853 1853 }; 1854 1854 1855 1855 /* Think find or remove for NN */ ··· 1926 1926 1927 1927 pkt_dev->entry = proc_create_data(dev->name, 0600, 1928 1928 pn->proc_dir, 1929 - &pktgen_if_fops, 1929 + &pktgen_if_proc_ops, 1930 1930 pkt_dev); 1931 1931 if (!pkt_dev->entry) 1932 1932 pr_err("can't move proc entry for '%s'\n", ··· 3638 3638 pkt_dev->clone_skb = pg_clone_skb_d; 3639 3639 3640 3640 pkt_dev->entry = proc_create_data(ifname, 0600, t->net->proc_dir, 3641 - &pktgen_if_fops, pkt_dev); 3641 + &pktgen_if_proc_ops, pkt_dev); 3642 3642 if (!pkt_dev->entry) { 3643 3643 pr_err("cannot create %s/%s procfs entry\n", 3644 3644 PG_PROC_DIR, ifname); ··· 3708 3708 t->tsk = p; 3709 3709 3710 3710 pe = proc_create_data(t->tsk->comm, 0600, pn->proc_dir, 3711 - &pktgen_thread_fops, t); 3711 + &pktgen_thread_proc_ops, t); 3712 3712 if (!pe) { 3713 3713 pr_err("cannot create %s/%s procfs entry\n", 3714 3714 PG_PROC_DIR, t->tsk->comm); ··· 3793 3793 pr_warn("cannot create /proc/net/%s\n", PG_PROC_DIR); 3794 3794 return -ENODEV; 3795 3795 } 3796 - pe = proc_create(PGCTRL, 0600, pn->proc_dir, &pktgen_fops); 3796 + pe = proc_create(PGCTRL, 0600, pn->proc_dir, &pktgen_proc_ops); 3797 3797 if (pe == NULL) { 3798 3798 pr_err("cannot create %s procfs entry\n", PGCTRL); 3799 3799 ret = -EINVAL;
+5 -5
net/ipv4/ipconfig.c
··· 1334 1334 1335 1335 /* Create a new file under /proc/net/ipconfig */ 1336 1336 static int ipconfig_proc_net_create(const char *name, 1337 - const struct file_operations *fops) 1337 + const struct proc_ops *proc_ops) 1338 1338 { 1339 1339 char *pname; 1340 1340 struct proc_dir_entry *p; ··· 1346 1346 if (!pname) 1347 1347 return -ENOMEM; 1348 1348 1349 - p = proc_create(pname, 0444, init_net.proc_net, fops); 1349 + p = proc_create(pname, 0444, init_net.proc_net, proc_ops); 1350 1350 kfree(pname); 1351 1351 if (!p) 1352 1352 return -ENOMEM; ··· 1355 1355 } 1356 1356 1357 1357 /* Write NTP server IP addresses to /proc/net/ipconfig/ntp_servers */ 1358 - static int ntp_servers_seq_show(struct seq_file *seq, void *v) 1358 + static int ntp_servers_show(struct seq_file *seq, void *v) 1359 1359 { 1360 1360 int i; 1361 1361 ··· 1365 1365 } 1366 1366 return 0; 1367 1367 } 1368 - DEFINE_SHOW_ATTRIBUTE(ntp_servers_seq); 1368 + DEFINE_PROC_SHOW_ATTRIBUTE(ntp_servers); 1369 1369 #endif /* CONFIG_PROC_FS */ 1370 1370 1371 1371 /* ··· 1456 1456 proc_create_single("pnp", 0444, init_net.proc_net, pnp_seq_show); 1457 1457 1458 1458 if (ipconfig_proc_net_init() == 0) 1459 - ipconfig_proc_net_create("ntp_servers", &ntp_servers_seq_fops); 1459 + ipconfig_proc_net_create("ntp_servers", &ntp_servers_proc_ops); 1460 1460 #endif /* CONFIG_PROC_FS */ 1461 1461 1462 1462 if (!ic_enable)
+8 -8
net/ipv4/netfilter/ipt_CLUSTERIP.c
··· 58 58 }; 59 59 60 60 #ifdef CONFIG_PROC_FS 61 - static const struct file_operations clusterip_proc_fops; 61 + static const struct proc_ops clusterip_proc_ops; 62 62 #endif 63 63 64 64 struct clusterip_net { ··· 280 280 mutex_lock(&cn->mutex); 281 281 c->pde = proc_create_data(buffer, 0600, 282 282 cn->procdir, 283 - &clusterip_proc_fops, c); 283 + &clusterip_proc_ops, c); 284 284 mutex_unlock(&cn->mutex); 285 285 if (!c->pde) { 286 286 err = -ENOMEM; ··· 804 804 return size; 805 805 } 806 806 807 - static const struct file_operations clusterip_proc_fops = { 808 - .open = clusterip_proc_open, 809 - .read = seq_read, 810 - .write = clusterip_proc_write, 811 - .llseek = seq_lseek, 812 - .release = clusterip_proc_release, 807 + static const struct proc_ops clusterip_proc_ops = { 808 + .proc_open = clusterip_proc_open, 809 + .proc_read = seq_read, 810 + .proc_write = clusterip_proc_write, 811 + .proc_lseek = seq_lseek, 812 + .proc_release = clusterip_proc_release, 813 813 }; 814 814 815 815 #endif /* CONFIG_PROC_FS */
+12 -12
net/ipv4/route.c
··· 237 237 return seq_open(file, &rt_cache_seq_ops); 238 238 } 239 239 240 - static const struct file_operations rt_cache_seq_fops = { 241 - .open = rt_cache_seq_open, 242 - .read = seq_read, 243 - .llseek = seq_lseek, 244 - .release = seq_release, 240 + static const struct proc_ops rt_cache_proc_ops = { 241 + .proc_open = rt_cache_seq_open, 242 + .proc_read = seq_read, 243 + .proc_lseek = seq_lseek, 244 + .proc_release = seq_release, 245 245 }; 246 246 247 247 ··· 328 328 return seq_open(file, &rt_cpu_seq_ops); 329 329 } 330 330 331 - static const struct file_operations rt_cpu_seq_fops = { 332 - .open = rt_cpu_seq_open, 333 - .read = seq_read, 334 - .llseek = seq_lseek, 335 - .release = seq_release, 331 + static const struct proc_ops rt_cpu_proc_ops = { 332 + .proc_open = rt_cpu_seq_open, 333 + .proc_read = seq_read, 334 + .proc_lseek = seq_lseek, 335 + .proc_release = seq_release, 336 336 }; 337 337 338 338 #ifdef CONFIG_IP_ROUTE_CLASSID ··· 366 366 struct proc_dir_entry *pde; 367 367 368 368 pde = proc_create("rt_cache", 0444, net->proc_net, 369 - &rt_cache_seq_fops); 369 + &rt_cache_proc_ops); 370 370 if (!pde) 371 371 goto err1; 372 372 373 373 pde = proc_create("rt_cache", 0444, 374 - net->proc_net_stat, &rt_cpu_seq_fops); 374 + net->proc_net_stat, &rt_cpu_proc_ops); 375 375 if (!pde) 376 376 goto err2; 377 377
+8 -9
net/netfilter/xt_recent.c
··· 103 103 static DEFINE_MUTEX(recent_mutex); 104 104 105 105 #ifdef CONFIG_PROC_FS 106 - static const struct file_operations recent_mt_fops; 106 + static const struct proc_ops recent_mt_proc_ops; 107 107 #endif 108 108 109 109 static u_int32_t hash_rnd __read_mostly; ··· 405 405 goto out; 406 406 } 407 407 pde = proc_create_data(t->name, ip_list_perms, recent_net->xt_recent, 408 - &recent_mt_fops, t); 408 + &recent_mt_proc_ops, t); 409 409 if (pde == NULL) { 410 410 recent_table_free(t); 411 411 ret = -ENOMEM; ··· 616 616 return size + 1; 617 617 } 618 618 619 - static const struct file_operations recent_mt_fops = { 620 - .open = recent_seq_open, 621 - .read = seq_read, 622 - .write = recent_mt_proc_write, 623 - .release = seq_release_private, 624 - .owner = THIS_MODULE, 625 - .llseek = seq_lseek, 619 + static const struct proc_ops recent_mt_proc_ops = { 620 + .proc_open = recent_seq_open, 621 + .proc_read = seq_read, 622 + .proc_write = recent_mt_proc_write, 623 + .proc_release = seq_release_private, 624 + .proc_lseek = seq_lseek, 626 625 }; 627 626 628 627 static int __net_init recent_proc_net_init(struct net *net)
+5 -5
net/sunrpc/auth_gss/svcauth_gss.c
··· 1428 1428 return len; 1429 1429 } 1430 1430 1431 - static const struct file_operations use_gss_proxy_ops = { 1432 - .open = nonseekable_open, 1433 - .write = write_gssp, 1434 - .read = read_gssp, 1431 + static const struct proc_ops use_gss_proxy_proc_ops = { 1432 + .proc_open = nonseekable_open, 1433 + .proc_write = write_gssp, 1434 + .proc_read = read_gssp, 1435 1435 }; 1436 1436 1437 1437 static int create_use_gss_proxy_proc_entry(struct net *net) ··· 1442 1442 sn->use_gss_proxy = -1; 1443 1443 *p = proc_create_data("use-gss-proxy", S_IFREG | 0600, 1444 1444 sn->proc_net_rpc, 1445 - &use_gss_proxy_ops, net); 1445 + &use_gss_proxy_proc_ops, net); 1446 1446 if (!*p) 1447 1447 return -ENOMEM; 1448 1448 init_gssp_clnt(sn);
+22 -23
net/sunrpc/cache.c
··· 1571 1571 return cache_release(inode, filp, cd); 1572 1572 } 1573 1573 1574 - static const struct file_operations cache_file_operations_procfs = { 1575 - .owner = THIS_MODULE, 1576 - .llseek = no_llseek, 1577 - .read = cache_read_procfs, 1578 - .write = cache_write_procfs, 1579 - .poll = cache_poll_procfs, 1580 - .unlocked_ioctl = cache_ioctl_procfs, /* for FIONREAD */ 1581 - .open = cache_open_procfs, 1582 - .release = cache_release_procfs, 1574 + static const struct proc_ops cache_channel_proc_ops = { 1575 + .proc_lseek = no_llseek, 1576 + .proc_read = cache_read_procfs, 1577 + .proc_write = cache_write_procfs, 1578 + .proc_poll = cache_poll_procfs, 1579 + .proc_ioctl = cache_ioctl_procfs, /* for FIONREAD */ 1580 + .proc_open = cache_open_procfs, 1581 + .proc_release = cache_release_procfs, 1583 1582 }; 1584 1583 1585 1584 static int content_open_procfs(struct inode *inode, struct file *filp) ··· 1595 1596 return content_release(inode, filp, cd); 1596 1597 } 1597 1598 1598 - static const struct file_operations content_file_operations_procfs = { 1599 - .open = content_open_procfs, 1600 - .read = seq_read, 1601 - .llseek = seq_lseek, 1602 - .release = content_release_procfs, 1599 + static const struct proc_ops content_proc_ops = { 1600 + .proc_open = content_open_procfs, 1601 + .proc_read = seq_read, 1602 + .proc_lseek = seq_lseek, 1603 + .proc_release = content_release_procfs, 1603 1604 }; 1604 1605 1605 1606 static int open_flush_procfs(struct inode *inode, struct file *filp) ··· 1633 1634 return write_flush(filp, buf, count, ppos, cd); 1634 1635 } 1635 1636 1636 - static const struct file_operations cache_flush_operations_procfs = { 1637 - .open = open_flush_procfs, 1638 - .read = read_flush_procfs, 1639 - .write = write_flush_procfs, 1640 - .release = release_flush_procfs, 1641 - .llseek = no_llseek, 1637 + static const struct proc_ops cache_flush_proc_ops = { 1638 + .proc_open = open_flush_procfs, 1639 + .proc_read = read_flush_procfs, 1640 + .proc_write = write_flush_procfs, 1641 + .proc_release = release_flush_procfs, 1642 + .proc_lseek = no_llseek, 1642 1643 }; 1643 1644 1644 1645 static void remove_cache_proc_entries(struct cache_detail *cd) ··· 1661 1662 goto out_nomem; 1662 1663 1663 1664 p = proc_create_data("flush", S_IFREG | 0600, 1664 - cd->procfs, &cache_flush_operations_procfs, cd); 1665 + cd->procfs, &cache_flush_proc_ops, cd); 1665 1666 if (p == NULL) 1666 1667 goto out_nomem; 1667 1668 1668 1669 if (cd->cache_request || cd->cache_parse) { 1669 1670 p = proc_create_data("channel", S_IFREG | 0600, cd->procfs, 1670 - &cache_file_operations_procfs, cd); 1671 + &cache_channel_proc_ops, cd); 1671 1672 if (p == NULL) 1672 1673 goto out_nomem; 1673 1674 } 1674 1675 if (cd->cache_show) { 1675 1676 p = proc_create_data("content", S_IFREG | 0400, cd->procfs, 1676 - &content_file_operations_procfs, cd); 1677 + &content_proc_ops, cd); 1677 1678 if (p == NULL) 1678 1679 goto out_nomem; 1679 1680 }
+10 -11
net/sunrpc/stats.c
··· 69 69 return single_open(file, rpc_proc_show, PDE_DATA(inode)); 70 70 } 71 71 72 - static const struct file_operations rpc_proc_fops = { 73 - .owner = THIS_MODULE, 74 - .open = rpc_proc_open, 75 - .read = seq_read, 76 - .llseek = seq_lseek, 77 - .release = single_release, 72 + static const struct proc_ops rpc_proc_ops = { 73 + .proc_open = rpc_proc_open, 74 + .proc_read = seq_read, 75 + .proc_lseek = seq_lseek, 76 + .proc_release = single_release, 78 77 }; 79 78 80 79 /* ··· 280 281 */ 281 282 static inline struct proc_dir_entry * 282 283 do_register(struct net *net, const char *name, void *data, 283 - const struct file_operations *fops) 284 + const struct proc_ops *proc_ops) 284 285 { 285 286 struct sunrpc_net *sn; 286 287 287 288 dprintk("RPC: registering /proc/net/rpc/%s\n", name); 288 289 sn = net_generic(net, sunrpc_net_id); 289 - return proc_create_data(name, 0, sn->proc_net_rpc, fops, data); 290 + return proc_create_data(name, 0, sn->proc_net_rpc, proc_ops, data); 290 291 } 291 292 292 293 struct proc_dir_entry * 293 294 rpc_proc_register(struct net *net, struct rpc_stat *statp) 294 295 { 295 - return do_register(net, statp->program->name, statp, &rpc_proc_fops); 296 + return do_register(net, statp->program->name, statp, &rpc_proc_ops); 296 297 } 297 298 EXPORT_SYMBOL_GPL(rpc_proc_register); 298 299 ··· 307 308 EXPORT_SYMBOL_GPL(rpc_proc_unregister); 308 309 309 310 struct proc_dir_entry * 310 - svc_proc_register(struct net *net, struct svc_stat *statp, const struct file_operations *fops) 311 + svc_proc_register(struct net *net, struct svc_stat *statp, const struct proc_ops *proc_ops) 311 312 { 312 - return do_register(net, statp->program->pg_name, statp, fops); 313 + return do_register(net, statp->program->pg_name, statp, proc_ops); 313 314 } 314 315 EXPORT_SYMBOL_GPL(svc_proc_register); 315 316
+5 -6
samples/kfifo/bytestream-example.c
··· 142 142 return ret ? ret : copied; 143 143 } 144 144 145 - static const struct file_operations fifo_fops = { 146 - .owner = THIS_MODULE, 147 - .read = fifo_read, 148 - .write = fifo_write, 149 - .llseek = noop_llseek, 145 + static const struct proc_ops fifo_proc_ops = { 146 + .proc_read = fifo_read, 147 + .proc_write = fifo_write, 148 + .proc_lseek = noop_llseek, 150 149 }; 151 150 152 151 static int __init example_init(void) ··· 168 169 return -EIO; 169 170 } 170 171 171 - if (proc_create(PROC_FIFO, 0, NULL, &fifo_fops) == NULL) { 172 + if (proc_create(PROC_FIFO, 0, NULL, &fifo_proc_ops) == NULL) { 172 173 #ifdef DYNAMIC 173 174 kfifo_free(&test); 174 175 #endif
+5 -6
samples/kfifo/inttype-example.c
··· 135 135 return ret ? ret : copied; 136 136 } 137 137 138 - static const struct file_operations fifo_fops = { 139 - .owner = THIS_MODULE, 140 - .read = fifo_read, 141 - .write = fifo_write, 142 - .llseek = noop_llseek, 138 + static const struct proc_ops fifo_proc_ops = { 139 + .proc_read = fifo_read, 140 + .proc_write = fifo_write, 141 + .proc_lseek = noop_llseek, 143 142 }; 144 143 145 144 static int __init example_init(void) ··· 159 160 return -EIO; 160 161 } 161 162 162 - if (proc_create(PROC_FIFO, 0, NULL, &fifo_fops) == NULL) { 163 + if (proc_create(PROC_FIFO, 0, NULL, &fifo_proc_ops) == NULL) { 163 164 #ifdef DYNAMIC 164 165 kfifo_free(&test); 165 166 #endif
+5 -6
samples/kfifo/record-example.c
··· 149 149 return ret ? ret : copied; 150 150 } 151 151 152 - static const struct file_operations fifo_fops = { 153 - .owner = THIS_MODULE, 154 - .read = fifo_read, 155 - .write = fifo_write, 156 - .llseek = noop_llseek, 152 + static const struct proc_ops fifo_proc_ops = { 153 + .proc_read = fifo_read, 154 + .proc_write = fifo_write, 155 + .proc_lseek = noop_llseek, 157 156 }; 158 157 159 158 static int __init example_init(void) ··· 175 176 return -EIO; 176 177 } 177 178 178 - if (proc_create(PROC_FIFO, 0, NULL, &fifo_fops) == NULL) { 179 + if (proc_create(PROC_FIFO, 0, NULL, &fifo_proc_ops) == NULL) { 179 180 #ifdef DYNAMIC 180 181 kfifo_free(&test); 181 182 #endif
+16 -18
sound/core/info.c
··· 282 282 return 0; 283 283 } 284 284 285 - static const struct file_operations snd_info_entry_operations = 285 + static const struct proc_ops snd_info_entry_operations = 286 286 { 287 - .owner = THIS_MODULE, 288 - .llseek = snd_info_entry_llseek, 289 - .read = snd_info_entry_read, 290 - .write = snd_info_entry_write, 291 - .poll = snd_info_entry_poll, 292 - .unlocked_ioctl = snd_info_entry_ioctl, 293 - .mmap = snd_info_entry_mmap, 294 - .open = snd_info_entry_open, 295 - .release = snd_info_entry_release, 287 + .proc_lseek = snd_info_entry_llseek, 288 + .proc_read = snd_info_entry_read, 289 + .proc_write = snd_info_entry_write, 290 + .proc_poll = snd_info_entry_poll, 291 + .proc_ioctl = snd_info_entry_ioctl, 292 + .proc_mmap = snd_info_entry_mmap, 293 + .proc_open = snd_info_entry_open, 294 + .proc_release = snd_info_entry_release, 296 295 }; 297 296 298 297 /* ··· 420 421 return 0; 421 422 } 422 423 423 - static const struct file_operations snd_info_text_entry_ops = 424 + static const struct proc_ops snd_info_text_entry_ops = 424 425 { 425 - .owner = THIS_MODULE, 426 - .open = snd_info_text_entry_open, 427 - .release = snd_info_text_entry_release, 428 - .write = snd_info_text_entry_write, 429 - .llseek = seq_lseek, 430 - .read = seq_read, 426 + .proc_open = snd_info_text_entry_open, 427 + .proc_release = snd_info_text_entry_release, 428 + .proc_write = snd_info_text_entry_write, 429 + .proc_lseek = seq_lseek, 430 + .proc_read = seq_read, 431 431 }; 432 432 433 433 static struct snd_info_entry *create_subdir(struct module *mod, ··· 808 810 return -ENOMEM; 809 811 } 810 812 } else { 811 - const struct file_operations *ops; 813 + const struct proc_ops *ops; 812 814 if (entry->content == SNDRV_INFO_CONTENT_DATA) 813 815 ops = &snd_info_entry_operations; 814 816 else