Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1628 serge 1
 
2
#include 
3
#include 
4
#include 
5
#include 
6
7
 
8
#include "acpi_bus.h"
9
10
 
11
 
12
13
 
14
 
15
{
16
    struct pci_dev *dev;
17
18
 
19
    if (!dev)
20
        goto out;
21
22
 
23
//    pci_acpi_remove_pm_notifier(device);
24
25
 
26
        goto out;
27
28
 
29
30
 
31
    device->ops.unbind = NULL;
32
33
 
34
//    pci_dev_put(dev);
35
    return 0;
36
}
37
38
 
39
{
40
    ACPI_STATUS status;
41
    ACPI_HANDLE handle;
42
    struct pci_bus *bus;
43
    struct pci_dev *dev;
44
45
 
46
    if (!dev)
47
        return 0;
48
49
 
50
//    if (device->wakeup.flags.run_wake)
51
//        device_set_run_wake(&dev->dev, true);
52
53
 
54
     * Install the 'bind' function to facilitate callbacks for
55
     * children of the P2P bridge.
56
     */
57
    if (dev->subordinate) {
58
        ACPI_DEBUG_PRINT((ACPI_DB_INFO,
59
                  "Device %04x:%02x:%02x.%d is a PCI bridge\n",
60
                  pci_domain_nr(dev->bus), dev->bus->number,
61
                  PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)));
62
        device->ops.bind = acpi_pci_bind;
63
        device->ops.unbind = acpi_pci_unbind;
64
    }
65
66
 
67
     * Evaluate and parse _PRT, if exists.  This code allows parsing of
68
     * _PRT objects within the scope of non-bridge devices.  Note that
69
     * _PRTs within the scope of a PCI bridge assume the bridge's
70
     * subordinate bus number.
71
     *
72
     * TBD: Can _PRTs exist within the scope of non-bridge PCI devices?
73
     */
74
    status = AcpiGetHandle(device->handle, METHOD_NAME__PRT, &handle);
75
    if (ACPI_FAILURE(status))
76
        goto out;
77
78
 
79
        bus = dev->subordinate;
80
    else
81
        bus = dev->bus;
82
83
 
84
85
 
86
//    pci_dev_put(dev);
87
    return 0;
88
}
89
90
 
91
{
92
    device->ops.bind = acpi_pci_bind;
93
    device->ops.unbind = acpi_pci_unbind;
94
95
 
96
}
97