Lines Matching defs:busid
45 * Find the index of the busid by name.
48 static int get_busid_idx(const char *busid)
56 if (!strncmp(busid_table[i].name, busid, BUSID_SIZE)) {
67 struct bus_id_priv *get_busid_priv(const char *busid)
73 idx = get_busid_idx(busid);
90 static int add_match_busid(char *busid)
97 if (get_busid_idx(busid) >= 0) {
105 strlcpy(busid_table[i].name, busid, BUSID_SIZE);
122 int del_match_busid(char *busid)
128 idx = get_busid_idx(busid);
173 char busid[BUSID_SIZE];
178 /* busid needs to include \0 termination */
179 len = strlcpy(busid, buf + 4, BUSID_SIZE);
180 if (sizeof(busid) <= len)
184 if (add_match_busid(busid) < 0)
187 pr_debug("add busid %s\n", busid);
192 if (del_match_busid(busid) < 0)
195 pr_debug("del busid %s\n", busid);
203 static int do_rebind(char *busid, struct bus_id_priv *busid_priv)
265 /* release the busid lock */