md: stop defining MAJOR_NR

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, April 3, 2009 - 11:00 am

Gitweb:     http://git.kernel.org/linus/3dbd8c2e3ff0185585e068f190289d2a267a3e83
Commit:     3dbd8c2e3ff0185585e068f190289d2a267a3e83
Parent:     3f9d99c12a533809342b475c95452e82761bcc1c
Author:     Christoph Hellwig <hch@lst.de>
AuthorDate: Tue Mar 31 14:27:02 2009 +1100
Committer:  NeilBrown <neilb@suse.de>
CommitDate: Tue Mar 31 14:27:02 2009 +1100

    md: stop defining MAJOR_NR
    
    MAJOR_NR was only required for magic in linux/blk.h in 2.4 or earlier
    kernels, so no need to keep it around.
    
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: NeilBrown <neilb@suse.de>
---
 drivers/md/md.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index f30b461..3efc0bc 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -46,8 +46,6 @@
 #include <linux/file.h>
 #include <linux/delay.h>
 
-#define MAJOR_NR MD_MAJOR
-
 /* 63 partitions with the alternate major number (mdp) */
 #define MdpMinorShift 6
 
@@ -6503,13 +6501,13 @@ static void md_geninit(void)
 
 static int __init md_init(void)
 {
-	if (register_blkdev(MAJOR_NR, "md"))
+	if (register_blkdev(MD_MAJOR, "md"))
 		return -1;
 	if ((mdp_major=register_blkdev(0, "mdp"))<=0) {
-		unregister_blkdev(MAJOR_NR, "md");
+		unregister_blkdev(MD_MAJOR, "md");
 		return -1;
 	}
-	blk_register_region(MKDEV(MAJOR_NR, 0), 1UL<<MINORBITS, THIS_MODULE,
+	blk_register_region(MKDEV(MD_MAJOR, 0), 1UL<<MINORBITS, THIS_MODULE,
 			    md_probe, NULL, NULL);
 	blk_register_region(MKDEV(mdp_major, 0), 1UL<<MINORBITS, THIS_MODULE,
 			    md_probe, NULL, NULL);
@@ -6595,10 +6593,10 @@ static __exit void md_exit(void)
 	mddev_t *mddev;
 	struct list_head *tmp;
 
-	blk_unregister_region(MKDEV(MAJOR_NR,0), 1U << MINORBITS);
+	blk_unregister_region(MKDEV(MD_MAJOR,0), 1U << MINORBITS);
 	blk_unregister_region(MKDEV(mdp_major,0), 1U << MINORBITS);
 
-	unregister_blkdev(MAJOR_NR,"md");
+	unregister_blkdev(MD_MAJOR,"md");
 	unregister_blkdev(mdp_major, "mdp");
 	unregister_reboot_notifier(&md_notifier);
 	unregister_sysctl_table(raid_table_header);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
md: stop defining MAJOR_NR, Linux Kernel Mailing ..., (Fri Apr 3, 11:00 am)