aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/nodemgr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ieee1394/nodemgr.c')
-rw-r--r--drivers/ieee1394/nodemgr.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
index 61307ca296ae..6558c91674fe 100644
--- a/drivers/ieee1394/nodemgr.c
+++ b/drivers/ieee1394/nodemgr.c
@@ -41,22 +41,6 @@ struct nodemgr_csr_info {
41}; 41};
42 42
43 43
44static char *nodemgr_find_oui_name(int oui)
45{
46#ifdef CONFIG_IEEE1394_OUI_DB
47 extern struct oui_list_struct {
48 int oui;
49 char *name;
50 } oui_list[];
51 int i;
52
53 for (i = 0; oui_list[i].name; i++)
54 if (oui_list[i].oui == oui)
55 return oui_list[i].name;
56#endif
57 return NULL;
58}
59
60/* 44/*
61 * Correct the speed map entry. This is necessary 45 * Correct the speed map entry. This is necessary
62 * - for nodes with link speed < phy speed, 46 * - for nodes with link speed < phy speed,
@@ -473,11 +457,9 @@ fw_attr(ne, struct node_entry, nodeid, unsigned int, "0x%04x\n")
473 457
474fw_attr(ne, struct node_entry, vendor_id, unsigned int, "0x%06x\n") 458fw_attr(ne, struct node_entry, vendor_id, unsigned int, "0x%06x\n")
475fw_attr_td(ne, struct node_entry, vendor_name_kv) 459fw_attr_td(ne, struct node_entry, vendor_name_kv)
476fw_attr(ne, struct node_entry, vendor_oui, const char *, "%s\n")
477 460
478fw_attr(ne, struct node_entry, guid, unsigned long long, "0x%016Lx\n") 461fw_attr(ne, struct node_entry, guid, unsigned long long, "0x%016Lx\n")
479fw_attr(ne, struct node_entry, guid_vendor_id, unsigned int, "0x%06x\n") 462fw_attr(ne, struct node_entry, guid_vendor_id, unsigned int, "0x%06x\n")
480fw_attr(ne, struct node_entry, guid_vendor_oui, const char *, "%s\n")
481fw_attr(ne, struct node_entry, in_limbo, int, "%d\n"); 463fw_attr(ne, struct node_entry, in_limbo, int, "%d\n");
482 464
483static struct device_attribute *const fw_ne_attrs[] = { 465static struct device_attribute *const fw_ne_attrs[] = {
@@ -503,7 +485,6 @@ fw_attr(ud, struct unit_directory, model_id, unsigned int, "0x%06x\n")
503fw_attr(ud, struct unit_directory, specifier_id, unsigned int, "0x%06x\n") 485fw_attr(ud, struct unit_directory, specifier_id, unsigned int, "0x%06x\n")
504fw_attr(ud, struct unit_directory, version, unsigned int, "0x%06x\n") 486fw_attr(ud, struct unit_directory, version, unsigned int, "0x%06x\n")
505fw_attr_td(ud, struct unit_directory, vendor_name_kv) 487fw_attr_td(ud, struct unit_directory, vendor_name_kv)
506fw_attr(ud, struct unit_directory, vendor_oui, const char *, "%s\n")
507fw_attr_td(ud, struct unit_directory, model_name_kv) 488fw_attr_td(ud, struct unit_directory, model_name_kv)
508 489
509static struct device_attribute *const fw_ud_attrs[] = { 490static struct device_attribute *const fw_ud_attrs[] = {
@@ -865,7 +846,6 @@ static struct node_entry *nodemgr_create_node(octlet_t guid, struct csr1212_csr
865 846
866 ne->guid = guid; 847 ne->guid = guid;
867 ne->guid_vendor_id = (guid >> 40) & 0xffffff; 848 ne->guid_vendor_id = (guid >> 40) & 0xffffff;
868 ne->guid_vendor_oui = nodemgr_find_oui_name(ne->guid_vendor_id);
869 ne->csr = csr; 849 ne->csr = csr;
870 850
871 memcpy(&ne->device, &nodemgr_dev_template_ne, 851 memcpy(&ne->device, &nodemgr_dev_template_ne,
@@ -885,9 +865,6 @@ static struct node_entry *nodemgr_create_node(octlet_t guid, struct csr1212_csr
885 goto fail_classdevreg; 865 goto fail_classdevreg;
886 get_device(&ne->device); 866 get_device(&ne->device);
887 867
888 if (ne->guid_vendor_oui &&
889 device_create_file(&ne->device, &dev_attr_ne_guid_vendor_oui))
890 goto fail_addoiu;
891 nodemgr_create_ne_dev_files(ne); 868 nodemgr_create_ne_dev_files(ne);
892 869
893 nodemgr_update_bus_options(ne); 870 nodemgr_update_bus_options(ne);
@@ -898,8 +875,6 @@ static struct node_entry *nodemgr_create_node(octlet_t guid, struct csr1212_csr
898 875
899 return ne; 876 return ne;
900 877
901fail_addoiu:
902 put_device(&ne->device);
903fail_classdevreg: 878fail_classdevreg:
904 device_unregister(&ne->device); 879 device_unregister(&ne->device);
905fail_devreg: 880fail_devreg:
@@ -975,15 +950,10 @@ static void nodemgr_register_device(struct node_entry *ne,
975 goto fail_classdevreg; 950 goto fail_classdevreg;
976 get_device(&ud->device); 951 get_device(&ud->device);
977 952
978 if (ud->vendor_oui &&
979 device_create_file(&ud->device, &dev_attr_ud_vendor_oui))
980 goto fail_addoui;
981 nodemgr_create_ud_dev_files(ud); 953 nodemgr_create_ud_dev_files(ud);
982 954
983 return; 955 return;
984 956
985fail_addoui:
986 put_device(&ud->device);
987fail_classdevreg: 957fail_classdevreg:
988 device_unregister(&ud->device); 958 device_unregister(&ud->device);
989fail_devreg: 959fail_devreg:
@@ -1020,9 +990,6 @@ static struct unit_directory *nodemgr_process_unit_directory
1020 if (kv->key.type == CSR1212_KV_TYPE_IMMEDIATE) { 990 if (kv->key.type == CSR1212_KV_TYPE_IMMEDIATE) {
1021 ud->vendor_id = kv->value.immediate; 991 ud->vendor_id = kv->value.immediate;
1022 ud->flags |= UNIT_DIRECTORY_VENDOR_ID; 992 ud->flags |= UNIT_DIRECTORY_VENDOR_ID;
1023
1024 if (ud->vendor_id)
1025 ud->vendor_oui = nodemgr_find_oui_name(ud->vendor_id);
1026 } 993 }
1027 break; 994 break;
1028 995
@@ -1153,9 +1120,6 @@ static void nodemgr_process_root_directory(struct host_info *hi, struct node_ent
1153 switch (kv->key.id) { 1120 switch (kv->key.id) {
1154 case CSR1212_KV_ID_VENDOR: 1121 case CSR1212_KV_ID_VENDOR:
1155 ne->vendor_id = kv->value.immediate; 1122 ne->vendor_id = kv->value.immediate;
1156
1157 if (ne->vendor_id)
1158 ne->vendor_oui = nodemgr_find_oui_name(ne->vendor_id);
1159 break; 1123 break;
1160 1124
1161 case CSR1212_KV_ID_NODE_CAPABILITIES: 1125 case CSR1212_KV_ID_NODE_CAPABILITIES:
@@ -1183,9 +1147,6 @@ static void nodemgr_process_root_directory(struct host_info *hi, struct node_ent
1183 last_key_id = kv->key.id; 1147 last_key_id = kv->key.id;
1184 } 1148 }
1185 1149
1186 if (ne->vendor_oui &&
1187 device_create_file(&ne->device, &dev_attr_ne_vendor_oui))
1188 goto fail;
1189 if (ne->vendor_name_kv && 1150 if (ne->vendor_name_kv &&
1190 device_create_file(&ne->device, &dev_attr_ne_vendor_name_kv)) 1151 device_create_file(&ne->device, &dev_attr_ne_vendor_name_kv))
1191 goto fail; 1152 goto fail;