diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-04 13:00:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-04 13:00:01 -0400 |
commit | cf626b0da78df6669c6b5f51ddd9a70a0702e579 (patch) | |
tree | 45d29a4cb7574aed7f140814ed22088ded21c291 /block/genhd.c | |
parent | 9c50eafc32ddbd166c8a2bbaecd4ad201c452b14 (diff) | |
parent | 5ef03dbd91855544cd4c7c1910c3ef5226ee87e8 (diff) |
Merge branch 'hch.procfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull procfs updates from Al Viro:
"Christoph's proc_create_... cleanups series"
* 'hch.procfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (44 commits)
xfs, proc: hide unused xfs procfs helpers
isdn/gigaset: add back gigaset_procinfo assignment
proc: update SIZEOF_PDE_INLINE_NAME for the new pde fields
tty: replace ->proc_fops with ->proc_show
ide: replace ->proc_fops with ->proc_show
ide: remove ide_driver_proc_write
isdn: replace ->proc_fops with ->proc_show
atm: switch to proc_create_seq_private
atm: simplify procfs code
bluetooth: switch to proc_create_seq_data
netfilter/x_tables: switch to proc_create_seq_private
netfilter/xt_hashlimit: switch to proc_create_{seq,single}_data
neigh: switch to proc_create_seq_data
hostap: switch to proc_create_{seq,single}_data
bonding: switch to proc_create_seq_data
rtc/proc: switch to proc_create_single_data
drbd: switch to proc_create_single
resource: switch to proc_create_seq_data
staging/rtl8192u: simplify procfs code
jfs: simplify procfs code
...
Diffstat (limited to 'block/genhd.c')
-rw-r--r-- | block/genhd.c | 28 |
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 | |||
1031 | static int partitions_open(struct inode *inode, struct file *file) | ||
1032 | { | ||
1033 | return seq_open(file, &partitions_op); | ||
1034 | } | ||
1035 | |||
1036 | static 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 | ||
1377 | static int diskstats_open(struct inode *inode, struct file *file) | ||
1378 | { | ||
1379 | return seq_open(file, &diskstats_op); | ||
1380 | } | ||
1381 | |||
1382 | static 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 | |||
1389 | static int __init proc_genhd_init(void) | 1365 | static 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 | } |
1395 | module_init(proc_genhd_init); | 1371 | module_init(proc_genhd_init); |