aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/bus.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-22 13:47:24 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-22 13:47:24 -0500
commit2152f8536668a957ea3214735b4761e7b22ef7d8 (patch)
tree56723fc51445b1bc930c6400d4c00fd6fc831f88 /drivers/base/bus.c
parent7cae7e26f245151b9ccad868bf2edf8c8048d307 (diff)
parent30afc84cf7325e88fb9746340eba3c161080ff49 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (138 commits) [SCSI] libata: implement minimal transport template for ->eh_timed_out [SCSI] eliminate rphy allocation in favour of expander/end device allocation [SCSI] convert mptsas over to end_device/expander allocations [SCSI] allow displaying and setting of cache type via sysfs [SCSI] add scsi_mode_select to scsi_lib.c [SCSI] 3ware 9000 add big endian support [SCSI] qla2xxx: update MAINTAINERS [SCSI] scsi: move target_destroy call [SCSI] fusion - bump version [SCSI] fusion - expander hotplug suport in mptsas module [SCSI] fusion - exposing raid components in mptsas [SCSI] fusion - memory leak, and initializing fields [SCSI] fusion - exclosure misspelled [SCSI] fusion - cleanup mptsas event handling functions [SCSI] fusion - removing target_id/bus_id from the VirtDevice structure [SCSI] fusion - static fix's [SCSI] fusion - move some debug firmware event debug msgs to verbose level [SCSI] fusion - loginfo header update [SCSI] add scsi_reprobe_device [SCSI] megaraid_sas: fix extended timeout handling ...
Diffstat (limited to 'drivers/base/bus.c')
-rw-r--r--drivers/base/bus.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index c3141565d59d..48718b7f4fa0 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -536,6 +536,28 @@ void bus_rescan_devices(struct bus_type * bus)
536 bus_for_each_dev(bus, NULL, NULL, bus_rescan_devices_helper); 536 bus_for_each_dev(bus, NULL, NULL, bus_rescan_devices_helper);
537} 537}
538 538
539/**
540 * device_reprobe - remove driver for a device and probe for a new driver
541 * @dev: the device to reprobe
542 *
543 * This function detaches the attached driver (if any) for the given
544 * device and restarts the driver probing process. It is intended
545 * to use if probing criteria changed during a devices lifetime and
546 * driver attachment should change accordingly.
547 */
548void device_reprobe(struct device *dev)
549{
550 if (dev->driver) {
551 if (dev->parent) /* Needed for USB */
552 down(&dev->parent->sem);
553 device_release_driver(dev);
554 if (dev->parent)
555 up(&dev->parent->sem);
556 }
557
558 bus_rescan_devices_helper(dev, NULL);
559}
560EXPORT_SYMBOL_GPL(device_reprobe);
539 561
540struct bus_type * get_bus(struct bus_type * bus) 562struct bus_type * get_bus(struct bus_type * bus)
541{ 563{