summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2005-05-05 22:39:49 +0100
committerAnton Altaparmakov <aia21@cantab.net>2005-05-05 22:39:49 +0100
commit450cbfbbbd88876e3ccec1d277f613221ca82bb7 (patch)
treeaf0f1b4c706ba7e725cd4e877a8b7ecf021d76c2 /drivers/base
parentd53ee3222459f347cb18985a845864bc81a44eaf (diff)
parentbfd4bda097f8758d28e632ff2035e25577f6b060 (diff)
downloadop-kernel-dev-450cbfbbbd88876e3ccec1d277f613221ca82bb7.zip
op-kernel-dev-450cbfbbbd88876e3ccec1d277f613221ca82bb7.tar.gz
Merge with /usr/src/ntfs-2.6.git
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/bus.c5
-rw-r--r--drivers/base/core.c2
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index f4fa273..2b3902c 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -405,9 +405,8 @@ void device_release_driver(struct device * dev)
static void driver_detach(struct device_driver * drv)
{
- struct list_head * entry, * next;
- list_for_each_safe(entry, next, &drv->devices) {
- struct device * dev = container_of(entry, struct device, driver_list);
+ while (!list_empty(&drv->devices)) {
+ struct device * dev = container_of(drv->devices.next, struct device, driver_list);
device_release_driver(dev);
}
}
diff --git a/drivers/base/core.c b/drivers/base/core.c
index a7cedd8..268a9c8 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -139,7 +139,7 @@ static int dev_hotplug(struct kset *kset, struct kobject *kobj, char **envp,
buffer = &buffer[length];
buffer_size -= length;
- if (dev->bus->hotplug) {
+ if (dev->bus && dev->bus->hotplug) {
/* have the bus specific function add its stuff */
retval = dev->bus->hotplug (dev, envp, num_envp, buffer, buffer_size);
if (retval) {
OpenPOWER on IntegriCloud