Lines 691-697
Link Here
|
691 |
static void |
691 |
static void |
692 |
acpi_set_power_children(device_t dev, int state) |
692 |
acpi_set_power_children(device_t dev, int state) |
693 |
{ |
693 |
{ |
694 |
device_t child, parent; |
694 |
device_t child; |
695 |
device_t *devlist; |
695 |
device_t *devlist; |
696 |
struct pci_devinfo *dinfo; |
696 |
struct pci_devinfo *dinfo; |
697 |
int dstate, i, numdevs; |
697 |
int dstate, i, numdevs; |
Lines 703-715
Link Here
|
703 |
* Retrieve and set D-state for the sleep state if _SxD is present. |
703 |
* Retrieve and set D-state for the sleep state if _SxD is present. |
704 |
* Skip children who aren't attached since they are handled separately. |
704 |
* Skip children who aren't attached since they are handled separately. |
705 |
*/ |
705 |
*/ |
706 |
parent = device_get_parent(dev); |
|
|
707 |
for (i = 0; i < numdevs; i++) { |
706 |
for (i = 0; i < numdevs; i++) { |
708 |
child = devlist[i]; |
707 |
child = devlist[i]; |
709 |
dinfo = device_get_ivars(child); |
708 |
dinfo = device_get_ivars(child); |
710 |
dstate = state; |
709 |
dstate = state; |
711 |
if (device_is_attached(child) && |
710 |
if (device_is_attached(child) && |
712 |
acpi_device_pwr_for_sleep(parent, dev, &dstate) == 0) |
711 |
acpi_device_pwr_for_sleep(dev, child, &dstate) == 0) |
713 |
acpi_set_powerstate(child, dstate); |
712 |
acpi_set_powerstate(child, dstate); |
714 |
} |
713 |
} |
715 |
free(devlist, M_TEMP); |
714 |
free(devlist, M_TEMP); |