| @@ -185,7 +185,9 @@ static struct blk_major_name { · 184 unmodified lines |
| 185 | struct blk_major_name *next; | 185 | struct blk_major_name *next; |
| 186 | int major; | 186 | int major; |
| 187 | char name[16]; | 187 | char name[16]; |
| | 188 | #ifdef CONFIG_BLOCK_LEGACY_AUTOLOAD |
| 188 | void (*probe)(dev_t devt); | 189 | void (*probe)(dev_t devt); |
| | 190 | #endif |
| 189 | } *major_names[BLKDEV_MAJOR_HASH_SIZE]; | 191 | } *major_names[BLKDEV_MAJOR_HASH_SIZE]; |
| 190 | static DEFINE_MUTEX(major_names_lock); | 192 | static DEFINE_MUTEX(major_names_lock); |
| 191 | static DEFINE_SPINLOCK(major_names_spinlock); | 193 | static DEFINE_SPINLOCK(major_names_spinlock); |
| @@ -275,7 +277,9 @@ int __register_blkdev(unsigned int major, const char *name, · 83 unmodified lines |
| 275 | } | 277 | } |
| 276 | | 278 | |
| 277 | p->major = major; | 279 | p->major = major; |
| | 280 | #ifdef CONFIG_BLOCK_LEGACY_AUTOLOAD |
| 278 | p->probe = probe; | 281 | p->probe = probe; |
| | 282 | #endif |
| 279 | strlcpy(p->name, name, sizeof(p->name)); | 283 | strlcpy(p->name, name, sizeof(p->name)); |
| 280 | p->next = NULL; | 284 | p->next = NULL; |
| 281 | index = major_to_index(major); | 285 | index = major_to_index(major); |
| @@ -679,6 +683,7 @@ static ssize_t disk_badblocks_store(struct device *dev, · 397 unmodified lines |
| 679 | return badblocks_store(disk->bb, page, len, 0); | 683 | return badblocks_store(disk->bb, page, len, 0); |
| 680 | } | 684 | } |
| 681 | | 685 | |
| | 686 | #ifdef CONFIG_BLOCK_LEGACY_AUTOLOAD |
| 682 | void blk_request_module(dev_t devt) | 687 | void blk_request_module(dev_t devt) |
| 683 | { | 688 | { |
| 684 | unsigned int major = MAJOR(devt); | 689 | unsigned int major = MAJOR(devt); |
| @@ -698,6 +703,7 @@ void blk_request_module(dev_t devt) · 13 unmodified lines |
| 698 | /* Make old-style 2.4 aliases work */ | 703 | /* Make old-style 2.4 aliases work */ |
| 699 | request_module("block-major-%d", MAJOR(devt)); | 704 | request_module("block-major-%d", MAJOR(devt)); |
| 700 | } | 705 | } |
| | 706 | #endif /* CONFIG_BLOCK_LEGACY_AUTOLOAD */ |
| 701 | | 707 | |
| 702 | /* | 708 | /* |
| 703 | * print a full list of all partitions - intended for places where the root | 709 | * print a full list of all partitions - intended for places where the root |