svn commit: r330526 - stable/11/sys/amd64/acpica

Jung-uk Kim jkim at FreeBSD.org
Mon Mar 5 23:51:30 UTC 2018


Author: jkim
Date: Mon Mar  5 23:51:29 2018
New Revision: 330526
URL: https://svnweb.freebsd.org/changeset/base/330526

Log:
  MFC:	r329889
  
  Partially revert r197863 to reduce diff against i386.

Modified:
  stable/11/sys/amd64/acpica/acpi_machdep.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/amd64/acpica/acpi_machdep.c
==============================================================================
--- stable/11/sys/amd64/acpica/acpi_machdep.c	Mon Mar  5 20:51:23 2018	(r330525)
+++ stable/11/sys/amd64/acpica/acpi_machdep.c	Mon Mar  5 23:51:29 2018	(r330526)
@@ -61,6 +61,7 @@ acpi_machdep_init(device_t dev)
 	sc = device_get_softc(dev);
 
 	acpi_apm_init(sc);
+	acpi_install_wakeup_handler(sc);
 
 	if (intr_model != ACPI_INTR_PIC)
 		acpi_SetIntrModel(intr_model);
@@ -347,20 +348,13 @@ nexus_acpi_probe(device_t dev)
 static int
 nexus_acpi_attach(device_t dev)
 {
-	device_t acpi_dev;
-	int error;
 
 	nexus_init_resources();
 	bus_generic_probe(dev);
-	acpi_dev = BUS_ADD_CHILD(dev, 10, "acpi", 0);
-	if (acpi_dev == NULL)
+	if (BUS_ADD_CHILD(dev, 10, "acpi", 0) == NULL)
 		panic("failed to add acpi0 device");
 
-	error = bus_generic_attach(dev);
-	if (error == 0)
-		acpi_install_wakeup_handler(device_get_softc(acpi_dev));
-
-	return (error);
+	return (bus_generic_attach(dev));
 }
 
 static device_method_t nexus_acpi_methods[] = {


More information about the svn-src-stable mailing list