From nobody Thu Apr 21 17:30:02 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 62CF61990539; Thu, 21 Apr 2022 17:30:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kkl0p24Cqz4WVj; Thu, 21 Apr 2022 17:30:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650562202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PEjIdPLJVzVNFyQG9Oe40EUdBT/8XYYGa8+6qX67WNM=; b=sUMnusQv8+SjVeWsZVbDnyH+ga4/VslmMSOriHi/e4q3YhqlqpTBeufgyYsdDTb+iScAC2 aNoVbMXDy+L89H36UGfy7BTcB2QdxEYx/vgKKCpF0JEaWxyDwpc5kqUmKcS/r9NPePxmNl 8Jl3EEK6KLV2xkRn/F6BsSSxMn5OGhYOyjkDZ8nLeH5BXNvNMB3LNQfunBy8BC1u9obi+n kRB1z2hnKnsuDX3nZAz5nDtad0aYo3caxXMxU3ptVueTb/ITFyMUQDoYrUDUH22AIvHoMq ShlpgCVOuEoQgLDkL6yG0QnaduxvHnIL7aXmlVzzwDEB+EKK998lxV791SV8zg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 232E84CB8; Thu, 21 Apr 2022 17:30:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23LHU2Gb001465; Thu, 21 Apr 2022 17:30:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23LHU2xL001462; Thu, 21 Apr 2022 17:30:02 GMT (envelope-from git) Date: Thu, 21 Apr 2022 17:30:02 GMT Message-Id: <202204211730.23LHU2xL001462@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 5a03f17a9adb - main - acpi_tz: Lookup devclass by name when needed. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5a03f17a9adb1587ec045c45fabfd70922dee66b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650562202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PEjIdPLJVzVNFyQG9Oe40EUdBT/8XYYGa8+6qX67WNM=; b=ktruf7pOdRBjvNCfhOAzWQJrr6jYQkZDO5ZMS3WQWqBp57qugJDvBRvMKV1vcIUeJgllg/ Slcws3i+nt38gO4gNMYD4dsl1TxAhjxLUiLnyNBMSzET5qtUuV+GmZIcCcrIHlk8GfSP13 zZ04V7An1zZQeZ3h34qEvP1ijMYXNTQFLz2qwVZh5wW/Rlr9zM4qkMXykAo6PqJYepKHtW Un0BYo10VpPLZqB+oX9OlBRZ1TW83pQTKhkQ14d41YZDrhpJxa3xwzJ3HZZ3f2LUmwtnXf m++alj/sTZClVkgzOmnuKIfZdu/+RXvPiCL2jXooJw0hpx/B/zJWyBVyj2jwdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650562202; a=rsa-sha256; cv=none; b=S5KehS4/DmpPI3VI3QgGpAC8NUR62QVFZi3Li5wYGl3l5Zk2ZNbZPaJriOc4BbT4ne/Wnr keUwfYhjoWr0H65wZBdWleAA82VZjlbQxpYpX/RX7wTOdGGaADsV0G1HmZzXkTiOVYdIkI 6AK9wFfL4P6ibAapG7EU33SKgETRZAZpEoKilRldvyqNH8I4WQX7SlLITXHjAu9tFOUpQW 49xo25QNQLuXGkWHVh/ojk2iWHZxUMIliZrTeKjmCyoL23CNnSNPnF0AuoRh1lCxOic95a HMKD1nwG6ezN2/emOSo6x8SC2i5YUb3LSIcetw/9Gf3Q+5T/wK3MmkKPzVx/kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5a03f17a9adb1587ec045c45fabfd70922dee66b commit 5a03f17a9adb1587ec045c45fabfd70922dee66b Author: John Baldwin AuthorDate: 2022-04-21 17:29:13 +0000 Commit: John Baldwin CommitDate: 2022-04-21 17:29:13 +0000 acpi_tz: Lookup devclass by name when needed. Cache the value in a local variable in the worker thread. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D34992 --- sys/dev/acpica/acpi_thermal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/acpica/acpi_thermal.c b/sys/dev/acpica/acpi_thermal.c index 9ff86ae8d827..f6b19f56b862 100644 --- a/sys/dev/acpica/acpi_thermal.c +++ b/sys/dev/acpica/acpi_thermal.c @@ -331,7 +331,7 @@ acpi_tz_startup(void *arg __unused) device_t *devs; int devcount, error, i; - devclass_get_devices(acpi_tz_devclass, &devs, &devcount); + devclass_get_devices(devclass_find("acpi_tz"), &devs, &devcount); if (devcount == 0) { free(devs, M_TEMP); return; @@ -949,6 +949,7 @@ acpi_tz_power_profile(void *arg) static void acpi_tz_thread(void *arg) { + devclass_t acpi_tz_devclass; device_t *devs; int devcount, i; int flags; @@ -956,6 +957,7 @@ acpi_tz_thread(void *arg) ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + acpi_tz_devclass = devclass_find("acpi_tz"); devs = NULL; devcount = 0; sc = NULL;