Lines Matching refs:driver_data
97 static struct ipmi_driver_data driver_data = { variable
98 .ipmi_devices = LIST_HEAD_INIT(driver_data.ipmi_devices),
107 .ipmi_lock = __MUTEX_INITIALIZER(driver_data.ipmi_lock)
129 err = ipmi_create_user(iface, &driver_data.ipmi_hndlrs, in ipmi_dev_alloc()
159 if (driver_data.selected_smi == ipmi_device) in __ipmi_dev_kill()
160 driver_data.selected_smi = NULL; in __ipmi_dev_kill()
173 mutex_lock(&driver_data.ipmi_lock); in acpi_ipmi_dev_get()
174 if (driver_data.selected_smi) { in acpi_ipmi_dev_get()
175 ipmi_device = driver_data.selected_smi; in acpi_ipmi_dev_get()
178 mutex_unlock(&driver_data.ipmi_lock); in acpi_ipmi_dev_get()
457 mutex_lock(&driver_data.ipmi_lock); in ipmi_register_bmc()
458 list_for_each_entry(temp, &driver_data.ipmi_devices, head) { in ipmi_register_bmc()
466 if (!driver_data.selected_smi) in ipmi_register_bmc()
467 driver_data.selected_smi = ipmi_device; in ipmi_register_bmc()
468 list_add_tail(&ipmi_device->head, &driver_data.ipmi_devices); in ipmi_register_bmc()
469 mutex_unlock(&driver_data.ipmi_lock); in ipmi_register_bmc()
475 mutex_unlock(&driver_data.ipmi_lock); in ipmi_register_bmc()
485 mutex_lock(&driver_data.ipmi_lock); in ipmi_bmc_gone()
487 &driver_data.ipmi_devices, head) { in ipmi_bmc_gone()
494 if (!driver_data.selected_smi) in ipmi_bmc_gone()
495 driver_data.selected_smi = list_first_entry_or_null( in ipmi_bmc_gone()
496 &driver_data.ipmi_devices, in ipmi_bmc_gone()
498 mutex_unlock(&driver_data.ipmi_lock); in ipmi_bmc_gone()
549 mutex_lock(&driver_data.ipmi_lock); in acpi_ipmi_space_handler()
552 mutex_unlock(&driver_data.ipmi_lock); in acpi_ipmi_space_handler()
559 mutex_unlock(&driver_data.ipmi_lock); in acpi_ipmi_space_handler()
598 result = ipmi_smi_watcher_register(&driver_data.bmc_events); in acpi_ipmi_init()
616 ipmi_smi_watcher_unregister(&driver_data.bmc_events); in acpi_ipmi_exit()
624 mutex_lock(&driver_data.ipmi_lock); in acpi_ipmi_exit()
625 while (!list_empty(&driver_data.ipmi_devices)) { in acpi_ipmi_exit()
626 ipmi_device = list_first_entry(&driver_data.ipmi_devices, in acpi_ipmi_exit()
630 mutex_unlock(&driver_data.ipmi_lock); in acpi_ipmi_exit()
635 mutex_lock(&driver_data.ipmi_lock); in acpi_ipmi_exit()
637 mutex_unlock(&driver_data.ipmi_lock); in acpi_ipmi_exit()