Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Mar 2018 23:51:29 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r330526 - stable/11/sys/amd64/acpica
Message-ID:  <201803052351.w25NpT5x080401@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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[] = {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803052351.w25NpT5x080401>