From nobody Wed Apr 27 19:26:32 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 9EC1B199AEDF; Wed, 27 Apr 2022 19:26:32 +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 4KpTJS3lCrz3JNp; Wed, 27 Apr 2022 19:26:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651087592; 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=1vkKoL/jJgK+dBsw+cORq4Q4CqS7tiLGjF69GO8PkXc=; b=kN1PRf7st40sSFySXk6wL+3nXFjZpl69DdUf8aYL6rHkObtBEat8rqQHCJ5p7BIkkF7n7F 8h6ahOAnPKI87KO1JoXqgRgYuc8X+nAsrrG+ZUVWKZJ8Bclt1so8+EUsEtY9r8jFKyI/A7 B8Qx6G6jYVPFDaZQrxEc/AD5D5KvkzYomWOGM325zzjFSKEteFHgTJ9AF4UvScI/l1oLpQ +y8fLNEBdTTiSVQ6esm8zflVuxISHt24E5y8e8d01uvzK1iZtFh363DYPJ1X6dZDWBjLg1 dDDgL3ZGshQtcN2KTiGiBc6oHa8Z6tWxgm7NiKFha+G9/+RqyeMkoz7+VSbIEw== 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 5F6931B31; Wed, 27 Apr 2022 19:26:32 +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 23RJQW4Z047776; Wed, 27 Apr 2022 19:26:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23RJQW1U047775; Wed, 27 Apr 2022 19:26:32 GMT (envelope-from git) Date: Wed, 27 Apr 2022 19:26:32 GMT Message-Id: <202204271926.23RJQW1U047775@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: fa160738bd18 - main - firewire: Initialize firewire_devclass in fw_modevent. 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: fa160738bd18db58b811ed6716330527416f2eda Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651087592; 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=1vkKoL/jJgK+dBsw+cORq4Q4CqS7tiLGjF69GO8PkXc=; b=jzJUon8HSi6PblU4Yj+0CzYb4X4VcQx/REUiwO2SNNA7cI1wCpU3U1ClVNNbLkS2QXOVHX m/bNRimnIwOyQ/6iZdspBuzE0seR+mduGghvJ8gwQVCbfjgRnLBob1QXOsSSrcf3RrQKHy JbejV+Hl5Gez6WbQmHxP0GTmV9T5fn+1r6gd7Hepkz5x/HbT9LLBa81OkFEZkJjuuiL93p 75PMPwPtyRqfxTifuhS6s5WTuqjvPWA3C5SWfeADYpmLxlxIVsOiVkV5pZRnUJYXYZFbT0 K5kzeNCQiIGdE2B80MQP05lBCoWS1XLxlFfm9slhMbQab0Hgp8drsriKD1g9RA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651087592; a=rsa-sha256; cv=none; b=cQNOO3Qltp2vfSkuuJDrdZ9ZmI3keFv6fKc7LjGaUgW1esmORh2J7IE2jzQJgaq14LuveJ iEV/X8VmfB3Jfe8Gb94K4U9wA3fTcuVuh7pM5JRdB/LxeDqkC6oL4Qv//jAWlFt9ysmVXn QhUvVwV/kFzsKwA7U4elefAKOi7cLZjgyHUROcdScPJJWXlFueGWS1ymvEkOGxFsRt+ZR3 BU8syiYtmifevy/Y6Jc855OTln+rQvOVubvu1LZ7MfayCJ+tYou/HDuVSi0Amc9vEiVPa3 nqtQDPaccCdgvUpjoqwTYRPxyo8GkWJsGm+5SyhkHQAZjteKA+ryZ23D6wP0OQ== 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=fa160738bd18db58b811ed6716330527416f2eda commit fa160738bd18db58b811ed6716330527416f2eda Author: John Baldwin AuthorDate: 2022-04-27 19:26:05 +0000 Commit: John Baldwin CommitDate: 2022-04-27 19:26:05 +0000 firewire: Initialize firewire_devclass in fw_modevent. The use of devclass_get_softc() combined with cdev unit numbers is probably not ideal (probably should be initializing si_drv1 when each cdev is created instead), but it looks like a bit of a PITA to do, so just initialize the devclass explicitly instead. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D35060 --- sys/dev/firewire/firewire.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/firewire/firewire.c b/sys/dev/firewire/firewire.c index 45f3ac3cb79d..cfcc41d60c1c 100644 --- a/sys/dev/firewire/firewire.c +++ b/sys/dev/firewire/firewire.c @@ -2368,6 +2368,7 @@ fw_modevent(module_t mode, int type, void *data) switch (type) { case MOD_LOAD: + firewire_devclass = devclass_create("firewire"); fwdev_ehtag = EVENTHANDLER_REGISTER(dev_clone, fwdev_clone, 0, 1000); break; @@ -2384,6 +2385,5 @@ fw_modevent(module_t mode, int type, void *data) } -DRIVER_MODULE(firewire, fwohci, firewire_driver, firewire_devclass, - fw_modevent,0); +DRIVER_MODULE(firewire, fwohci, firewire_driver, fw_modevent, NULL); MODULE_VERSION(firewire, 1);