2009-07-14 09:58:49

by Zhao Lei

[permalink] [raw]
Subject: [PATCH] Small cleanup for z2ram.c

We should use Z2MINOR_COUNT as range argument in blk_unregister_region()

Signed-off-by: Zhao Lei <[email protected]>
---
drivers/block/z2ram.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c
index 4575171..b259040 100644
--- a/drivers/block/z2ram.c
+++ b/drivers/block/z2ram.c
@@ -374,7 +374,7 @@ err:
static void __exit z2_exit(void)
{
int i, j;
- blk_unregister_region(MKDEV(Z2RAM_MAJOR, 0), 256);
+ blk_unregister_region(MKDEV(Z2RAM_MAJOR, 0), Z2MINOR_COUNT);
unregister_blkdev(Z2RAM_MAJOR, DEVICE_NAME);
del_gendisk(z2ram_gendisk);
put_disk(z2ram_gendisk);
--
1.5.5.3


2009-07-15 02:38:43

by Tejun Heo

[permalink] [raw]
Subject: Re: [PATCH] Small cleanup for z2ram.c

Zhaolei wrote:
> We should use Z2MINOR_COUNT as range argument in blk_unregister_region()
>
> Signed-off-by: Zhao Lei <[email protected]>

Committed to #tj-block-for-linus (temp branch to collect block layer
patches while Jens is gone).

git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git tj-block-for-linus

Thanks.

--
tejun