Lines Matching refs:acpi_dev

218 int acpi_bind_one(struct device *dev, struct acpi_device *acpi_dev)  in acpi_bind_one()  argument
227 if (acpi_dev) { in acpi_bind_one()
231 acpi_dev = ACPI_COMPANION(dev); in acpi_bind_one()
234 if (!acpi_dev) in acpi_bind_one()
237 acpi_dev_get(acpi_dev); in acpi_bind_one()
245 mutex_lock(&acpi_dev->physical_node_lock); in acpi_bind_one()
251 physnode_list = &acpi_dev->physical_node_list; in acpi_bind_one()
253 list_for_each_entry(pn, &acpi_dev->physical_node_list, node) { in acpi_bind_one()
256 mutex_unlock(&acpi_dev->physical_node_lock); in acpi_bind_one()
260 if (ACPI_COMPANION(dev) != acpi_dev) in acpi_bind_one()
264 acpi_dev_put(acpi_dev); in acpi_bind_one()
276 acpi_dev->physical_node_count++; in acpi_bind_one()
279 ACPI_COMPANION_SET(dev, acpi_dev); in acpi_bind_one()
282 retval = sysfs_create_link(&acpi_dev->dev.kobj, &dev->kobj, in acpi_bind_one()
285 dev_err(&acpi_dev->dev, "Failed to create link %s (%d)\n", in acpi_bind_one()
288 retval = sysfs_create_link(&dev->kobj, &acpi_dev->dev.kobj, in acpi_bind_one()
294 mutex_unlock(&acpi_dev->physical_node_lock); in acpi_bind_one()
296 if (acpi_dev->wakeup.flags.valid) in acpi_bind_one()
304 acpi_dev_put(acpi_dev); in acpi_bind_one()
311 struct acpi_device *acpi_dev = ACPI_COMPANION(dev); in acpi_unbind_one() local
314 if (!acpi_dev) in acpi_unbind_one()
317 mutex_lock(&acpi_dev->physical_node_lock); in acpi_unbind_one()
319 list_for_each_entry(entry, &acpi_dev->physical_node_list, node) in acpi_unbind_one()
324 acpi_dev->physical_node_count--; in acpi_unbind_one()
327 sysfs_remove_link(&acpi_dev->dev.kobj, physnode_name); in acpi_unbind_one()
332 acpi_dev_put(acpi_dev); in acpi_unbind_one()
337 mutex_unlock(&acpi_dev->physical_node_lock); in acpi_unbind_one()