Lines Matching refs:acpi_device_bus_id
459 struct acpi_device_bus_id *acpi_device_bus_id; in acpi_device_del() local
463 list_for_each_entry(acpi_device_bus_id, &acpi_bus_id_list, node) in acpi_device_del()
464 if (!strcmp(acpi_device_bus_id->bus_id, in acpi_device_del()
466 ida_free(&acpi_device_bus_id->instance_ida, in acpi_device_del()
468 if (ida_is_empty(&acpi_device_bus_id->instance_ida)) { in acpi_device_del()
469 list_del(&acpi_device_bus_id->node); in acpi_device_del()
470 kfree_const(acpi_device_bus_id->bus_id); in acpi_device_del()
471 kfree(acpi_device_bus_id); in acpi_device_del()
613 static struct acpi_device_bus_id *acpi_device_bus_id_match(const char *dev_id) in acpi_device_bus_id_match()
615 struct acpi_device_bus_id *acpi_device_bus_id; in acpi_device_bus_id_match() local
618 list_for_each_entry(acpi_device_bus_id, &acpi_bus_id_list, node) { in acpi_device_bus_id_match()
619 if (!strcmp(acpi_device_bus_id->bus_id, dev_id)) in acpi_device_bus_id_match()
620 return acpi_device_bus_id; in acpi_device_bus_id_match()
626 struct acpi_device_bus_id *acpi_device_bus_id) in acpi_device_set_name() argument
628 struct ida *instance_ida = &acpi_device_bus_id->instance_ida; in acpi_device_set_name()
636 dev_set_name(&device->dev, "%s:%02x", acpi_device_bus_id->bus_id, result); in acpi_device_set_name()
672 struct acpi_device_bus_id *acpi_device_bus_id; in acpi_device_add() local
687 acpi_device_bus_id = acpi_device_bus_id_match(acpi_device_hid(device)); in acpi_device_add()
688 if (acpi_device_bus_id) { in acpi_device_add()
689 result = acpi_device_set_name(device, acpi_device_bus_id); in acpi_device_add()
693 acpi_device_bus_id = kzalloc(sizeof(*acpi_device_bus_id), in acpi_device_add()
695 if (!acpi_device_bus_id) { in acpi_device_add()
699 acpi_device_bus_id->bus_id = in acpi_device_add()
701 if (!acpi_device_bus_id->bus_id) { in acpi_device_add()
702 kfree(acpi_device_bus_id); in acpi_device_add()
707 ida_init(&acpi_device_bus_id->instance_ida); in acpi_device_add()
709 result = acpi_device_set_name(device, acpi_device_bus_id); in acpi_device_add()
711 kfree_const(acpi_device_bus_id->bus_id); in acpi_device_add()
712 kfree(acpi_device_bus_id); in acpi_device_add()
716 list_add_tail(&acpi_device_bus_id->node, &acpi_bus_id_list); in acpi_device_add()