Author: jkim
Date: Sat Feb 24 01:24:57 2018
New Revision: 329889
URL: https://svnweb.freebsd.org/changeset/base/329889

Log:
  Partially revert r197863 to reduce diff against i386.
  
  When I wrote the patch, I wanted to remove SYSINIT() usage from amd64 code.
  There is no reason to keep the divergence any more because iwasaki merged
  most amd64 suspend/resume code to i386 with r235622.  Note this also fixed
  an enge case reported by royger. [1]
  
  Suggested by:         jhb
  Reviewed by:          royger
  Tested by:            royger [1]
  MFC after:            1 week
  Differential Revision:        https://reviews.freebsd.org/D14400 [1]

Modified:
  head/sys/amd64/acpica/acpi_machdep.c

Modified: head/sys/amd64/acpica/acpi_machdep.c
==============================================================================
--- head/sys/amd64/acpica/acpi_machdep.c        Sat Feb 24 01:15:33 2018        
(r329888)
+++ head/sys/amd64/acpica/acpi_machdep.c        Sat Feb 24 01:24:57 2018        
(r329889)
@@ -63,6 +63,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);
@@ -349,20 +350,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[] = {
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to