Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 56381
b: refs/heads/master
c: fe6b4c8
h: refs/heads/master
i:
  56379: 4781aea
v: v3
  • Loading branch information
Pierre Ossman committed May 14, 2007
1 parent 52ff186 commit 4047d90
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6ba736a10e4ae63b38ccfee9f22b3263a6e5d050
refs/heads/master: fe6b4c8840c5e23fe9b8696450cee8f2e8cebffd
17 changes: 4 additions & 13 deletions trunk/drivers/mmc/card/block.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
*/
#define MMC_SHIFT 3

static int major;

/*
* There is one mmc_blk_data per slot.
*/
Expand Down Expand Up @@ -466,7 +464,7 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
md->queue.issue_fn = mmc_blk_issue_rq;
md->queue.data = md;

md->disk->major = major;
md->disk->major = MMC_BLOCK_MAJOR;
md->disk->first_minor = devidx << MMC_SHIFT;
md->disk->fops = &mmc_bdops;
md->disk->private_data = md;
Expand Down Expand Up @@ -634,14 +632,9 @@ static int __init mmc_blk_init(void)
{
int res = -ENOMEM;

res = register_blkdev(major, "mmc");
if (res < 0) {
printk(KERN_WARNING "Unable to get major %d for MMC media: %d\n",
major, res);
res = register_blkdev(MMC_BLOCK_MAJOR, "mmc");
if (res)
goto out;
}
if (major == 0)
major = res;

return mmc_register_driver(&mmc_driver);

Expand All @@ -652,7 +645,7 @@ static int __init mmc_blk_init(void)
static void __exit mmc_blk_exit(void)
{
mmc_unregister_driver(&mmc_driver);
unregister_blkdev(major, "mmc");
unregister_blkdev(MMC_BLOCK_MAJOR, "mmc");
}

module_init(mmc_blk_init);
Expand All @@ -661,5 +654,3 @@ module_exit(mmc_blk_exit);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Multimedia Card (MMC) block device driver");

module_param(major, int, 0444);
MODULE_PARM_DESC(major, "specify the major device number for MMC block driver");
2 changes: 2 additions & 0 deletions trunk/include/linux/major.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@
#define USB_ACM_AUX_MAJOR 167
#define USB_CHAR_MAJOR 180

#define MMC_BLOCK_MAJOR 179

#define VXVM_MAJOR 199 /* VERITAS volume i/o driver */
#define VXSPEC_MAJOR 200 /* VERITAS volume config driver */
#define VXDMP_MAJOR 201 /* VERITAS volume multipath driver */
Expand Down

0 comments on commit 4047d90

Please sign in to comment.