From nobody Sun Aug 17 21:02:29 2025 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 4c4pFf40k9z643GX; Sun, 17 Aug 2025 21:02:30 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4pFd5mjtz3VBJ; Sun, 17 Aug 2025 21:02:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755464549; 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=aXGb0Re07kPHk+5Ct1J92P4TimmfllXzomtCWNNpxw4=; b=h45SCXEkkENUaSSDPZkBlHd0t4F9ktzpbF+u6l/8HhWu5uiyErrTKyWN3uYcY6X/p/8MNr 6vpgmJHwvDB7BcUwtQIDsz9udFlH9JdL2U8KzpZR7aDYDn8pB90XgUS53JO9wVWuWju3MP uZWSq52j4B0bwGrTAqu6UozLUxo8VPX6aXBwk0Ej/xv1GDaPu1EoHwTUdtAFUeDAj4YcNl yM4Kv4GYExP2Y+bFF2w5gO7Azbi1VbEyYxhlpxomseYg3CRis0UlrP9bkHEEVo6Efvzz5k qFcjSqc2OUN+joeTD/PnQ8zWJMEsR5Y9MeiodKg7JqUX4UbNVqDKOxnS/aFrKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755464549; 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=aXGb0Re07kPHk+5Ct1J92P4TimmfllXzomtCWNNpxw4=; b=sIdGf4PpCKIzCbpZvbhsFXmkdy5UDNFgismKk1if6snzU95PrOfQ17cMt76cqs0VArm9gF jApssYuixZtw4pTxsPAZxkeCENsrY9dBYPhpb1RAUqBOH3YBWfXeQn54ZnRUa1VIKg1EsE TDq/7gvKK1AnYdbDj/Bpo1SeGzxl9uXmZ4TxNsOFDegUHE30drJAWt6F9EGHq9/MNnrsxF j0ehKXdfh5u09FGfWqqGhMjOXfDkIU6V/R7aQT+uIZneU8q90cGe38Trzl79JPwgukfskJ O5Z53299ESunuGzkbPBou6q7MZofmLVSFg/e04Yn0gSNYqC7lXYmCp3wWzSJHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755464549; a=rsa-sha256; cv=none; b=GqYY+mrmUogCbQpyrE/EN0lUdV32vtpLFs0o+zEZqI8pB43WpYLhwFB8pOIZE1ezmsOgPj C5Hkjf/lpIayKSsiYMYG67RK0Who2EC0ckygQJooITNAiZUqGDTfkAQrnoratHQfghOTSI Fu1o3YoOi7bvc3Czvnuh46s7WsmCxIDDOQo8l96UV4PqWGZeatCNansn9i98XfYfTj7cqW nc+heYg/FN2jpkXSZXpZ/1PV9fOnl/kn6talZlViy9K2S5oNKjf52/XTwYcevYtFRz+2DR TSzET2odDmHfeH2/YV9ZzgJ2DvXdvIB4sCyCvXPq8XlaAavm3mnDmdZokn7mrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4pFd5Jx6zBbT; Sun, 17 Aug 2025 21:02:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 57HL2TxR085335; Sun, 17 Aug 2025 21:02:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57HL2Te0085332; Sun, 17 Aug 2025 21:02:29 GMT (envelope-from git) Date: Sun, 17 Aug 2025 21:02:29 GMT Message-Id: <202508172102.57HL2Te0085332@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 149b9f26d0ba - main - hidraw(4): Rename to uhid if HIDRAW_MAKE_UHID_ALIAS is specified 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 149b9f26d0bab5864f484b52066f9b0ffb06939c Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=149b9f26d0bab5864f484b52066f9b0ffb06939c commit 149b9f26d0bab5864f484b52066f9b0ffb06939c Author: Vladimir Kondratyev AuthorDate: 2025-08-17 21:00:44 +0000 Commit: Vladimir Kondratyev CommitDate: 2025-08-17 21:00:44 +0000 hidraw(4): Rename to uhid if HIDRAW_MAKE_UHID_ALIAS is specified instead of renaming uhid(4) to hidraw to make easier import of coming u2f(4) driver which has similar option. Differential Revision: https://reviews.freebsd.org/D51608 --- sys/dev/hid/hidraw.c | 12 +++++++++--- sys/dev/usb/input/uhid.c | 6 ------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/dev/hid/hidraw.c b/sys/dev/hid/hidraw.c index 06f70070f61b..4855843cd265 100644 --- a/sys/dev/hid/hidraw.c +++ b/sys/dev/hid/hidraw.c @@ -85,6 +85,12 @@ SYSCTL_INT(_hw_hid_hidraw, OID_AUTO, debug, CTLFLAG_RWTUN, free((buf), M_DEVBUF); \ } +#ifdef HIDRAW_MAKE_UHID_ALIAS +#define HIDRAW_NAME "uhid" +#else +#define HIDRAW_NAME "hidraw" +#endif + struct hidraw_softc { device_t sc_dev; /* base device */ @@ -183,8 +189,8 @@ hidraw_identify(driver_t *driver, device_t parent) { device_t child; - if (device_find_child(parent, "hidraw", DEVICE_UNIT_ANY) == NULL) { - child = BUS_ADD_CHILD(parent, 0, "hidraw", + if (device_find_child(parent, HIDRAW_NAME, DEVICE_UNIT_ANY) == NULL) { + child = BUS_ADD_CHILD(parent, 0, HIDRAW_NAME, device_get_unit(parent)); if (child != NULL) hidbus_set_index(child, HIDRAW_INDEX); @@ -1050,7 +1056,7 @@ static device_method_t hidraw_methods[] = { }; static driver_t hidraw_driver = { - "hidraw", + HIDRAW_NAME, hidraw_methods, sizeof(struct hidraw_softc) }; diff --git a/sys/dev/usb/input/uhid.c b/sys/dev/usb/input/uhid.c index a31081663f0c..e2b97f5accac 100644 --- a/sys/dev/usb/input/uhid.c +++ b/sys/dev/usb/input/uhid.c @@ -40,8 +40,6 @@ * HID spec: http://www.usb.org/developers/devclass_docs/HID1_11.pdf */ -#include "opt_hid.h" - #include #include #include @@ -928,11 +926,7 @@ static device_method_t uhid_methods[] = { }; static driver_t uhid_driver = { -#ifdef HIDRAW_MAKE_UHID_ALIAS - .name = "hidraw", -#else .name = "uhid", -#endif .methods = uhid_methods, .size = sizeof(struct uhid_softc), };