From 2aa157607423cfbbb079d1ad37d630d48a55c586 Mon Sep 17 00:00:00 2001 From: Noah Watkins Date: Wed, 20 Jul 2011 17:05:57 -0600 Subject: [PATCH] --- yaml --- r: 267580 b: refs/heads/master c: 43801f6e4ee269cd76f601c2b1d79897ea4a892f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/staging/zram/zram_drv.c | 16 ++++++++-------- trunk/drivers/staging/zram/zram_drv.h | 2 +- trunk/drivers/staging/zram/zram_sysfs.c | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index df12a3fa0cec..40f6399baab2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9ac4025d8088675a325124b61b592922efa56d22 +refs/heads/master: 43801f6e4ee269cd76f601c2b1d79897ea4a892f diff --git a/trunk/drivers/staging/zram/zram_drv.c b/trunk/drivers/staging/zram/zram_drv.c index d70ec1ad10de..11e7e92ae726 100644 --- a/trunk/drivers/staging/zram/zram_drv.c +++ b/trunk/drivers/staging/zram/zram_drv.c @@ -37,7 +37,7 @@ /* Globals */ static int zram_major; -struct zram *devices; +struct zram *zram_devices; /* Module params (documentation at end) */ unsigned int num_devices; @@ -801,14 +801,14 @@ static int __init zram_init(void) /* Allocate the device array and initialize each one */ pr_info("Creating %u devices ...\n", num_devices); - devices = kzalloc(num_devices * sizeof(struct zram), GFP_KERNEL); - if (!devices) { + zram_devices = kzalloc(num_devices * sizeof(struct zram), GFP_KERNEL); + if (!zram_devices) { ret = -ENOMEM; goto unregister; } for (dev_id = 0; dev_id < num_devices; dev_id++) { - ret = create_device(&devices[dev_id], dev_id); + ret = create_device(&zram_devices[dev_id], dev_id); if (ret) goto free_devices; } @@ -817,8 +817,8 @@ static int __init zram_init(void) free_devices: while (dev_id) - destroy_device(&devices[--dev_id]); - kfree(devices); + destroy_device(&zram_devices[--dev_id]); + kfree(zram_devices); unregister: unregister_blkdev(zram_major, "zram"); out: @@ -831,7 +831,7 @@ static void __exit zram_exit(void) struct zram *zram; for (i = 0; i < num_devices; i++) { - zram = &devices[i]; + zram = &zram_devices[i]; destroy_device(zram); if (zram->init_done) @@ -840,7 +840,7 @@ static void __exit zram_exit(void) unregister_blkdev(zram_major, "zram"); - kfree(devices); + kfree(zram_devices); pr_debug("Cleanup done!\n"); } diff --git a/trunk/drivers/staging/zram/zram_drv.h b/trunk/drivers/staging/zram/zram_drv.h index abe5221c100d..0e4b5409f9f7 100644 --- a/trunk/drivers/staging/zram/zram_drv.h +++ b/trunk/drivers/staging/zram/zram_drv.h @@ -123,7 +123,7 @@ struct zram { struct zram_stats stats; }; -extern struct zram *devices; +extern struct zram *zram_devices; extern unsigned int num_devices; #ifdef CONFIG_SYSFS extern struct attribute_group zram_disk_attr_group; diff --git a/trunk/drivers/staging/zram/zram_sysfs.c b/trunk/drivers/staging/zram/zram_sysfs.c index a70cc010d18d..0f001e89eb51 100644 --- a/trunk/drivers/staging/zram/zram_sysfs.c +++ b/trunk/drivers/staging/zram/zram_sysfs.c @@ -35,7 +35,7 @@ static struct zram *dev_to_zram(struct device *dev) struct zram *zram = NULL; for (i = 0; i < num_devices; i++) { - zram = &devices[i]; + zram = &zram_devices[i]; if (disk_to_dev(zram->disk) == dev) break; }