block: unify sysfs size node handling

Now that capacity and __dev are moved to part0, part0 and others can
share the same method.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index ff293ec..9cb8380 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -591,6 +591,9 @@
 			void *data);
 extern void blk_unregister_region(dev_t devt, unsigned long range);
 
+extern ssize_t part_size_show(struct device *dev,
+			      struct device_attribute *attr, char *buf);
+
 #else /* CONFIG_BLOCK */
 
 static inline void printk_all_partitions(void) { }