aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_sysfs.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2009-06-18 03:57:18 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-06-21 13:01:27 -0400
commitb391277a56b9eaaff4474339c703e574ed7fab5b (patch)
tree81964fbb0a7582e110a0dc06b4ddfce8508c1bd3 /drivers/scsi/scsi_sysfs.c
parent24add1c4326ce5ca22e7af8b84bb113cd48efac9 (diff)
sd, sr: fix Driver 'sd' needs updating message
If a SCSI ULD driver sets blk_queue_prep_rq(), it should clean it up itself on remove(), and not from the bus callbacks. This removes the need to hook into bus->remove(), which should not be used at the same time as driver->remove(). [jejb: fix sdkp initialisation problem due to mismerge] Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/scsi_sysfs.c')
-rw-r--r--drivers/scsi/scsi_sysfs.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index fa4711d12744..91482f2dcc50 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -420,29 +420,12 @@ static int scsi_bus_resume(struct device * dev)
420 return err; 420 return err;
421} 421}
422 422
423static int scsi_bus_remove(struct device *dev)
424{
425 struct device_driver *drv = dev->driver;
426 struct scsi_device *sdev = to_scsi_device(dev);
427 int err = 0;
428
429 /* reset the prep_fn back to the default since the
430 * driver may have altered it and it's being removed */
431 blk_queue_prep_rq(sdev->request_queue, scsi_prep_fn);
432
433 if (drv && drv->remove)
434 err = drv->remove(dev);
435
436 return 0;
437}
438
439struct bus_type scsi_bus_type = { 423struct bus_type scsi_bus_type = {
440 .name = "scsi", 424 .name = "scsi",
441 .match = scsi_bus_match, 425 .match = scsi_bus_match,
442 .uevent = scsi_bus_uevent, 426 .uevent = scsi_bus_uevent,
443 .suspend = scsi_bus_suspend, 427 .suspend = scsi_bus_suspend,
444 .resume = scsi_bus_resume, 428 .resume = scsi_bus_resume,
445 .remove = scsi_bus_remove,
446}; 429};
447EXPORT_SYMBOL_GPL(scsi_bus_type); 430EXPORT_SYMBOL_GPL(scsi_bus_type);
448 431