diff options
author | jkim <jkim@FreeBSD.org> | 2014-11-11 19:42:10 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2014-11-11 19:42:10 +0000 |
commit | c82ae411ef1a8e2b934958483c779fa111d856bc (patch) | |
tree | fe0d5ef14f870f31ff73cffd8c5095bb450ed0ac /sys/dev/acpica/acpi.c | |
parent | 403bbe3478e61b3278821c642872c7c3e938cc8d (diff) | |
download | FreeBSD-src-c82ae411ef1a8e2b934958483c779fa111d856bc.zip FreeBSD-src-c82ae411ef1a8e2b934958483c779fa111d856bc.tar.gz |
Use the correct device. Note this commit complements r274386.
PR: 194884
Diffstat (limited to 'sys/dev/acpica/acpi.c')
-rw-r--r-- | sys/dev/acpica/acpi.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index e7389af..0e8998b 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -694,7 +694,7 @@ acpi_attach(device_t dev) static void acpi_set_power_children(device_t dev, int state) { - device_t child, parent; + device_t child; device_t *devlist; int dstate, i, numdevs; @@ -705,12 +705,11 @@ acpi_set_power_children(device_t dev, int state) * Retrieve and set D-state for the sleep state if _SxD is present. * Skip children who aren't attached since they are handled separately. */ - parent = device_get_parent(dev); for (i = 0; i < numdevs; i++) { child = devlist[i]; dstate = state; if (device_is_attached(child) && - acpi_device_pwr_for_sleep(parent, child, &dstate) == 0) + acpi_device_pwr_for_sleep(dev, child, &dstate) == 0) acpi_set_powerstate(child, dstate); } free(devlist, M_TEMP); |