From nobody Mon May 18 18:53:33 2026 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 4gK6QP3lVmz6fpRw for ; Mon, 18 May 2026 18:53:33 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gK6QP1B7Pz3MHq for ; Mon, 18 May 2026 18:53:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779130413; 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=+RudSkkPm9KdtDd24axoIORCjGIrJOF0qoXlDRmIeqE=; b=hBtRWmuI+xsDdUeigT8TMPbXEK/eYyUdk0x+zqf90M0wqoZ1Z7t9sMPlD6NxeD2QOJWIkc iKIzLZ9WTFP9UqjcGBwZtKyWgePLcoxRgTixHqPjb5vvWt+nHyMfUH5cDTxYiovkCLpme/ f2hclmvHqSTWqSn6eeoE5mqA6dPw2fidf3SRmLL2YKJf5+SBE+YcRfZe6/LSSzrgodv66o apabMESH6ALon5+q6ngzPW6gtIhoG3x//M6YJZ+/VsyNhDI7iLWHrLiJpYHir3JPOI3mdp JzkkaHrEFqIF+uTHBwvKCIxw3u+DyLKqw9V00TlIKbK6sI9prIzdXX0AFhCskA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779130413; a=rsa-sha256; cv=none; b=Cp9/Wk2NkP5ZYSO6uvzAs5lL3IsO9ZEkzDKiCQEM7byGdn9RsOiI1n/1pUQ0OYMtpzVdKf Fs2zoyibDshQj8kUoRhKfnpCBomvoGbKJVAX/md9qOTCxWRqz1BOYAL6aCv8viokAaoBaN erM4rOFkFTxLhQBOIaS85EEKaCoVhX5AC34bqx3BgnDNrD04+AyAX2Pa5mYndt4ljEEP0k /wB5RB2J8Mb9xhSdSHX8xfZziVi9B9fhhG4Ae2vZ6kN1f9Hmn0vIIlhXv57PkThJEob2eU 4cwo6yHxhyAFV9L/l22m3UC0+3iXw3AGu/hHCU/BP3mBsTsL4Moex04T4V+MyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779130413; 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=+RudSkkPm9KdtDd24axoIORCjGIrJOF0qoXlDRmIeqE=; b=OuLXjohG36BLntiU+N19/DIT6qR/xxfa9ZFURWgKEzUUNk5mQ7HmAwA8btii7b6s6RaAdN 4LdhZ7qmBUUcj9lHF+pmVJ9F4vjpd84pgGFH8sX7iSdZtFeWhSuTnyaBMYhiqRqi80FfHP At2G+hPaeaEsWvA5gexfN/5TAQmyJ+c2gscjOPtEDujVhTPiMthi4sS7Ljbgeg3sKVYvxn v3hrPmW3OANgku3cT/qrf/3G90bMwPZOfVQ/Ow9VE/EBpLAQP+ktc5CrzqQmAdvjtbNVbR zwpF5KfrvruysdKf9p7D76fYhHglmP7OJGVG2GNPlYjiou/u9kT7/ElbY5OiQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gK6QP0VjHzhJk for ; Mon, 18 May 2026 18:53:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31a33 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 18 May 2026 18:53:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: be4f245e1e4f - main - sys: Use is_pci_device instead of checking device or devclass names 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: be4f245e1e4fe60d43aaff5b11b45f2a9a66a51c Auto-Submitted: auto-generated Date: Mon, 18 May 2026 18:53:33 +0000 Message-Id: <6a0b602d.31a33.62bc8c54@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=be4f245e1e4fe60d43aaff5b11b45f2a9a66a51c commit be4f245e1e4fe60d43aaff5b11b45f2a9a66a51c Author: John Baldwin AuthorDate: 2026-05-18 18:52:39 +0000 Commit: John Baldwin CommitDate: 2026-05-18 18:52:39 +0000 sys: Use is_pci_device instead of checking device or devclass names Reviewed by: bz, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D56998 --- sys/dev/sound/pcm/ac97.c | 2 +- sys/dev/thunderbolt/tb_pcib.c | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/sys/dev/sound/pcm/ac97.c b/sys/dev/sound/pcm/ac97.c index 1407d202a0d1..ec742ccbbfaa 100644 --- a/sys/dev/sound/pcm/ac97.c +++ b/sys/dev/sound/pcm/ac97.c @@ -628,7 +628,7 @@ ac97_initmixer(struct ac97_info *codec) } pdev = codec->dev; - while (strcmp(device_get_name(device_get_parent(pdev)), "pci") != 0) { + while (!is_pci_device(pdev)) { /* find the top-level PCI device handler */ pdev = device_get_parent(pdev); } diff --git a/sys/dev/thunderbolt/tb_pcib.c b/sys/dev/thunderbolt/tb_pcib.c index 65ff42e4f831..876722a0076d 100644 --- a/sys/dev/thunderbolt/tb_pcib.c +++ b/sys/dev/thunderbolt/tb_pcib.c @@ -548,16 +548,13 @@ tb_pci_probe(device_t dev) { struct tb_pcib_ident *n; device_t parent; - devclass_t dc; /* * This driver is only valid if the parent device is a PCI-PCI - * bridge. To determine that, check if the grandparent is a - * PCI bus. + * bridge. */ parent = device_get_parent(dev); - dc = device_get_devclass(device_get_parent(parent)); - if (strcmp(devclass_get_name(dc), "pci") != 0) + if (!is_pci_device(parent)) return (ENXIO); if ((n = tb_pcib_find_ident(parent)) != NULL) {