From nobody Thu Apr 21 17:30:06 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 BAB0F19907C1; Thu, 21 Apr 2022 17:30:06 +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 4Kkl0t4cR0z4Wjp; Thu, 21 Apr 2022 17:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650562206; 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=ZYmLekWejunER3zahL8MfFAvIhtD/c00e/80PqySuFg=; b=GvmaXR/GrEPA93K2P1tO7F5InDUVkW2x2GKHvtG2ZdQ67uoLRicXG/eT8MWVKd2vKpV1RD iEO4YQbmLxrYTAF5zkvDoSqn6vvv4i+WV9lPq9v11LV7Rdj9m2Tt6+k6uSgHaAVLcy0CjP dhuNmiL7Tt6nA+XYZmw/p6mEmJXTGrnt6WcJr+GbxaqhwEyoat6+QToLildyh2/Evzn8We jO5mgznklpSYhvNDVYNnxDJw+CDNaWnq0vAb05VfzkFTB3Cm6kD/464fWfy72GUjSHYYN/ rJdjoqC0djayHfKimvt0OKotAIEKxJcf4r1XxA22iIPFh6v0TeEUuNXx0EhnRw== 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 7DC304CB9; Thu, 21 Apr 2022 17:30:06 +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 23LHU6tT002334; Thu, 21 Apr 2022 17:30:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23LHU6ma002331; Thu, 21 Apr 2022 17:30:06 GMT (envelope-from git) Date: Thu, 21 Apr 2022 17:30:06 GMT Message-Id: <202204211730.23LHU6ma002331@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: 489e8f24a57f - main - smbios/vpd: Use devclass_find to lookup devclass in module event handler. 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: 489e8f24a57f76439fce5021d4945328fc868ad2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650562206; 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=ZYmLekWejunER3zahL8MfFAvIhtD/c00e/80PqySuFg=; b=t/puSynq2/DsTMjpxGU6shKNfQLh+sF8kbGLOCyYRuXoxSOBpPeU2LBhRv8u+iJhAMn8pJ 0AwERBmjo6u3vhcyxB7F8oLHd+TlRjLUdSWjxE6D0HPCMmqypk007ebMpJphl2Xpod1Fl8 SWCMK/RnhtjfbR60rUNze0JK5g+ojSDAMf+YZOJ4QD3Z8W/yYTCQ0fLw7RkzrFeXpwA9d7 TGosAf6ZLqTzGhQAGeVvHVUnRw3PXJOMU8evrt6qffhqFrHinRGPK6RHCRwFICQ+LhgVWo Za/qap/F//XZ6hVw4cE1/ENJYLIPJrKfQFaig5McoMpoJdjEJTbWE2/TAYh6Fg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650562206; a=rsa-sha256; cv=none; b=GI77/s9COocX9mooTE1na62vLQUNS5h6zYMdD5MFOdro4Sk989YpaWGObjgoiVY7bpFmEL iDpItMf6UOG0+3XFkNx9lRkG0wlcsJuc53hYh/KAzfmY15m6UO5IOpLKLRgGQDRDwVV4C9 0/q/8SGdCwurSjJCZXXIMrUmS3ZOZa/M20q/828w/kYFdhUjw2e0Jb/JnCCNFo9seBYJVI 6f9h/qg0x7MX46Jfcd6usn9qeb5O6sVYVjwKFByt1b97BzpzexCCUUInBvoy/ORzCyKQVe lNFWtwyS09NBzt2A+kfeZx/rIYlNq5EYBleZuGiCZHuI+wjPNbiMyiBPeFpiDA== 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=489e8f24a57f76439fce5021d4945328fc868ad2 commit 489e8f24a57f76439fce5021d4945328fc868ad2 Author: John Baldwin AuthorDate: 2022-04-21 17:29:14 +0000 Commit: John Baldwin CommitDate: 2022-04-21 17:29:14 +0000 smbios/vpd: Use devclass_find to lookup devclass in module event handler. While here, use a modern function declaration for smbios_modevent and vpd_modevent. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D34996 --- sys/dev/smbios/smbios.c | 7 ++----- sys/x86/bios/vpd.c | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/sys/dev/smbios/smbios.c b/sys/dev/smbios/smbios.c index f3519634e1a4..1e6dd2a20166 100644 --- a/sys/dev/smbios/smbios.c +++ b/sys/dev/smbios/smbios.c @@ -209,10 +209,7 @@ smbios_detach (device_t dev) } static int -smbios_modevent (mod, what, arg) - module_t mod; - int what; - void * arg; +smbios_modevent (module_t mod, int what, void *arg) { device_t * devs; int count; @@ -222,7 +219,7 @@ smbios_modevent (mod, what, arg) case MOD_LOAD: break; case MOD_UNLOAD: - devclass_get_devices(smbios_devclass, &devs, &count); + devclass_get_devices(devclass_find("smbios"), &devs, &count); for (i = 0; i < count; i++) { device_delete_child(device_get_parent(devs[i]), devs[i]); } diff --git a/sys/x86/bios/vpd.c b/sys/x86/bios/vpd.c index 195c6a57f094..c47e2d1fe216 100644 --- a/sys/x86/bios/vpd.c +++ b/sys/x86/bios/vpd.c @@ -252,10 +252,7 @@ vpd_detach (device_t dev) } static int -vpd_modevent (mod, what, arg) - module_t mod; - int what; - void * arg; +vpd_modevent (module_t mod, int what, void *arg) { device_t * devs; int count; @@ -265,7 +262,7 @@ vpd_modevent (mod, what, arg) case MOD_LOAD: break; case MOD_UNLOAD: - devclass_get_devices(vpd_devclass, &devs, &count); + devclass_get_devices(devclass_find("vpd"), &devs, &count); for (i = 0; i < count; i++) { device_delete_child(device_get_parent(devs[i]), devs[i]); }