From 55e0c9bdf4f4d40e814838c1a9ce1f227c883707 Mon Sep 17 00:00:00 2001 From: Davidlohr Bueso Date: Tue, 1 Jan 2013 21:24:13 -0800 Subject: [PATCH] --- yaml --- r: 353987 b: refs/heads/master c: ca3d70bd68455133eabcb8a0ae1b40254d87188b h: refs/heads/master i: 353985: 639cc17c3ebfdf1e32c4851cd13d97ff41131056 353983: bda895f7070e502311776ce8bbe803b7f28f6dc8 v: v3 --- [refs] | 2 +- trunk/drivers/staging/zram/zram_drv.c | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 1d45372d02bd..146426b3bc44 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 955e7da82d8cc917a2c604c782b525dec3466921 +refs/heads/master: ca3d70bd68455133eabcb8a0ae1b40254d87188b diff --git a/trunk/drivers/staging/zram/zram_drv.c b/trunk/drivers/staging/zram/zram_drv.c index fb4a7c94aed3..8115be90517c 100644 --- a/trunk/drivers/staging/zram/zram_drv.c +++ b/trunk/drivers/staging/zram/zram_drv.c @@ -40,7 +40,7 @@ static int zram_major; struct zram *zram_devices; /* Module params (documentation at end) */ -static unsigned int num_devices; +static unsigned int num_devices = 1; static void zram_stat_inc(u32 *v) { @@ -715,13 +715,7 @@ static int __init zram_init(void) goto out; } - if (!num_devices) { - pr_info("num_devices not specified. Using default: 1\n"); - num_devices = 1; - } - /* Allocate the device array and initialize each one */ - pr_info("Creating %u devices ...\n", num_devices); zram_devices = kzalloc(num_devices * sizeof(struct zram), GFP_KERNEL); if (!zram_devices) { ret = -ENOMEM; @@ -734,6 +728,8 @@ static int __init zram_init(void) goto free_devices; } + pr_info("Created %u device(s) ...\n", num_devices); + return 0; free_devices: