Lines Matching refs:bus
232 struct platform_node *bus; in add_platform_device() local
242 bus = node_to_item(node, struct platform_node, list); in add_platform_device()
243 if ((bus->path_len < path_len) && in add_platform_device()
244 (path[bus->path_len] == '/') && in add_platform_device()
245 !strncmp(path, bus->path, bus->path_len)) in add_platform_device()
252 bus = calloc(1, sizeof(struct platform_node)); in add_platform_device()
253 bus->path = strdup(path); in add_platform_device()
254 bus->path_len = path_len; in add_platform_device()
255 bus->name = bus->path + (name - path); in add_platform_device()
256 list_add_tail(&platform_names, &bus->list); in add_platform_device()
268 struct platform_node *bus; in find_platform_device() local
271 bus = node_to_item(node, struct platform_node, list); in find_platform_device()
272 if ((bus->path_len < path_len) && in find_platform_device()
273 (path[bus->path_len] == '/') && in find_platform_device()
274 !strncmp(path, bus->path, bus->path_len)) in find_platform_device()
275 return bus; in find_platform_device()
284 struct platform_node *bus; in remove_platform_device() local
287 bus = node_to_item(node, struct platform_node, list); in remove_platform_device()
288 if (!strcmp(path, bus->path)) { in remove_platform_device()
289 INFO("removing platform device %s\n", bus->name); in remove_platform_device()
290 free(bus->path); in remove_platform_device()
292 free(bus); in remove_platform_device()