Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 353987
b: refs/heads/master
c: ca3d70b
h: refs/heads/master
i:
  353985: 639cc17
  353983: bda895f
v: v3
  • Loading branch information
Davidlohr Bueso authored and Greg Kroah-Hartman committed Jan 16, 2013
1 parent 4a4bf9f commit 55e0c9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 955e7da82d8cc917a2c604c782b525dec3466921
refs/heads/master: ca3d70bd68455133eabcb8a0ae1b40254d87188b
10 changes: 3 additions & 7 deletions trunk/drivers/staging/zram/zram_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
Expand All @@ -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:
Expand Down

0 comments on commit 55e0c9b

Please sign in to comment.