]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/sr.c
[libata] Move some bmdma-specific code to libata-bmdma.c
[linux-2.6-omap-h63xx.git] / drivers / scsi / sr.c
index 997f8e30509b89bf6e2f5af57a0bdffb689f9a87..f9c1192dc15eca635b7d866486956aa5edecc925 100644 (file)
 #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
@@ -525,10 +529,9 @@ static int sr_probe(struct device *dev)
                goto fail;
 
        error = -ENOMEM;
-       cd = kmalloc(sizeof(*cd), GFP_KERNEL);
+       cd = kzalloc(sizeof(*cd), GFP_KERNEL);
        if (!cd)
                goto fail;
-       memset(cd, 0, sizeof(*cd));
 
        kref_init(&cd->kref);
 
@@ -574,8 +577,6 @@ static int sr_probe(struct device *dev)
        get_capabilities(cd);
        sr_vendor_init(cd);
 
-       snprintf(disk->devfs_name, sizeof(disk->devfs_name),
-                       "%s/cd", sdev->devfs_name);
        disk->driverfs_dev = &sdev->sdev_gendev;
        set_capacity(disk, cd->capacity);
        disk->private_data = &cd->driver;