diff options
-rw-r--r-- | drivers/ide/ide-cd.c | 15 | ||||
-rw-r--r-- | drivers/ide/ide-disk_proc.c | 62 | ||||
-rw-r--r-- | drivers/ide/ide-floppy_proc.c | 17 | ||||
-rw-r--r-- | drivers/ide/ide-proc.c | 136 | ||||
-rw-r--r-- | drivers/ide/ide-tape.c | 17 | ||||
-rw-r--r-- | include/linux/ide.h | 6 |
6 files changed, 31 insertions, 222 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 5a8e8e3c22cd..b52a7bdace52 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -1426,21 +1426,8 @@ static int idecd_capacity_proc_show(struct seq_file *m, void *v) | |||
1426 | return 0; | 1426 | return 0; |
1427 | } | 1427 | } |
1428 | 1428 | ||
1429 | static int idecd_capacity_proc_open(struct inode *inode, struct file *file) | ||
1430 | { | ||
1431 | return single_open(file, idecd_capacity_proc_show, PDE_DATA(inode)); | ||
1432 | } | ||
1433 | |||
1434 | static const struct file_operations idecd_capacity_proc_fops = { | ||
1435 | .owner = THIS_MODULE, | ||
1436 | .open = idecd_capacity_proc_open, | ||
1437 | .read = seq_read, | ||
1438 | .llseek = seq_lseek, | ||
1439 | .release = single_release, | ||
1440 | }; | ||
1441 | |||
1442 | static ide_proc_entry_t idecd_proc[] = { | 1429 | static ide_proc_entry_t idecd_proc[] = { |
1443 | { "capacity", S_IFREG|S_IRUGO, &idecd_capacity_proc_fops }, | 1430 | { "capacity", S_IFREG|S_IRUGO, idecd_capacity_proc_show }, |
1444 | {} | 1431 | {} |
1445 | }; | 1432 | }; |
1446 | 1433 | ||
diff --git a/drivers/ide/ide-disk_proc.c b/drivers/ide/ide-disk_proc.c index 82a36ced4e96..95d239b2f646 100644 --- a/drivers/ide/ide-disk_proc.c +++ b/drivers/ide/ide-disk_proc.c | |||
@@ -52,19 +52,6 @@ static int idedisk_cache_proc_show(struct seq_file *m, void *v) | |||
52 | return 0; | 52 | return 0; |
53 | } | 53 | } |
54 | 54 | ||
55 | static int idedisk_cache_proc_open(struct inode *inode, struct file *file) | ||
56 | { | ||
57 | return single_open(file, idedisk_cache_proc_show, PDE_DATA(inode)); | ||
58 | } | ||
59 | |||
60 | static const struct file_operations idedisk_cache_proc_fops = { | ||
61 | .owner = THIS_MODULE, | ||
62 | .open = idedisk_cache_proc_open, | ||
63 | .read = seq_read, | ||
64 | .llseek = seq_lseek, | ||
65 | .release = single_release, | ||
66 | }; | ||
67 | |||
68 | static int idedisk_capacity_proc_show(struct seq_file *m, void *v) | 55 | static int idedisk_capacity_proc_show(struct seq_file *m, void *v) |
69 | { | 56 | { |
70 | ide_drive_t*drive = (ide_drive_t *)m->private; | 57 | ide_drive_t*drive = (ide_drive_t *)m->private; |
@@ -73,19 +60,6 @@ static int idedisk_capacity_proc_show(struct seq_file *m, void *v) | |||
73 | return 0; | 60 | return 0; |
74 | } | 61 | } |
75 | 62 | ||
76 | static int idedisk_capacity_proc_open(struct inode *inode, struct file *file) | ||
77 | { | ||
78 | return single_open(file, idedisk_capacity_proc_show, PDE_DATA(inode)); | ||
79 | } | ||
80 | |||
81 | static const struct file_operations idedisk_capacity_proc_fops = { | ||
82 | .owner = THIS_MODULE, | ||
83 | .open = idedisk_capacity_proc_open, | ||
84 | .read = seq_read, | ||
85 | .llseek = seq_lseek, | ||
86 | .release = single_release, | ||
87 | }; | ||
88 | |||
89 | static int __idedisk_proc_show(struct seq_file *m, ide_drive_t *drive, u8 sub_cmd) | 63 | static int __idedisk_proc_show(struct seq_file *m, ide_drive_t *drive, u8 sub_cmd) |
90 | { | 64 | { |
91 | u8 *buf; | 65 | u8 *buf; |
@@ -114,43 +88,17 @@ static int idedisk_sv_proc_show(struct seq_file *m, void *v) | |||
114 | return __idedisk_proc_show(m, m->private, ATA_SMART_READ_VALUES); | 88 | return __idedisk_proc_show(m, m->private, ATA_SMART_READ_VALUES); |
115 | } | 89 | } |
116 | 90 | ||
117 | static int idedisk_sv_proc_open(struct inode *inode, struct file *file) | ||
118 | { | ||
119 | return single_open(file, idedisk_sv_proc_show, PDE_DATA(inode)); | ||
120 | } | ||
121 | |||
122 | static const struct file_operations idedisk_sv_proc_fops = { | ||
123 | .owner = THIS_MODULE, | ||
124 | .open = idedisk_sv_proc_open, | ||
125 | .read = seq_read, | ||
126 | .llseek = seq_lseek, | ||
127 | .release = single_release, | ||
128 | }; | ||
129 | |||
130 | static int idedisk_st_proc_show(struct seq_file *m, void *v) | 91 | static int idedisk_st_proc_show(struct seq_file *m, void *v) |
131 | { | 92 | { |
132 | return __idedisk_proc_show(m, m->private, ATA_SMART_READ_THRESHOLDS); | 93 | return __idedisk_proc_show(m, m->private, ATA_SMART_READ_THRESHOLDS); |
133 | } | 94 | } |
134 | 95 | ||
135 | static int idedisk_st_proc_open(struct inode *inode, struct file *file) | ||
136 | { | ||
137 | return single_open(file, idedisk_st_proc_show, PDE_DATA(inode)); | ||
138 | } | ||
139 | |||
140 | static const struct file_operations idedisk_st_proc_fops = { | ||
141 | .owner = THIS_MODULE, | ||
142 | .open = idedisk_st_proc_open, | ||
143 | .read = seq_read, | ||
144 | .llseek = seq_lseek, | ||
145 | .release = single_release, | ||
146 | }; | ||
147 | |||
148 | ide_proc_entry_t ide_disk_proc[] = { | 96 | ide_proc_entry_t ide_disk_proc[] = { |
149 | { "cache", S_IFREG|S_IRUGO, &idedisk_cache_proc_fops }, | 97 | { "cache", S_IFREG|S_IRUGO, idedisk_cache_proc_show }, |
150 | { "capacity", S_IFREG|S_IRUGO, &idedisk_capacity_proc_fops }, | 98 | { "capacity", S_IFREG|S_IRUGO, idedisk_capacity_proc_show }, |
151 | { "geometry", S_IFREG|S_IRUGO, &ide_geometry_proc_fops }, | 99 | { "geometry", S_IFREG|S_IRUGO, ide_geometry_proc_show }, |
152 | { "smart_values", S_IFREG|S_IRUSR, &idedisk_sv_proc_fops }, | 100 | { "smart_values", S_IFREG|S_IRUSR, idedisk_sv_proc_show }, |
153 | { "smart_thresholds", S_IFREG|S_IRUSR, &idedisk_st_proc_fops }, | 101 | { "smart_thresholds", S_IFREG|S_IRUSR, idedisk_st_proc_show }, |
154 | {} | 102 | {} |
155 | }; | 103 | }; |
156 | 104 | ||
diff --git a/drivers/ide/ide-floppy_proc.c b/drivers/ide/ide-floppy_proc.c index 471457ebea67..7f697ddb5fe5 100644 --- a/drivers/ide/ide-floppy_proc.c +++ b/drivers/ide/ide-floppy_proc.c | |||
@@ -14,22 +14,9 @@ static int idefloppy_capacity_proc_show(struct seq_file *m, void *v) | |||
14 | return 0; | 14 | return 0; |
15 | } | 15 | } |
16 | 16 | ||
17 | static int idefloppy_capacity_proc_open(struct inode *inode, struct file *file) | ||
18 | { | ||
19 | return single_open(file, idefloppy_capacity_proc_show, PDE_DATA(inode)); | ||
20 | } | ||
21 | |||
22 | static const struct file_operations idefloppy_capacity_proc_fops = { | ||
23 | .owner = THIS_MODULE, | ||
24 | .open = idefloppy_capacity_proc_open, | ||
25 | .read = seq_read, | ||
26 | .llseek = seq_lseek, | ||
27 | .release = single_release, | ||
28 | }; | ||
29 | |||
30 | ide_proc_entry_t ide_floppy_proc[] = { | 17 | ide_proc_entry_t ide_floppy_proc[] = { |
31 | { "capacity", S_IFREG|S_IRUGO, &idefloppy_capacity_proc_fops }, | 18 | { "capacity", S_IFREG|S_IRUGO, idefloppy_capacity_proc_show }, |
32 | { "geometry", S_IFREG|S_IRUGO, &ide_geometry_proc_fops }, | 19 | { "geometry", S_IFREG|S_IRUGO, ide_geometry_proc_show }, |
33 | {} | 20 | {} |
34 | }; | 21 | }; |
35 | 22 | ||
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c index b3b8b8822d6a..45c997430332 100644 --- a/drivers/ide/ide-proc.c +++ b/drivers/ide/ide-proc.c | |||
@@ -56,19 +56,6 @@ static int ide_imodel_proc_show(struct seq_file *m, void *v) | |||
56 | return 0; | 56 | return 0; |
57 | } | 57 | } |
58 | 58 | ||
59 | static int ide_imodel_proc_open(struct inode *inode, struct file *file) | ||
60 | { | ||
61 | return single_open(file, ide_imodel_proc_show, PDE_DATA(inode)); | ||
62 | } | ||
63 | |||
64 | static const struct file_operations ide_imodel_proc_fops = { | ||
65 | .owner = THIS_MODULE, | ||
66 | .open = ide_imodel_proc_open, | ||
67 | .read = seq_read, | ||
68 | .llseek = seq_lseek, | ||
69 | .release = single_release, | ||
70 | }; | ||
71 | |||
72 | static int ide_mate_proc_show(struct seq_file *m, void *v) | 59 | static int ide_mate_proc_show(struct seq_file *m, void *v) |
73 | { | 60 | { |
74 | ide_hwif_t *hwif = (ide_hwif_t *) m->private; | 61 | ide_hwif_t *hwif = (ide_hwif_t *) m->private; |
@@ -80,19 +67,6 @@ static int ide_mate_proc_show(struct seq_file *m, void *v) | |||
80 | return 0; | 67 | return 0; |
81 | } | 68 | } |
82 | 69 | ||
83 | static int ide_mate_proc_open(struct inode *inode, struct file *file) | ||
84 | { | ||
85 | return single_open(file, ide_mate_proc_show, PDE_DATA(inode)); | ||
86 | } | ||
87 | |||
88 | static const struct file_operations ide_mate_proc_fops = { | ||
89 | .owner = THIS_MODULE, | ||
90 | .open = ide_mate_proc_open, | ||
91 | .read = seq_read, | ||
92 | .llseek = seq_lseek, | ||
93 | .release = single_release, | ||
94 | }; | ||
95 | |||
96 | static int ide_channel_proc_show(struct seq_file *m, void *v) | 70 | static int ide_channel_proc_show(struct seq_file *m, void *v) |
97 | { | 71 | { |
98 | ide_hwif_t *hwif = (ide_hwif_t *) m->private; | 72 | ide_hwif_t *hwif = (ide_hwif_t *) m->private; |
@@ -101,19 +75,6 @@ static int ide_channel_proc_show(struct seq_file *m, void *v) | |||
101 | return 0; | 75 | return 0; |
102 | } | 76 | } |
103 | 77 | ||
104 | static int ide_channel_proc_open(struct inode *inode, struct file *file) | ||
105 | { | ||
106 | return single_open(file, ide_channel_proc_show, PDE_DATA(inode)); | ||
107 | } | ||
108 | |||
109 | static const struct file_operations ide_channel_proc_fops = { | ||
110 | .owner = THIS_MODULE, | ||
111 | .open = ide_channel_proc_open, | ||
112 | .read = seq_read, | ||
113 | .llseek = seq_lseek, | ||
114 | .release = single_release, | ||
115 | }; | ||
116 | |||
117 | static int ide_identify_proc_show(struct seq_file *m, void *v) | 78 | static int ide_identify_proc_show(struct seq_file *m, void *v) |
118 | { | 79 | { |
119 | ide_drive_t *drive = (ide_drive_t *)m->private; | 80 | ide_drive_t *drive = (ide_drive_t *)m->private; |
@@ -141,19 +102,6 @@ static int ide_identify_proc_show(struct seq_file *m, void *v) | |||
141 | return 0; | 102 | return 0; |
142 | } | 103 | } |
143 | 104 | ||
144 | static int ide_identify_proc_open(struct inode *inode, struct file *file) | ||
145 | { | ||
146 | return single_open(file, ide_identify_proc_show, PDE_DATA(inode)); | ||
147 | } | ||
148 | |||
149 | static const struct file_operations ide_identify_proc_fops = { | ||
150 | .owner = THIS_MODULE, | ||
151 | .open = ide_identify_proc_open, | ||
152 | .read = seq_read, | ||
153 | .llseek = seq_lseek, | ||
154 | .release = single_release, | ||
155 | }; | ||
156 | |||
157 | /** | 105 | /** |
158 | * ide_find_setting - find a specific setting | 106 | * ide_find_setting - find a specific setting |
159 | * @st: setting table pointer | 107 | * @st: setting table pointer |
@@ -441,27 +389,14 @@ static const struct file_operations ide_settings_proc_fops = { | |||
441 | .write = ide_settings_proc_write, | 389 | .write = ide_settings_proc_write, |
442 | }; | 390 | }; |
443 | 391 | ||
444 | static int ide_capacity_proc_show(struct seq_file *m, void *v) | 392 | int ide_capacity_proc_show(struct seq_file *m, void *v) |
445 | { | 393 | { |
446 | seq_printf(m, "%llu\n", (long long)0x7fffffff); | 394 | seq_printf(m, "%llu\n", (long long)0x7fffffff); |
447 | return 0; | 395 | return 0; |
448 | } | 396 | } |
397 | EXPORT_SYMBOL_GPL(ide_capacity_proc_show); | ||
449 | 398 | ||
450 | static int ide_capacity_proc_open(struct inode *inode, struct file *file) | 399 | int ide_geometry_proc_show(struct seq_file *m, void *v) |
451 | { | ||
452 | return single_open(file, ide_capacity_proc_show, NULL); | ||
453 | } | ||
454 | |||
455 | const struct file_operations ide_capacity_proc_fops = { | ||
456 | .owner = THIS_MODULE, | ||
457 | .open = ide_capacity_proc_open, | ||
458 | .read = seq_read, | ||
459 | .llseek = seq_lseek, | ||
460 | .release = single_release, | ||
461 | }; | ||
462 | EXPORT_SYMBOL_GPL(ide_capacity_proc_fops); | ||
463 | |||
464 | static int ide_geometry_proc_show(struct seq_file *m, void *v) | ||
465 | { | 400 | { |
466 | ide_drive_t *drive = (ide_drive_t *) m->private; | 401 | ide_drive_t *drive = (ide_drive_t *) m->private; |
467 | 402 | ||
@@ -471,20 +406,7 @@ static int ide_geometry_proc_show(struct seq_file *m, void *v) | |||
471 | drive->bios_cyl, drive->bios_head, drive->bios_sect); | 406 | drive->bios_cyl, drive->bios_head, drive->bios_sect); |
472 | return 0; | 407 | return 0; |
473 | } | 408 | } |
474 | 409 | EXPORT_SYMBOL(ide_geometry_proc_show); | |
475 | static int ide_geometry_proc_open(struct inode *inode, struct file *file) | ||
476 | { | ||
477 | return single_open(file, ide_geometry_proc_show, PDE_DATA(inode)); | ||
478 | } | ||
479 | |||
480 | const struct file_operations ide_geometry_proc_fops = { | ||
481 | .owner = THIS_MODULE, | ||
482 | .open = ide_geometry_proc_open, | ||
483 | .read = seq_read, | ||
484 | .llseek = seq_lseek, | ||
485 | .release = single_release, | ||
486 | }; | ||
487 | EXPORT_SYMBOL(ide_geometry_proc_fops); | ||
488 | 410 | ||
489 | static int ide_dmodel_proc_show(struct seq_file *seq, void *v) | 411 | static int ide_dmodel_proc_show(struct seq_file *seq, void *v) |
490 | { | 412 | { |
@@ -495,19 +417,6 @@ static int ide_dmodel_proc_show(struct seq_file *seq, void *v) | |||
495 | return 0; | 417 | return 0; |
496 | } | 418 | } |
497 | 419 | ||
498 | static int ide_dmodel_proc_open(struct inode *inode, struct file *file) | ||
499 | { | ||
500 | return single_open(file, ide_dmodel_proc_show, PDE_DATA(inode)); | ||
501 | } | ||
502 | |||
503 | static const struct file_operations ide_dmodel_proc_fops = { | ||
504 | .owner = THIS_MODULE, | ||
505 | .open = ide_dmodel_proc_open, | ||
506 | .read = seq_read, | ||
507 | .llseek = seq_lseek, | ||
508 | .release = single_release, | ||
509 | }; | ||
510 | |||
511 | static int ide_driver_proc_show(struct seq_file *m, void *v) | 420 | static int ide_driver_proc_show(struct seq_file *m, void *v) |
512 | { | 421 | { |
513 | ide_drive_t *drive = (ide_drive_t *)m->private; | 422 | ide_drive_t *drive = (ide_drive_t *)m->private; |
@@ -523,19 +432,6 @@ static int ide_driver_proc_show(struct seq_file *m, void *v) | |||
523 | return 0; | 432 | return 0; |
524 | } | 433 | } |
525 | 434 | ||
526 | static int ide_driver_proc_open(struct inode *inode, struct file *file) | ||
527 | { | ||
528 | return single_open(file, ide_driver_proc_show, PDE_DATA(inode)); | ||
529 | } | ||
530 | |||
531 | static const struct file_operations ide_driver_proc_fops = { | ||
532 | .owner = THIS_MODULE, | ||
533 | .open = ide_driver_proc_open, | ||
534 | .read = seq_read, | ||
535 | .llseek = seq_lseek, | ||
536 | .release = single_release, | ||
537 | }; | ||
538 | |||
539 | static int ide_media_proc_show(struct seq_file *m, void *v) | 435 | static int ide_media_proc_show(struct seq_file *m, void *v) |
540 | { | 436 | { |
541 | ide_drive_t *drive = (ide_drive_t *) m->private; | 437 | ide_drive_t *drive = (ide_drive_t *) m->private; |
@@ -567,11 +463,10 @@ static const struct file_operations ide_media_proc_fops = { | |||
567 | }; | 463 | }; |
568 | 464 | ||
569 | static ide_proc_entry_t generic_drive_entries[] = { | 465 | static ide_proc_entry_t generic_drive_entries[] = { |
570 | { "driver", S_IFREG|S_IRUGO, &ide_driver_proc_fops }, | 466 | { "driver", S_IFREG|S_IRUGO, ide_driver_proc_show }, |
571 | { "identify", S_IFREG|S_IRUSR, &ide_identify_proc_fops}, | 467 | { "identify", S_IFREG|S_IRUSR, ide_identify_proc_show }, |
572 | { "media", S_IFREG|S_IRUGO, &ide_media_proc_fops }, | 468 | { "media", S_IFREG|S_IRUGO, ide_media_proc_show }, |
573 | { "model", S_IFREG|S_IRUGO, &ide_dmodel_proc_fops }, | 469 | { "model", S_IFREG|S_IRUGO, ide_dmodel_proc_show }, |
574 | { "settings", S_IFREG|S_IRUSR|S_IWUSR, &ide_settings_proc_fops}, | ||
575 | {} | 470 | {} |
576 | }; | 471 | }; |
577 | 472 | ||
@@ -582,7 +477,7 @@ static void ide_add_proc_entries(struct proc_dir_entry *dir, ide_proc_entry_t *p | |||
582 | if (!dir || !p) | 477 | if (!dir || !p) |
583 | return; | 478 | return; |
584 | while (p->name != NULL) { | 479 | while (p->name != NULL) { |
585 | ent = proc_create_data(p->name, p->mode, dir, p->proc_fops, data); | 480 | ent = proc_create_single_data(p->name, p->mode, dir, p->show, data); |
586 | if (!ent) return; | 481 | if (!ent) return; |
587 | p++; | 482 | p++; |
588 | } | 483 | } |
@@ -647,8 +542,12 @@ void ide_proc_port_register_devices(ide_hwif_t *hwif) | |||
647 | continue; | 542 | continue; |
648 | 543 | ||
649 | drive->proc = proc_mkdir(drive->name, parent); | 544 | drive->proc = proc_mkdir(drive->name, parent); |
650 | if (drive->proc) | 545 | if (drive->proc) { |
651 | ide_add_proc_entries(drive->proc, generic_drive_entries, drive); | 546 | ide_add_proc_entries(drive->proc, generic_drive_entries, drive); |
547 | proc_create_data("setting", S_IFREG|S_IRUSR|S_IWUSR, | ||
548 | drive->proc, &ide_settings_proc_fops, | ||
549 | drive); | ||
550 | } | ||
652 | sprintf(name, "ide%d/%s", (drive->name[2]-'a')/2, drive->name); | 551 | sprintf(name, "ide%d/%s", (drive->name[2]-'a')/2, drive->name); |
653 | ent = proc_symlink(drive->name, proc_ide_root, name); | 552 | ent = proc_symlink(drive->name, proc_ide_root, name); |
654 | if (!ent) return; | 553 | if (!ent) return; |
@@ -658,6 +557,7 @@ void ide_proc_port_register_devices(ide_hwif_t *hwif) | |||
658 | void ide_proc_unregister_device(ide_drive_t *drive) | 557 | void ide_proc_unregister_device(ide_drive_t *drive) |
659 | { | 558 | { |
660 | if (drive->proc) { | 559 | if (drive->proc) { |
560 | remove_proc_entry("settings", drive->proc); | ||
661 | ide_remove_proc_entries(drive->proc, generic_drive_entries); | 561 | ide_remove_proc_entries(drive->proc, generic_drive_entries); |
662 | remove_proc_entry(drive->name, proc_ide_root); | 562 | remove_proc_entry(drive->name, proc_ide_root); |
663 | remove_proc_entry(drive->name, drive->hwif->proc); | 563 | remove_proc_entry(drive->name, drive->hwif->proc); |
@@ -666,9 +566,9 @@ void ide_proc_unregister_device(ide_drive_t *drive) | |||
666 | } | 566 | } |
667 | 567 | ||
668 | static ide_proc_entry_t hwif_entries[] = { | 568 | static ide_proc_entry_t hwif_entries[] = { |
669 | { "channel", S_IFREG|S_IRUGO, &ide_channel_proc_fops }, | 569 | { "channel", S_IFREG|S_IRUGO, ide_channel_proc_show }, |
670 | { "mate", S_IFREG|S_IRUGO, &ide_mate_proc_fops }, | 570 | { "mate", S_IFREG|S_IRUGO, ide_mate_proc_show }, |
671 | { "model", S_IFREG|S_IRUGO, &ide_imodel_proc_fops }, | 571 | { "model", S_IFREG|S_IRUGO, ide_imodel_proc_show }, |
672 | {} | 572 | {} |
673 | }; | 573 | }; |
674 | 574 | ||
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index fd57e8ccc47a..ac2c6820c65a 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -1847,22 +1847,9 @@ static int idetape_name_proc_show(struct seq_file *m, void *v) | |||
1847 | return 0; | 1847 | return 0; |
1848 | } | 1848 | } |
1849 | 1849 | ||
1850 | static int idetape_name_proc_open(struct inode *inode, struct file *file) | ||
1851 | { | ||
1852 | return single_open(file, idetape_name_proc_show, PDE_DATA(inode)); | ||
1853 | } | ||
1854 | |||
1855 | static const struct file_operations idetape_name_proc_fops = { | ||
1856 | .owner = THIS_MODULE, | ||
1857 | .open = idetape_name_proc_open, | ||
1858 | .read = seq_read, | ||
1859 | .llseek = seq_lseek, | ||
1860 | .release = single_release, | ||
1861 | }; | ||
1862 | |||
1863 | static ide_proc_entry_t idetape_proc[] = { | 1850 | static ide_proc_entry_t idetape_proc[] = { |
1864 | { "capacity", S_IFREG|S_IRUGO, &ide_capacity_proc_fops }, | 1851 | { "capacity", S_IFREG|S_IRUGO, ide_capacity_proc_show }, |
1865 | { "name", S_IFREG|S_IRUGO, &idetape_name_proc_fops }, | 1852 | { "name", S_IFREG|S_IRUGO, idetape_name_proc_show }, |
1866 | {} | 1853 | {} |
1867 | }; | 1854 | }; |
1868 | 1855 | ||
diff --git a/include/linux/ide.h b/include/linux/ide.h index ca9d34feb572..752464f5a772 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -961,7 +961,7 @@ __IDE_PROC_DEVSET(_name, _min, _max, NULL, NULL) | |||
961 | typedef struct { | 961 | typedef struct { |
962 | const char *name; | 962 | const char *name; |
963 | umode_t mode; | 963 | umode_t mode; |
964 | const struct file_operations *proc_fops; | 964 | int (*show)(struct seq_file *, void *); |
965 | } ide_proc_entry_t; | 965 | } ide_proc_entry_t; |
966 | 966 | ||
967 | void proc_ide_create(void); | 967 | void proc_ide_create(void); |
@@ -973,8 +973,8 @@ void ide_proc_unregister_port(ide_hwif_t *); | |||
973 | void ide_proc_register_driver(ide_drive_t *, struct ide_driver *); | 973 | void ide_proc_register_driver(ide_drive_t *, struct ide_driver *); |
974 | void ide_proc_unregister_driver(ide_drive_t *, struct ide_driver *); | 974 | void ide_proc_unregister_driver(ide_drive_t *, struct ide_driver *); |
975 | 975 | ||
976 | extern const struct file_operations ide_capacity_proc_fops; | 976 | int ide_capacity_proc_show(struct seq_file *m, void *v); |
977 | extern const struct file_operations ide_geometry_proc_fops; | 977 | int ide_geometry_proc_show(struct seq_file *m, void *v); |
978 | #else | 978 | #else |
979 | static inline void proc_ide_create(void) { ; } | 979 | static inline void proc_ide_create(void) { ; } |
980 | static inline void proc_ide_destroy(void) { ; } | 980 | static inline void proc_ide_destroy(void) { ; } |