Date: Sat, 24 Feb 2018 01:24:58 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329889 - head/sys/amd64/acpica Message-ID: <201802240124.w1O1OwdL001712@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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[] = {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802240124.w1O1OwdL001712>