memstick: don't allocate unused major for ms_block
PATCH 29/111 memstick: don't allocate unused major for ms_block
From: NeilBrown <[email protected]>
Subject: memstick: don't allocate unused major for ms_block
When alloc_disk(0) is used the ->major number is completely ignored. All devices are allocated with a major of BLOCK_EXT_MAJOR.
So remove registration and deregistration of 'major'.
Signed-off-by NeilBrown <[email protected]>
Cc Keith Busch <[email protected]>
Cc Jens Axboe <[email protected]>
Cc Maxim Levitsky <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/memstick/core/ms_block.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-)
drivers/memstick/core/ms_block.c renamed from drivers/memstick/core/ms_block.c~memstick-dont-allocate-unused-major-for-ms_block +0 -8
@@ -2338,23 +2338,11 @@ static struct memstick_driver msb_driver .resume = msb_resume }; -static int major; -static int __init msb_init (void ) { -int rc =register_blkdev (0 ,DRIVER_NAME ); - -if (rc <0 ) { -pr_err ("failed to register major (error %d)\n" , rc); -return rc; - }