From nobody Fri May 06 22:36:17 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 B59521AB5CCD; Fri, 6 May 2022 22:36:17 +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 4Kw55F4h3Bz3tFx; Fri, 6 May 2022 22:36:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651876577; 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=uDCP1cBivHT0IWQy57l4fBWTFh3bQd9JAN+hKPEUC4A=; b=Ac+D6GiedVjCGl+cTJ20VKp0X+0rmhCZJJPzybpL9WocYp/jrdrlFmO+054q0RjWz3HXlS gH6HM/5hkf8fstu1Tq5k8Qiz7ZTNjoBCiqT2ylmnnHxDhDs6v2jI/vxJNAFKgt4LZ212K8 pnVIY8MrxLxDLJ9vsDSqTXmrcut0BNPiBCk+Q02F7wgYWopWL77MtPgsTLLlnd/DGvuBGU OT3Yr5PrGdumtQDtenuDFA9BS/wXbVMZNixRHsDeDIPYvHXrxGTt8RtMg/zt+Ma7K2fa74 icSvc5G65Q3XjAspUeVqDtFctpDoKKBoz6SQ6F6aHg9tWhwmm+mt7tn9ylEW8w== 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 7BE68241CF; Fri, 6 May 2022 22:36:17 +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 246MaHaY005604; Fri, 6 May 2022 22:36:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 246MaHH0005603; Fri, 6 May 2022 22:36:17 GMT (envelope-from git) Date: Fri, 6 May 2022 22:36:17 GMT Message-Id: <202205062236.246MaHH0005603@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: d5a7306c75d2 - main - ata: Remove ata_devclass from DRIVER_MODULE invocations. 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: d5a7306c75d2f9bddf7e264cbd61c83eee67f071 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651876577; 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=uDCP1cBivHT0IWQy57l4fBWTFh3bQd9JAN+hKPEUC4A=; b=a9cv2Mw54JEg5tiLFEAN/3FFGuzk53rak7jTHtmNQhwm9CITAgFkciWL18Xsuia1eHPNe4 1xXiuMFppqZkpMj5O0hfm/zqno1yE3uT75DFo7bHC5+rHucFrKU+u636aBHj0793LQavll PGN2S1FZVxM3ASAQaK9nVq877MV2eic953k0yB0PisERkaKyE7IaQgPqVlP+4aF8VdWBBb buvFMzeTarUjTeo6MIdhmU7oJcjdeBnAcHCcJ3dY1aUSAXHiM88aV6zD4vRviRAOus3kqB HVG8IlzFcLFTdVwpvJhGMPbw4TvkCVU1MvC/IrW29s+Uej5w6pQE/2t86/A/UA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651876577; a=rsa-sha256; cv=none; b=o8GQr3uT9x+BG3/9368BiwTxHYy1ZfSz1wwyIZroiMT9IWTFfIQfZkfZ5MJMaXJ7VPfcxK mH3SMiZ2tGLaE1wsHpUK7I7gQop8TbGTJpLC1tm04Wz0znGWoTWfaoF6Rp0vB9BgGo5M0U LuDtGQ4ILEIyr7bAsjhbYa0CC+W3zP/aExtqwIJSgE+C606DI0vQ2i+QmUkqNUVStjM0AE 799ng3jJ4xWO4CJEq2okwdLAMqXXZw1xs5mmxe6YR8cetQBY2DQbSrk1j+LlrcSO6+KaUJ D46D/fQY/nSGvB8WaDWiN9XzlQNtHjtDeWqB6BRVhgxL9y6OukUK4BnQizWSCw== 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=d5a7306c75d2f9bddf7e264cbd61c83eee67f071 commit d5a7306c75d2f9bddf7e264cbd61c83eee67f071 Author: John Baldwin AuthorDate: 2022-05-06 22:36:10 +0000 Commit: John Baldwin CommitDate: 2022-05-06 22:36:10 +0000 ata: Remove ata_devclass from DRIVER_MODULE invocations. Keep the global variable for its uses in ata-pci.c and chipsets/ata-fsl.c but initialize it in the existing ata_module_event_handler. Move the module event handler a bit earlier to ensure the variable is set before any devices are attached. --- sys/dev/ata/ata-all.c | 3 ++- sys/dev/ata/ata-isa.c | 2 +- sys/dev/ata/ata-pci.c | 2 +- sys/powerpc/powermac/ata_kauai.c | 2 +- sys/powerpc/powermac/ata_macio.c | 2 +- sys/powerpc/psim/ata_iobus.c | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index 220b3a614906..2a749712c551 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -1214,6 +1214,7 @@ ata_module_event_handler(module_t mod, int what, void *arg) switch (what) { case MOD_LOAD: + ata_devclass = devclass_find("ata"); return 0; case MOD_UNLOAD: @@ -1225,6 +1226,6 @@ ata_module_event_handler(module_t mod, int what, void *arg) } static moduledata_t ata_moduledata = { "ata", ata_module_event_handler, NULL }; -DECLARE_MODULE(ata, ata_moduledata, SI_SUB_CONFIGURE, SI_ORDER_SECOND); +DECLARE_MODULE(ata, ata_moduledata, SI_SUB_DRIVERS, SI_ORDER_ANY); MODULE_VERSION(ata, 1); MODULE_DEPEND(ata, cam, 1, 1, 1); diff --git a/sys/dev/ata/ata-isa.c b/sys/dev/ata/ata-isa.c index 0c2b0acf0c96..281e8b0d0deb 100644 --- a/sys/dev/ata/ata-isa.c +++ b/sys/dev/ata/ata-isa.c @@ -204,6 +204,6 @@ static driver_t ata_isa_driver = { sizeof(struct ata_channel), }; -DRIVER_MODULE(ata, isa, ata_isa_driver, ata_devclass, NULL, NULL); +DRIVER_MODULE(ata, isa, ata_isa_driver, NULL, NULL); MODULE_DEPEND(ata, ata, 1, 1, 1); ISA_PNP_INFO(ata_ids); diff --git a/sys/dev/ata/ata-pci.c b/sys/dev/ata/ata-pci.c index d8f97158709b..86072519c1e5 100644 --- a/sys/dev/ata/ata-pci.c +++ b/sys/dev/ata/ata-pci.c @@ -767,7 +767,7 @@ driver_t ata_pcichannel_driver = { sizeof(struct ata_channel), }; -DRIVER_MODULE(ata, atapci, ata_pcichannel_driver, ata_devclass, NULL, NULL); +DRIVER_MODULE(ata, atapci, ata_pcichannel_driver, NULL, NULL); /* * misc support fucntions diff --git a/sys/powerpc/powermac/ata_kauai.c b/sys/powerpc/powermac/ata_kauai.c index 75e676eadd81..80fa61e74623 100644 --- a/sys/powerpc/powermac/ata_kauai.c +++ b/sys/powerpc/powermac/ata_kauai.c @@ -121,7 +121,7 @@ static driver_t ata_kauai_driver = { sizeof(struct ata_kauai_softc), }; -DRIVER_MODULE(ata, pci, ata_kauai_driver, ata_devclass, NULL, NULL); +DRIVER_MODULE(ata, pci, ata_kauai_driver, NULL, NULL); MODULE_DEPEND(ata, ata, 1, 1, 1); /* diff --git a/sys/powerpc/powermac/ata_macio.c b/sys/powerpc/powermac/ata_macio.c index 0d19a2a2233b..bb0f90f99dec 100644 --- a/sys/powerpc/powermac/ata_macio.c +++ b/sys/powerpc/powermac/ata_macio.c @@ -149,7 +149,7 @@ static driver_t ata_macio_driver = { sizeof(struct ata_macio_softc), }; -DRIVER_MODULE(ata, macio, ata_macio_driver, ata_devclass, NULL, NULL); +DRIVER_MODULE(ata, macio, ata_macio_driver, NULL, NULL); MODULE_DEPEND(ata, ata, 1, 1, 1); static int diff --git a/sys/powerpc/psim/ata_iobus.c b/sys/powerpc/psim/ata_iobus.c index 645e92792655..95d916df3b64 100644 --- a/sys/powerpc/psim/ata_iobus.c +++ b/sys/powerpc/psim/ata_iobus.c @@ -230,7 +230,7 @@ static driver_t ata_iobus_sub_driver = { sizeof(struct ata_channel), }; -DRIVER_MODULE(ata, ataiobus, ata_iobus_sub_driver, ata_devclass, NULL, NULL); +DRIVER_MODULE(ata, ataiobus, ata_iobus_sub_driver, NULL, NULL); static int ata_iobus_sub_probe(device_t dev)