summaryrefslogtreecommitdiff
path: root/drivers/w1
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-08-28 09:56:11 +0400
committerPaul Mackerras <paulus@samba.org>2007-08-28 09:56:11 +0400
commit35438c4327df18dbf5e7f597b69299119f4a14de (patch)
treea4589d731015db93f2eba8f84ffb1f48a8084020 /drivers/w1
parent2f6c9d961081dc7b109eb19166244bcb2a5dfc28 (diff)
parentb07d68b5ca4d55a16fab223d63d5fb36f89ff42f (diff)
downloadlinux-35438c4327df18dbf5e7f597b69299119f4a14de.tar.xz
Merge branch 'linux-2.6' into for-2.6.24
Diffstat (limited to 'drivers/w1')
-rw-r--r--drivers/w1/w1_int.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c
index 2fbd8dd16df5..6840dfebe4d4 100644
--- a/drivers/w1/w1_int.c
+++ b/drivers/w1/w1_int.c
@@ -170,22 +170,24 @@ void __w1_remove_master_device(struct w1_master *dev)
void w1_remove_master_device(struct w1_bus_master *bm)
{
- struct w1_master *dev = NULL;
+ struct w1_master *dev, *found = NULL;
list_for_each_entry(dev, &w1_masters, w1_master_entry) {
if (!dev->initialized)
continue;
- if (dev->bus_master->data == bm->data)
+ if (dev->bus_master->data == bm->data) {
+ found = dev;
break;
+ }
}
- if (!dev) {
+ if (!found) {
printk(KERN_ERR "Device doesn't exist.\n");
return;
}
- __w1_remove_master_device(dev);
+ __w1_remove_master_device(found);
}
EXPORT_SYMBOL(w1_add_master_device);