Lines Matching refs:busid_table

25 static struct bus_id_priv busid_table[MAX_BUSID];  variable
36 memset(busid_table, 0, sizeof(busid_table)); in init_busid_table()
41 spin_lock_init(&busid_table[i].busid_lock); in init_busid_table()
54 spin_lock(&busid_table[i].busid_lock); in get_busid_idx()
55 if (busid_table[i].name[0]) in get_busid_idx()
56 if (!strncmp(busid_table[i].name, busid, BUSID_SIZE)) { in get_busid_idx()
58 spin_unlock(&busid_table[i].busid_lock); in get_busid_idx()
61 spin_unlock(&busid_table[i].busid_lock); in get_busid_idx()
75 bid = &(busid_table[idx]); in get_busid_priv()
103 spin_lock(&busid_table[i].busid_lock); in add_match_busid()
104 if (!busid_table[i].name[0]) { in add_match_busid()
105 strlcpy(busid_table[i].name, busid, BUSID_SIZE); in add_match_busid()
106 if ((busid_table[i].status != STUB_BUSID_ALLOC) && in add_match_busid()
107 (busid_table[i].status != STUB_BUSID_REMOV)) in add_match_busid()
108 busid_table[i].status = STUB_BUSID_ADDED; in add_match_busid()
110 spin_unlock(&busid_table[i].busid_lock); in add_match_busid()
113 spin_unlock(&busid_table[i].busid_lock); in add_match_busid()
135 spin_lock(&busid_table[idx].busid_lock); in del_match_busid()
137 if (busid_table[idx].status == STUB_BUSID_OTHER) in del_match_busid()
138 memset(busid_table[idx].name, 0, BUSID_SIZE); in del_match_busid()
140 if ((busid_table[idx].status != STUB_BUSID_OTHER) && in del_match_busid()
141 (busid_table[idx].status != STUB_BUSID_ADDED)) in del_match_busid()
142 busid_table[idx].status = STUB_BUSID_REMOV; in del_match_busid()
144 spin_unlock(&busid_table[idx].busid_lock); in del_match_busid()
158 spin_lock(&busid_table[i].busid_lock); in match_busid_show()
159 if (busid_table[i].name[0]) in match_busid_show()
160 out += sprintf(out, "%s ", busid_table[i].name); in match_busid_show()
161 spin_unlock(&busid_table[i].busid_lock); in match_busid_show()
227 if (busid_table[i].name[0] && in stub_device_rebind()
228 busid_table[i].shutdown_busid) { in stub_device_rebind()
229 busid_priv = &(busid_table[i]); in stub_device_rebind()
237 if (busid_table[i].name[0] && in stub_device_rebind()
238 busid_table[i].shutdown_busid) { in stub_device_rebind()
239 busid_priv = &(busid_table[i]); in stub_device_rebind()
240 do_rebind(busid_table[i].name, busid_priv); in stub_device_rebind()