Lines Matching refs:bus
292 struct platform_node *bus; in add_platform_device() local
303 bus = (platform_node*) calloc(1, sizeof(struct platform_node)); in add_platform_device()
304 bus->path = strdup(path); in add_platform_device()
305 bus->path_len = path_len; in add_platform_device()
306 bus->name = bus->path + (name - path); in add_platform_device()
307 list_add_tail(&platform_names, &bus->list); in add_platform_device()
319 struct platform_node *bus; in find_platform_device() local
322 bus = node_to_item(node, struct platform_node, list); in find_platform_device()
323 if ((bus->path_len < path_len) && in find_platform_device()
324 (path[bus->path_len] == '/') && in find_platform_device()
325 !strncmp(path, bus->path, bus->path_len)) in find_platform_device()
326 return bus; in find_platform_device()
335 struct platform_node *bus; in remove_platform_device() local
338 bus = node_to_item(node, struct platform_node, list); in remove_platform_device()
339 if (!strcmp(path, bus->path)) { in remove_platform_device()
340 LOG(INFO) << "removing platform device " << bus->name; in remove_platform_device()
341 free(bus->path); in remove_platform_device()
343 free(bus); in remove_platform_device()
352 struct platform_node* bus; in destroy_platform_devices() local
356 bus = node_to_item(node, struct platform_node, list); in destroy_platform_devices()
357 free(bus->path); in destroy_platform_devices()
358 free(bus); in destroy_platform_devices()