driver core: add devname module aliases to allow module on-demand auto-loading
[safe/jmp/linux-2.6] / fs / btrfs / super.c
index 1866dff..2909a03 100644 (file)
@@ -832,11 +832,14 @@ static const struct file_operations btrfs_ctl_fops = {
 };
 
 static struct miscdevice btrfs_misc = {
-       .minor          = MISC_DYNAMIC_MINOR,
+       .minor          = BTRFS_MINOR,
        .name           = "btrfs-control",
        .fops           = &btrfs_ctl_fops
 };
 
+MODULE_ALIAS_MISCDEV(BTRFS_MINOR);
+MODULE_ALIAS("devname:btrfs-control");
+
 static int btrfs_interface_init(void)
 {
        return misc_register(&btrfs_misc);