aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/nodemgr.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2007-09-15 08:50:25 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-10-16 17:59:59 -0400
commit17a19b795e9187d65b6e45cb22797725d50f7edb (patch)
tree60db3734335f3956378063c2f8126c036b83bfed /drivers/ieee1394/nodemgr.c
parent638d5bb8167c2c88552257d5af23f7f65ab4defd (diff)
ieee1394: csr1212: proper refcounting
At least since nodemgr got rid of coarse global locking, accesses to struct csr1212_keyval's reference counter should be atomic and coupled with proper barriers. Also, calls to csr1212_keep_keyval(kv) should occur before kv is being used. (We probably should convert refcnt to struct kref, but how to keep csr1212_destroy_keyval's implementation non-recursively then?) Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394/nodemgr.c')
-rw-r--r--drivers/ieee1394/nodemgr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
index ec8edd2f19de..90dc75be3418 100644
--- a/drivers/ieee1394/nodemgr.c
+++ b/drivers/ieee1394/nodemgr.c
@@ -1014,13 +1014,13 @@ static struct unit_directory *nodemgr_process_unit_directory
1014 CSR1212_TEXTUAL_DESCRIPTOR_LEAF_LANGUAGE(kv) == 0) { 1014 CSR1212_TEXTUAL_DESCRIPTOR_LEAF_LANGUAGE(kv) == 0) {
1015 switch (last_key_id) { 1015 switch (last_key_id) {
1016 case CSR1212_KV_ID_VENDOR: 1016 case CSR1212_KV_ID_VENDOR:
1017 ud->vendor_name_kv = kv;
1018 csr1212_keep_keyval(kv); 1017 csr1212_keep_keyval(kv);
1018 ud->vendor_name_kv = kv;
1019 break; 1019 break;
1020 1020
1021 case CSR1212_KV_ID_MODEL: 1021 case CSR1212_KV_ID_MODEL:
1022 ud->model_name_kv = kv;
1023 csr1212_keep_keyval(kv); 1022 csr1212_keep_keyval(kv);
1023 ud->model_name_kv = kv;
1024 break; 1024 break;
1025 1025
1026 } 1026 }