summaryrefslogtreecommitdiffstats
path: root/block/genhd.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/genhd.c')
-rw-r--r--block/genhd.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 4d694035d343..f1543a45e73b 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -1027,18 +1027,6 @@ static const struct seq_operations partitions_op = {
1027 .stop = disk_seqf_stop, 1027 .stop = disk_seqf_stop,
1028 .show = show_partition 1028 .show = show_partition
1029}; 1029};
1030
1031static int partitions_open(struct inode *inode, struct file *file)
1032{
1033 return seq_open(file, &partitions_op);
1034}
1035
1036static const struct file_operations proc_partitions_operations = {
1037 .open = partitions_open,
1038 .read = seq_read,
1039 .llseek = seq_lseek,
1040 .release = seq_release,
1041};
1042#endif 1030#endif
1043 1031
1044 1032
@@ -1374,22 +1362,10 @@ static const struct seq_operations diskstats_op = {
1374 .show = diskstats_show 1362 .show = diskstats_show
1375}; 1363};
1376 1364
1377static int diskstats_open(struct inode *inode, struct file *file)
1378{
1379 return seq_open(file, &diskstats_op);
1380}
1381
1382static const struct file_operations proc_diskstats_operations = {
1383 .open = diskstats_open,
1384 .read = seq_read,
1385 .llseek = seq_lseek,
1386 .release = seq_release,
1387};
1388
1389static int __init proc_genhd_init(void) 1365static int __init proc_genhd_init(void)
1390{ 1366{
1391 proc_create("diskstats", 0, NULL, &proc_diskstats_operations); 1367 proc_create_seq("diskstats", 0, NULL, &diskstats_op);
1392 proc_create("partitions", 0, NULL, &proc_partitions_operations); 1368 proc_create_seq("partitions", 0, NULL, &partitions_op);
1393 return 0; 1369 return 0;
1394} 1370}
1395module_init(proc_genhd_init); 1371module_init(proc_genhd_init);