aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2009-03-30 23:27:02 -0400
committerNeilBrown <neilb@suse.de>2009-03-30 23:27:02 -0400
commit3dbd8c2e3ff0185585e068f190289d2a267a3e83 (patch)
treef49dfbb19fc57e7888a53e763449c36e692367c4 /drivers/md/md.c
parent3f9d99c12a533809342b475c95452e82761bcc1c (diff)
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>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index f30b4618c02c..3efc0bceada2 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -46,8 +46,6 @@
46#include <linux/file.h> 46#include <linux/file.h>
47#include <linux/delay.h> 47#include <linux/delay.h>
48 48
49#define MAJOR_NR MD_MAJOR
50
51/* 63 partitions with the alternate major number (mdp) */ 49/* 63 partitions with the alternate major number (mdp) */
52#define MdpMinorShift 6 50#define MdpMinorShift 6
53 51
@@ -6503,13 +6501,13 @@ static void md_geninit(void)
6503 6501
6504static int __init md_init(void) 6502static int __init md_init(void)
6505{ 6503{
6506 if (register_blkdev(MAJOR_NR, "md")) 6504 if (register_blkdev(MD_MAJOR, "md"))
6507 return -1; 6505 return -1;
6508 if ((mdp_major=register_blkdev(0, "mdp"))<=0) { 6506 if ((mdp_major=register_blkdev(0, "mdp"))<=0) {
6509 unregister_blkdev(MAJOR_NR, "md"); 6507 unregister_blkdev(MD_MAJOR, "md");
6510 return -1; 6508 return -1;
6511 } 6509 }
6512 blk_register_region(MKDEV(MAJOR_NR, 0), 1UL<<MINORBITS, THIS_MODULE, 6510 blk_register_region(MKDEV(MD_MAJOR, 0), 1UL<<MINORBITS, THIS_MODULE,
6513 md_probe, NULL, NULL); 6511 md_probe, NULL, NULL);
6514 blk_register_region(MKDEV(mdp_major, 0), 1UL<<MINORBITS, THIS_MODULE, 6512 blk_register_region(MKDEV(mdp_major, 0), 1UL<<MINORBITS, THIS_MODULE,
6515 md_probe, NULL, NULL); 6513 md_probe, NULL, NULL);
@@ -6595,10 +6593,10 @@ static __exit void md_exit(void)
6595 mddev_t *mddev; 6593 mddev_t *mddev;
6596 struct list_head *tmp; 6594 struct list_head *tmp;
6597 6595
6598 blk_unregister_region(MKDEV(MAJOR_NR,0), 1U << MINORBITS); 6596 blk_unregister_region(MKDEV(MD_MAJOR,0), 1U << MINORBITS);
6599 blk_unregister_region(MKDEV(mdp_major,0), 1U << MINORBITS); 6597 blk_unregister_region(MKDEV(mdp_major,0), 1U << MINORBITS);
6600 6598
6601 unregister_blkdev(MAJOR_NR,"md"); 6599 unregister_blkdev(MD_MAJOR,"md");
6602 unregister_blkdev(mdp_major, "mdp"); 6600 unregister_blkdev(mdp_major, "mdp");
6603 unregister_reboot_notifier(&md_notifier); 6601 unregister_reboot_notifier(&md_notifier);
6604 unregister_sysctl_table(raid_table_header); 6602 unregister_sysctl_table(raid_table_header);