aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2009-06-16 16:07:32 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-06-18 03:56:20 -0400
commitddeb9c3e949751992628628d000915a317df52c4 (patch)
tree34f9a6fcf0e0abbe51644ca74932a35fc1fcfbd7 /drivers/block
parent1d89b30cc9be41af87881682ec82e2c107849dbe (diff)
hd: stop defining MAJOR_NR
Just use HD_MAJOR directly. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/hd.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/block/hd.c b/drivers/block/hd.c
index f65b3f369eb0..f9d01608cbe2 100644
--- a/drivers/block/hd.c
+++ b/drivers/block/hd.c
@@ -100,8 +100,6 @@ static DEFINE_SPINLOCK(hd_lock);
100static struct request_queue *hd_queue; 100static struct request_queue *hd_queue;
101static struct request *hd_req; 101static struct request *hd_req;
102 102
103#define MAJOR_NR HD_MAJOR
104
105#define TIMEOUT_VALUE (6*HZ) 103#define TIMEOUT_VALUE (6*HZ)
106#define HD_DELAY 0 104#define HD_DELAY 0
107 105
@@ -712,12 +710,12 @@ static int __init hd_init(void)
712{ 710{
713 int drive; 711 int drive;
714 712
715 if (register_blkdev(MAJOR_NR, "hd")) 713 if (register_blkdev(HD_MAJOR, "hd"))
716 return -1; 714 return -1;
717 715
718 hd_queue = blk_init_queue(do_hd_request, &hd_lock); 716 hd_queue = blk_init_queue(do_hd_request, &hd_lock);
719 if (!hd_queue) { 717 if (!hd_queue) {
720 unregister_blkdev(MAJOR_NR, "hd"); 718 unregister_blkdev(HD_MAJOR, "hd");
721 return -ENOMEM; 719 return -ENOMEM;
722 } 720 }
723 721
@@ -751,7 +749,7 @@ static int __init hd_init(void)
751 struct hd_i_struct *p = &hd_info[drive]; 749 struct hd_i_struct *p = &hd_info[drive];
752 if (!disk) 750 if (!disk)
753 goto Enomem; 751 goto Enomem;
754 disk->major = MAJOR_NR; 752 disk->major = HD_MAJOR;
755 disk->first_minor = drive << 6; 753 disk->first_minor = drive << 6;
756 disk->fops = &hd_fops; 754 disk->fops = &hd_fops;
757 sprintf(disk->disk_name, "hd%c", 'a'+drive); 755 sprintf(disk->disk_name, "hd%c", 'a'+drive);
@@ -795,7 +793,7 @@ out1:
795 NR_HD = 0; 793 NR_HD = 0;
796out: 794out:
797 del_timer(&device_timer); 795 del_timer(&device_timer);
798 unregister_blkdev(MAJOR_NR, "hd"); 796 unregister_blkdev(HD_MAJOR, "hd");
799 blk_cleanup_queue(hd_queue); 797 blk_cleanup_queue(hd_queue);
800 return -1; 798 return -1;
801Enomem: 799Enomem: