block: make /proc/diskstats only build if CONFIG_PROC_FS is enabled
authorRandy Dunlap <randy.dunlap@oracle.com>
Fri, 23 May 2008 16:44:11 +0000 (09:44 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 22 Jul 2008 04:54:49 +0000 (21:54 -0700)
These functions are only needed if CONFIG_PROC_FS is enabled, so save
the space when it is not.

This also makes it easier for a patch later in this series to work
properly if CONFIG_PROC_FS is not enabled.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
block/genhd.c

index e8c42bf..68a5f28 100644 (file)
@@ -544,6 +544,7 @@ static struct device_type disk_type = {
        .release        = disk_release,
 };
 
+#ifdef CONFIG_PROC_FS
 /*
  * aggregate disk stat collector.  Uses the same stats that the sysfs
  * entries do, above, but makes them available through one seq_file.
@@ -653,6 +654,7 @@ const struct seq_operations diskstats_op = {
        .stop   = diskstats_stop,
        .show   = diskstats_show
 };
+#endif /* CONFIG_PROC_FS */
 
 static void media_change_notify_thread(struct work_struct *work)
 {