summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2014-11-11 19:42:10 +0000
committerjkim <jkim@FreeBSD.org>2014-11-11 19:42:10 +0000
commitc82ae411ef1a8e2b934958483c779fa111d856bc (patch)
treefe0d5ef14f870f31ff73cffd8c5095bb450ed0ac /sys/dev/acpica/acpi.c
parent403bbe3478e61b3278821c642872c7c3e938cc8d (diff)
downloadFreeBSD-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.c5
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);
OpenPOWER on IntegriCloud