From nobody Wed Sep 09 20:34:37 2026 X-Original-To: dev-commits-src-all@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 4hgCGW3nwqz6rMgy for ; Wed, 09 Sep 2026 20:34:43 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hgCGW2QtFz3M3h for ; Wed, 09 Sep 2026 20:34:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1788986083; 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=5NWVVagFnveSEP06kNw/RzmV89Xu+km0vFqbYOGDZxE=; b=fTxc81J1gOXulufgRyGd1ogtvBiFTWjBXybn9UDhFditKb5IfBzgXXhuT08VL/5J+wLDgv UsRr3Ulma8K3aeKzJbjFaYs1ClASZAlM/vD/1Cwmt8p0craMV/gOshsUA1iHc6DZe0aSyK 02qJTnQMZms+dCKlI1gZUsZqo34veCGGdBnnWyrrDxo895mIo5jDIeWy7AHe6+gtW6c1Ka dAu3dt+a/3O1DgtfSAbp1N8l+RF2wHrBqioLNwfXap/PnJoJFJG2AtC/wolcnvy9dEaWvx 9bnbcGql/FJTDvE0SCuC9MLgN/szBP3gSbeTtZPTZSgbG2ZaKbs8PT/2OY7bIQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1788986083; b=VpwVhITsEyRpb1Weqz5Mp/i/g7KD18jUy63KCTI+vHb/afYP4EMYeXhbYrGMGjuSpy6rLk 6WpGwSMqsWOrm+OJOt0gqvceT8lff/L+ZkwiM7j0XCBDz7BGj6I21XziB4SIithdUFZ2aS xorzjPjeTuk7jfK711ce1uA6gpoa6iD6hCxXACCnIp9gK5RS6b8XyHVZx/LHKF4TH4Tsim JaXRiMP0vViM1w39uL75Rag2Ob1TiKo6Hgx78W4uAHHE/ttCXl9aHgaJ0Ai9UqGCqndpOU aE8LEiFz70B077biBXSP60lRLVDtyogWtBwrfwpl6xAT8HZxF5XKUI0z5QY+gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1788986083; 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=5NWVVagFnveSEP06kNw/RzmV89Xu+km0vFqbYOGDZxE=; b=ZydbyB3N9lx0LS4dfue0/Dn8bvUyIRl9DO4EXej9UpNQs2m49HsmUQ4e+1nMzMBUxc+h2q NDy97ueP92u7LAwaF0bfXy8SB3DmCjwS4si9XhGa4ZqaZj2ZxuNwxqgKGaxuY8WbmpiR7U Y/CPd2xecVWUgLCTKBRDT4cPFxuioisIdhpyabZj5S9ZPLqo4eIvivpf58ElGRE0XdJiXk B2oPtzIxk05dbY4j478rpqZui/A1GR3y2ARpbnM1NELNTsqLPG/ux58qE8s9cnQ4ZDBoZ6 fUZen98H9AgniQ8vD4kSMnzR14DCAAPMbTE+Khfhl3qotbt84vhIExpYnO+XUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hgCGW1Hg0z1C32 for ; Wed, 09 Sep 2026 20:34:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1faf2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 09 Sep 2026 20:34:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: fc0a5ae09430 - main - linuxkpi: Add device under parent, not under class List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fc0a5ae094308609927e9c355928d08923278325 Auto-Submitted: auto-generated Date: Wed, 09 Sep 2026 20:34:37 +0000 Message-Id: <6aa1c2dd.1faf2.187ebf83@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=fc0a5ae094308609927e9c355928d08923278325 commit fc0a5ae094308609927e9c355928d08923278325 Author: Jean-Sébastien Pédron AuthorDate: 2026-02-08 10:06:37 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-09-09 20:01:26 +0000 linuxkpi: Add device under parent, not under class In `device_add()`, the function used to add the given device under its class. This is used to build a sysctl tree. We ended up with devices or "pseudo" devices (like the output connectors of a GPU). For example with an output connector: sysctl sys.class.drm.card0-DP-1 This device should be added under its parent if it has one. With this fix, the same output connector is now: sysctl sys.device.drmn1.card0.card0-DP-1 Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55175 --- sys/compat/linuxkpi/common/include/linux/device.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h index 2913810923f1..a26d07a1e7a3 100644 --- a/sys/compat/linuxkpi/common/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h @@ -458,7 +458,10 @@ device_add(struct device *dev) if (dev->devt == 0) dev->devt = makedev(0, device_get_unit(dev->bsddev)); } - kobject_add(&dev->kobj, &dev->class->kobj, dev_name(dev)); + if (dev->parent != NULL) + kobject_add(&dev->kobj, &dev->parent->kobj, dev_name(dev)); + else + kobject_add(&dev->kobj, &dev->class->kobj, dev_name(dev)); if (dev->groups) return (sysfs_create_groups(&dev->kobj, dev->groups));