aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cdrom/cdrom.c3
-rw-r--r--drivers/cdrom/gdrom.c4
-rw-r--r--drivers/cdrom/viocd.c5
-rw-r--r--drivers/ide/ide-cd.c5
4 files changed, 7 insertions, 10 deletions
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index c4213b7d0b20..663a7f7dc580 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -442,7 +442,7 @@ int register_cdrom(struct cdrom_device_info *cdi)
442} 442}
443#undef ENSURE 443#undef ENSURE
444 444
445int unregister_cdrom(struct cdrom_device_info *cdi) 445void unregister_cdrom(struct cdrom_device_info *cdi)
446{ 446{
447 cdinfo(CD_OPEN, "entering unregister_cdrom\n"); 447 cdinfo(CD_OPEN, "entering unregister_cdrom\n");
448 448
@@ -455,7 +455,6 @@ int unregister_cdrom(struct cdrom_device_info *cdi)
455 455
456 cdi->ops->n_minors--; 456 cdi->ops->n_minors--;
457 cdinfo(CD_REG_UNREG, "drive \"/dev/%s\" unregistered\n", cdi->name); 457 cdinfo(CD_REG_UNREG, "drive \"/dev/%s\" unregistered\n", cdi->name);
458 return 0;
459} 458}
460 459
461int cdrom_get_media_event(struct cdrom_device_info *cdi, 460int cdrom_get_media_event(struct cdrom_device_info *cdi,
diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c
index 4e2bbcccc064..71ec426ecffc 100644
--- a/drivers/cdrom/gdrom.c
+++ b/drivers/cdrom/gdrom.c
@@ -827,7 +827,9 @@ static int __devexit remove_gdrom(struct platform_device *devptr)
827 del_gendisk(gd.disk); 827 del_gendisk(gd.disk);
828 if (gdrom_major) 828 if (gdrom_major)
829 unregister_blkdev(gdrom_major, GDROM_DEV_NAME); 829 unregister_blkdev(gdrom_major, GDROM_DEV_NAME);
830 return unregister_cdrom(gd.cd_info); 830 unregister_cdrom(gd.cd_info);
831
832 return 0;
831} 833}
832 834
833static struct platform_driver gdrom_driver = { 835static struct platform_driver gdrom_driver = {
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c
index cac06bc1754b..b74b6c2768a8 100644
--- a/drivers/cdrom/viocd.c
+++ b/drivers/cdrom/viocd.c
@@ -650,10 +650,7 @@ static int viocd_remove(struct vio_dev *vdev)
650{ 650{
651 struct disk_info *d = &viocd_diskinfo[vdev->unit_address]; 651 struct disk_info *d = &viocd_diskinfo[vdev->unit_address];
652 652
653 if (unregister_cdrom(&d->viocd_info) != 0) 653 unregister_cdrom(&d->viocd_info);
654 printk(VIOCD_KERN_WARNING
655 "Cannot unregister viocd CD-ROM %s!\n",
656 d->viocd_info.name);
657 del_gendisk(d->viocd_disk); 654 del_gendisk(d->viocd_disk);
658 blk_cleanup_queue(d->viocd_disk->queue); 655 blk_cleanup_queue(d->viocd_disk->queue);
659 put_disk(d->viocd_disk); 656 put_disk(d->viocd_disk);
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 396000208f81..fe5aefbf8339 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -2032,9 +2032,8 @@ static void ide_cd_release(struct kref *kref)
2032 2032
2033 kfree(info->buffer); 2033 kfree(info->buffer);
2034 kfree(info->toc); 2034 kfree(info->toc);
2035 if (devinfo->handle == drive && unregister_cdrom(devinfo)) 2035 if (devinfo->handle == drive)
2036 printk(KERN_ERR "%s: %s failed to unregister device from the cdrom " 2036 unregister_cdrom(devinfo);
2037 "driver.\n", __FUNCTION__, drive->name);
2038 drive->dsc_overlap = 0; 2037 drive->dsc_overlap = 0;
2039 drive->driver_data = NULL; 2038 drive->driver_data = NULL;
2040 blk_queue_prep_rq(drive->queue, NULL); 2039 blk_queue_prep_rq(drive->queue, NULL);