diff options
Diffstat (limited to 'drivers/scsi/sr.c')
-rw-r--r-- | drivers/scsi/sr.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index 997f8e30509b..f9c1192dc15e 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c | |||
@@ -60,6 +60,10 @@ | |||
60 | #include "sr.h" | 60 | #include "sr.h" |
61 | 61 | ||
62 | 62 | ||
63 | MODULE_DESCRIPTION("SCSI cdrom (sr) driver"); | ||
64 | MODULE_LICENSE("GPL"); | ||
65 | MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_CDROM_MAJOR); | ||
66 | |||
63 | #define SR_DISKS 256 | 67 | #define SR_DISKS 256 |
64 | 68 | ||
65 | #define MAX_RETRIES 3 | 69 | #define MAX_RETRIES 3 |
@@ -525,10 +529,9 @@ static int sr_probe(struct device *dev) | |||
525 | goto fail; | 529 | goto fail; |
526 | 530 | ||
527 | error = -ENOMEM; | 531 | error = -ENOMEM; |
528 | cd = kmalloc(sizeof(*cd), GFP_KERNEL); | 532 | cd = kzalloc(sizeof(*cd), GFP_KERNEL); |
529 | if (!cd) | 533 | if (!cd) |
530 | goto fail; | 534 | goto fail; |
531 | memset(cd, 0, sizeof(*cd)); | ||
532 | 535 | ||
533 | kref_init(&cd->kref); | 536 | kref_init(&cd->kref); |
534 | 537 | ||
@@ -574,8 +577,6 @@ static int sr_probe(struct device *dev) | |||
574 | get_capabilities(cd); | 577 | get_capabilities(cd); |
575 | sr_vendor_init(cd); | 578 | sr_vendor_init(cd); |
576 | 579 | ||
577 | snprintf(disk->devfs_name, sizeof(disk->devfs_name), | ||
578 | "%s/cd", sdev->devfs_name); | ||
579 | disk->driverfs_dev = &sdev->sdev_gendev; | 580 | disk->driverfs_dev = &sdev->sdev_gendev; |
580 | set_capacity(disk, cd->capacity); | 581 | set_capacity(disk, cd->capacity); |
581 | disk->private_data = &cd->driver; | 582 | disk->private_data = &cd->driver; |