]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] loop needs MODULE_ALIAS_BLOCK
authorAndrew Morton <akpm@osdl.org>
Tue, 20 Jan 2004 11:11:06 +0000 (03:11 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 20 Jan 2004 11:11:06 +0000 (03:11 -0800)
From: Erik van Konijnenburg <ekonijn@xs4all.nl>

There are two issues here:

- absense of a MODULE_ALIAS_BLOCK in loop.c

- mismatch between the patterns used in the MODULE_ALIAS_BLOCK define and
  the modprobe invokation in request_module.

(acked by Rusty)

drivers/block/loop.c

index 87f8c2527ca8fb92a4c7783a4d8cb719b0ca2d3d..f815c2f9733e8301da368b48cba45fc2147b9093 100644 (file)
@@ -55,6 +55,7 @@
 #include <linux/errno.h>
 #include <linux/major.h>
 #include <linux/wait.h>
+#include <linux/blkdev.h>
 #include <linux/blkpg.h>
 #include <linux/init.h>
 #include <linux/devfs_fs_kernel.h>
@@ -1120,6 +1121,7 @@ static struct block_device_operations lo_fops = {
 MODULE_PARM(max_loop, "i");
 MODULE_PARM_DESC(max_loop, "Maximum number of loop devices (1-256)");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS_BLOCKDEV_MAJOR(LOOP_MAJOR);
 
 int loop_register_transfer(struct loop_func_table *funcs)
 {