From: Rene Herman Date: Wed, 8 Mar 2006 08:14:20 +0000 (-0800) Subject: [SCSI] MODULE_ALIAS_{BLOCK,CHAR}DEV_MAJOR for drivers/scsi X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f018fa552c52642a6b9db2bda90477762e42163f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [SCSI] MODULE_ALIAS_{BLOCK,CHAR}DEV_MAJOR for drivers/scsi Add device-major aliases in drivers/scsi, allowing kmod autoload: MODULE_ALIAS_CHARDEV_MAJOR(SCSI_CHANGER_MAJOR) MODULE_ALIAS_CHARDEV_MAJOR(OSST_MAJOR) MODULE_ALIAS_CHARDEV_MAJOR(SCSI_TAPE_MAJOR) MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_CDROM_MAJOR) MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_DISKN_MAJOR) Signed-off-by: Andrew Morton Acked-by: Kai Makisara Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c index c3f27285db1b..d9abd1645d15 100644 --- a/drivers/scsi/ch.c +++ b/drivers/scsi/ch.c @@ -39,6 +39,7 @@ MODULE_DESCRIPTION("device driver for scsi media changer devices"); MODULE_AUTHOR("Gerd Knorr "); MODULE_LICENSE("GPL"); +MODULE_ALIAS_CHARDEV_MAJOR(SCSI_CHANGER_MAJOR); static int init = 1; module_param(init, int, 0444); diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c index 00f3edc2417f..66ea47a9c53c 100644 --- a/drivers/scsi/osst.c +++ b/drivers/scsi/osst.c @@ -85,6 +85,7 @@ static int max_sg_segs = 0; MODULE_AUTHOR("Willem Riede"); MODULE_DESCRIPTION("OnStream {DI-|FW-|SC-|USB}{30|50} Tape Driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS_CHARDEV_MAJOR(OSST_MAJOR); module_param(max_dev, int, 0444); MODULE_PARM_DESC(max_dev, "Maximum number of OnStream Tape Drives to attach (4)"); diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 31c9685ebc5a..3b01e5d6221c 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -71,6 +71,27 @@ */ #define SD_MAJORS 16 +MODULE_AUTHOR("Eric Youngdale"); +MODULE_DESCRIPTION("SCSI disk (sd) driver"); +MODULE_LICENSE("GPL"); + +MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_DISK0_MAJOR); +MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_DISK1_MAJOR); +MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_DISK2_MAJOR); +MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_DISK3_MAJOR); +MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_DISK4_MAJOR); +MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_DISK5_MAJOR); +MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_DISK6_MAJOR); +MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_DISK7_MAJOR); +MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_DISK8_MAJOR); +MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_DISK9_MAJOR); +MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_DISK10_MAJOR); +MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_DISK11_MAJOR); +MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_DISK12_MAJOR); +MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_DISK13_MAJOR); +MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_DISK14_MAJOR); +MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_DISK15_MAJOR); + /* * This is limited by the naming scheme enforced in sd_probe, * add another character to it if you really need more disks. @@ -1713,9 +1734,5 @@ static void __exit exit_sd(void) unregister_blkdev(sd_major(i), "sd"); } -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Eric Youngdale"); -MODULE_DESCRIPTION("SCSI disk (sd) driver"); - module_init(init_sd); module_exit(exit_sd); diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 06fc8ed720fc..af3fea59a456 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -1569,6 +1569,7 @@ MODULE_AUTHOR("Douglas Gilbert"); MODULE_DESCRIPTION("SCSI generic (sg) driver"); MODULE_LICENSE("GPL"); MODULE_VERSION(SG_VERSION_STR); +MODULE_ALIAS_CHARDEV_MAJOR(SCSI_GENERIC_MAJOR); MODULE_PARM_DESC(def_reserved_size, "size of buffer reserved for each fd"); MODULE_PARM_DESC(allow_dio, "allow direct I/O (default: 0 (disallow))"); @@ -2966,4 +2967,3 @@ static int sg_proc_seq_show_debug(struct seq_file *s, void *v) module_init(init_sg); module_exit(exit_sg); -MODULE_ALIAS_CHARDEV_MAJOR(SCSI_GENERIC_MAJOR); diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index 328837b7ccb9..f9c1192dc15e 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c @@ -60,6 +60,10 @@ #include "sr.h" +MODULE_DESCRIPTION("SCSI cdrom (sr) driver"); +MODULE_LICENSE("GPL"); +MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_CDROM_MAJOR); + #define SR_DISKS 256 #define MAX_RETRIES 3 diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 31c6eefba9d6..d40e7c871c36 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -86,8 +86,9 @@ static int st_nr_dev; static struct class *st_sysfs_class; MODULE_AUTHOR("Kai Makisara"); -MODULE_DESCRIPTION("SCSI Tape Driver"); +MODULE_DESCRIPTION("SCSI tape (st) driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS_CHARDEV_MAJOR(SCSI_TAPE_MAJOR); /* Set 'perm' (4th argument) to 0 to disable module_param's definition * of sysfs parameters (which module_param doesn't yet support).