diff options
| author | James Bottomley <jejb@titanic.(none)> | 2005-05-21 00:27:44 +0400 |
|---|---|---|
| committer | James Bottomley <jejb@titanic.(none)> | 2005-05-21 00:27:44 +0400 |
| commit | ad34ea2cc3845ef4dcd7d12fb0fa8484734bd672 (patch) | |
| tree | ad434400f5ecaa33b433c8f830e40792d8d6c05c /drivers/base | |
| parent | 90356ac3194bf91a441a5f9c3067af386ef62462 (diff) | |
| parent | 88d7bd8cb9eb8d64bf7997600b0d64f7834047c5 (diff) | |
| download | linux-ad34ea2cc3845ef4dcd7d12fb0fa8484734bd672.tar.xz | |
merge by hand - fix up rejections in Documentation/DocBook/Makefile
Diffstat (limited to 'drivers/base')
| -rw-r--r-- | drivers/base/bus.c | 5 | ||||
| -rw-r--r-- | drivers/base/core.c | 2 | ||||
| -rw-r--r-- | drivers/base/platform.c | 4 |
3 files changed, 5 insertions, 6 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index f4fa27315fb4..2b3902c867da 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 a7cedd8cefe5..268a9c8d168b 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) { diff --git a/drivers/base/platform.c b/drivers/base/platform.c index cd6453905a9b..3a5f4c991797 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -115,7 +115,7 @@ int platform_add_devices(struct platform_device **devs, int num) /** * platform_device_register - add a platform-level device - * @dev: platform device we're adding + * @pdev: platform device we're adding * */ int platform_device_register(struct platform_device * pdev) @@ -174,7 +174,7 @@ int platform_device_register(struct platform_device * pdev) /** * platform_device_unregister - remove a platform-level device - * @dev: platform device we're removing + * @pdev: platform device we're removing * * Note that this function will also release all memory- and port-based * resources owned by the device (@dev->resource). |
