#define PREFIX "ACPI: WMI: "
static DEFINE_MUTEX(wmi_data_lock);
+static LIST_HEAD(wmi_block_list);
struct guid_block {
char guid[16];
struct device *dev;
};
-static struct wmi_block wmi_blocks;
/*
* If the GUID data block is marked as expensive, we must enable and
wmi_parse_guid(guid_string, tmp);
wmi_swap_bytes(tmp, guid_input);
- list_for_each(p, &wmi_blocks.list) {
+ list_for_each(p, &wmi_block_list) {
wblock = list_entry(p, struct wmi_block, list);
block = &wblock->gblock;
params[0].type = ACPI_TYPE_INTEGER;
params[0].integer.value = event;
- list_for_each(p, &wmi_blocks.list) {
+ list_for_each(p, &wmi_block_list) {
wblock = list_entry(p, struct wmi_block, list);
gblock = &wblock->gblock;
struct device *guid_dev;
/* Create devices for all the GUIDs */
- list_for_each(p, &wmi_blocks.list) {
+ list_for_each(p, &wmi_block_list) {
wblock = list_entry(p, struct wmi_block, list);
guid_dev = kzalloc(sizeof(struct device), GFP_KERNEL);
struct device *guid_dev;
/* Delete devices for all the GUIDs */
- list_for_each(p, &wmi_blocks.list) {
+ list_for_each(p, &wmi_block_list) {
wblock = list_entry(p, struct wmi_block, list);
guid_dev = wblock->dev;
struct wmi_block *wblock;
struct list_head *p;
- list_for_each(p, &wmi_blocks.list) {
+ list_for_each(p, &wmi_block_list) {
wblock = list_entry(p, struct wmi_block, list);
gblock = &wblock->gblock;
{
struct wmi_block *wblock, *next;
- list_for_each_entry_safe(wblock, next, &wmi_blocks.list, list) {
+ list_for_each_entry_safe(wblock, next, &wmi_block_list, list) {
list_del(&wblock->list);
kfree(wblock);
}
wblock->handler = wmi_notify_debug;
wmi_method_enable(wblock, 1);
}
- list_add_tail(&wblock->list, &wmi_blocks.list);
+ list_add_tail(&wblock->list, &wmi_block_list);
}
out_free_pointer:
struct list_head *p;
char guid_string[37];
- list_for_each(p, &wmi_blocks.list) {
+ list_for_each(p, &wmi_block_list) {
wblock = list_entry(p, struct wmi_block, list);
block = &wblock->gblock;
{
int result;
- INIT_LIST_HEAD(&wmi_blocks.list);
-
if (acpi_disabled)
return -ENODEV;