zram: kill unused zram_get_num_devices()
authorJiang Liu <liuj97@gmail.com>
Thu, 6 Jun 2013 16:07:29 +0000 (00:07 +0800)
committerAlex Shi <alex.shi@linaro.org>
Mon, 11 May 2015 08:16:13 +0000 (16:16 +0800)
Now there's no caller of zram_get_num_devices(), so kill it.
And change zram_devices to static because it's only used in zram_drv.c.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 0f0e3ba346c8d8d2cb409b157df79805931a1c2c)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
drivers/staging/zram/zram_drv.c
drivers/staging/zram/zram_drv.h

index 2652dfac0b3204070220c9a2036db74d04901a35..49f34b0651816dc58356158be0177ae3504007c1 100644 (file)
@@ -37,7 +37,7 @@
 
 /* Globals */
 static int zram_major;
-struct zram *zram_devices;
+static struct zram *zram_devices;
 
 /* Module params (documentation at end) */
 static unsigned int num_devices = 1;
@@ -679,11 +679,6 @@ static void destroy_device(struct zram *zram)
                blk_cleanup_queue(zram->queue);
 }
 
-unsigned int zram_get_num_devices(void)
-{
-       return num_devices;
-}
-
 static int __init zram_init(void)
 {
        int ret, dev_id;
index d542eee81357582cf95bd4e296bb1610c2a7d7f8..b3a315d1eb2394910f8c69b0af7ed36da674b1e5 100644 (file)
@@ -110,8 +110,6 @@ struct zram {
        struct zram_stats stats;
 };
 
-extern struct zram *zram_devices;
-unsigned int zram_get_num_devices(void);
 #ifdef CONFIG_SYSFS
 extern struct attribute_group zram_disk_attr_group;
 #endif