git: d48ddc5f9676 - main - mpr/mps/mpt: Remove unused devclass arguments to DRIVER_MODULE.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 06 May 2022 22:43:45 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d48ddc5f9676bbf050c5f5d110d672173ae82f47 commit d48ddc5f9676bbf050c5f5d110d672173ae82f47 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-04-20 17:04:01 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-05-06 22:39:32 +0000 mpr/mps/mpt: Remove unused devclass arguments to DRIVER_MODULE. --- sys/dev/mpr/mpr_pci.c | 3 +-- sys/dev/mps/mps_pci.c | 3 +-- sys/dev/mpt/mpt_pci.c | 5 ++--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/sys/dev/mpr/mpr_pci.c b/sys/dev/mpr/mpr_pci.c index c7984df6c87e..3a90a22e4cfe 100644 --- a/sys/dev/mpr/mpr_pci.c +++ b/sys/dev/mpr/mpr_pci.c @@ -174,8 +174,7 @@ struct mpr_ident { { 0, 0, 0, 0, 0, NULL } }; -static devclass_t mpr_devclass; -DRIVER_MODULE(mpr, pci, mpr_pci_driver, mpr_devclass, 0, 0); +DRIVER_MODULE(mpr, pci, mpr_pci_driver, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device;U16:subvendor;U16:subdevice;D:#", pci, mpr, mpr_identifiers, nitems(mpr_identifiers) - 1); diff --git a/sys/dev/mps/mps_pci.c b/sys/dev/mps/mps_pci.c index 51ca92c0b203..ea3bee6c273b 100644 --- a/sys/dev/mps/mps_pci.c +++ b/sys/dev/mps/mps_pci.c @@ -143,8 +143,7 @@ struct mps_ident { { 0, 0, 0, 0, 0, NULL } }; -static devclass_t mps_devclass; -DRIVER_MODULE(mps, pci, mps_pci_driver, mps_devclass, 0, 0); +DRIVER_MODULE(mps, pci, mps_pci_driver, 0, 0); MODULE_DEPEND(mps, cam, 1, 1, 1); MODULE_PNP_INFO("U16:vendor;U16:device;U16:subvendor;U16:subdevice", pci, mps, mps_identifiers, nitems(mps_identifiers) - 1); diff --git a/sys/dev/mpt/mpt_pci.c b/sys/dev/mpt/mpt_pci.c index 94c568c4c205..e9b59fc2e8a1 100644 --- a/sys/dev/mpt/mpt_pci.c +++ b/sys/dev/mpt/mpt_pci.c @@ -169,8 +169,7 @@ static driver_t mpt_driver = { "mpt", mpt_methods, sizeof(struct mpt_softc) }; -static devclass_t mpt_devclass; -DRIVER_MODULE(mpt, pci, mpt_driver, mpt_devclass, NULL, NULL); +DRIVER_MODULE(mpt, pci, mpt_driver, NULL, NULL); MODULE_DEPEND(mpt, pci, 1, 1, 1); MODULE_VERSION(mpt, 1); @@ -291,7 +290,7 @@ mpt_link_peer(struct mpt_softc *mpt) /* * XXX: depends on probe order */ - mpt2 = (struct mpt_softc *)devclass_get_softc(mpt_devclass,mpt->unit-1); + mpt2 = devclass_get_softc(device_get_devclass(mpt->dev), mpt->unit - 1); if (mpt2 == NULL) { return;