Subversion Repositories Kolibri OS

Rev

Rev 1628 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1628 Rev 1867
Line 22... Line 22...
22
 
22
 
Line 23... Line 23...
23
extern struct acpi_device *acpi_root;
23
extern struct acpi_device *acpi_root;
Line 24... Line 24...
24
 
24
 
25
static LIST_HEAD(acpi_device_list);
25
extern struct list_head acpi_device_list;
-
 
26
extern struct list_head acpi_bus_id_list;
26
static LIST_HEAD(acpi_bus_id_list);
27
 
Line 27... Line 28...
27
DEFINE_MUTEX(acpi_device_lock);
28
DEFINE_MUTEX(acpi_device_lock);
28
 
29
 
Line 582... Line 583...
582
    int result;
583
    int result;
583
    struct acpi_device *device;
584
    struct acpi_device *device;
584
    ACPI_BUFFER buffer = { ACPI_ALLOCATE_BUFFER, NULL };
585
    ACPI_BUFFER buffer = { ACPI_ALLOCATE_BUFFER, NULL };
585
 
586
    ACPI_DEVICE_INFO *info = NULL;
586
    device = kzalloc(sizeof(struct acpi_device), GFP_KERNEL);
587
    ACPI_DEVICE_ID_LIST *cid_list;
-
 
588
    int i;
-
 
589
 
-
 
590
 
-
 
591
    device = kzalloc(sizeof(struct acpi_device), GFP_KERNEL);
Line 587... Line 592...
587
    if (!device) {
592
    if (!device) {
588
		printk(KERN_ERR PREFIX "Memory allocation error\n");
593
		printk(KERN_ERR PREFIX "Memory allocation error\n");
589
        return -ENOMEM;
594
        return -ENOMEM;
590
    }
595
    }
Line 630... Line 635...
630
    }
635
    }
631
 
636
 
632
end:
637
end:
Line 633... Line 638...
633
    if (!result) {
638
 
634
        AcpiGetName(handle, ACPI_FULL_PATHNAME, &buffer);
-
 
-
 
639
    AcpiGetName(handle, ACPI_FULL_PATHNAME, &buffer);
635
        dbgprintf(PREFIX "Adding [%s]\n", (char *)buffer.Pointer);
640
    dbgprintf(PREFIX "Adding [%s]", (char *)buffer.Pointer);
636
        kfree(buffer.Pointer);
641
    kfree(buffer.Pointer);
637
        *child = device;
642
 
-
 
643
    AcpiGetObjectInfo(handle, &info);
-
 
644
    if (info->Valid & ACPI_VALID_HID)
-
 
645
      dbgprintf (" HID: %s", info->HardwareId.String);
-
 
646
 
-
 
647
    if (info->Valid & ACPI_VALID_CID)
-
 
648
    {
-
 
649
        cid_list = &info->CompatibleIdList;
-
 
650
        for (i = 0; i < cid_list->Count; i++)
-
 
651
            dbgprintf("  CID: %s\n", cid_list->Ids[i].String);
-
 
652
    }
-
 
653
    dbgprintf("\n");
-
 
654
 
-
 
655
    kfree(info);
-
 
656
 
-
 
657
    if (!result) {
-
 
658
        *child = device;
638
    };
659
    };
639
    return result;
660
    return result;
640
}
661
}
641
 
662