diff --git a/sys/arm/allwinner/a10_ahci.c b/sys/arm/allwinner/a10_ahci.c index 5e6f53291394..ac35a033f76c 100644 --- a/sys/arm/allwinner/a10_ahci.c +++ b/sys/arm/allwinner/a10_ahci.c @@ -423,4 +423,4 @@ static driver_t ahci_ata_driver = { sizeof(struct ahci_a10_softc) }; -DRIVER_MODULE(a10_ahci, simplebus, ahci_ata_driver, ahci_devclass, 0, 0); +DRIVER_MODULE(a10_ahci, simplebus, ahci_ata_driver, 0, 0); diff --git a/sys/arm/freescale/imx/imx6_ahci.c b/sys/arm/freescale/imx/imx6_ahci.c index 457966d9b219..9a789049b984 100644 --- a/sys/arm/freescale/imx/imx6_ahci.c +++ b/sys/arm/freescale/imx/imx6_ahci.c @@ -358,6 +358,6 @@ static driver_t ahci_ata_driver = { sizeof(struct ahci_controller) }; -DRIVER_MODULE(imx6_ahci, simplebus, ahci_ata_driver, ahci_devclass, 0, 0); +DRIVER_MODULE(imx6_ahci, simplebus, ahci_ata_driver, 0, 0); MODULE_DEPEND(imx6_ahci, ahci, 1, 1, 1); SIMPLEBUS_PNP_INFO(compat_data) diff --git a/sys/arm/nvidia/tegra_ahci.c b/sys/arm/nvidia/tegra_ahci.c index d3d6d55fdc56..17da6a08f6d5 100644 --- a/sys/arm/nvidia/tegra_ahci.c +++ b/sys/arm/nvidia/tegra_ahci.c @@ -780,5 +780,4 @@ static device_method_t tegra_ahci_methods[] = { static DEFINE_CLASS_0(ahci, tegra_ahci_driver, tegra_ahci_methods, sizeof(struct tegra_ahci_sc)); -DRIVER_MODULE(tegra_ahci, simplebus, tegra_ahci_driver, ahci_devclass, - NULL, NULL); +DRIVER_MODULE(tegra_ahci, simplebus, tegra_ahci_driver, NULL, NULL); diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c index d62a043eb2ab..5f91b088b4bc 100644 --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -2906,7 +2906,5 @@ ahcipoll(struct cam_sim *sim) } } -devclass_t ahci_devclass; - MODULE_VERSION(ahci, 1); MODULE_DEPEND(ahci, cam, 1, 1, 1); diff --git a/sys/dev/ahci/ahci.h b/sys/dev/ahci/ahci.h index f1d5b18806b3..ae068d11ce4b 100644 --- a/sys/dev/ahci/ahci.h +++ b/sys/dev/ahci/ahci.h @@ -674,5 +674,3 @@ void ahci_attached(device_t dev, struct ahci_channel *ch); void ahci_detached(device_t dev, struct ahci_channel *ch); struct ahci_channel * ahci_getch(device_t dev, int n); void ahci_putch(struct ahci_channel *ch); - -extern devclass_t ahci_devclass; diff --git a/sys/dev/ahci/ahci_mv_fdt.c b/sys/dev/ahci/ahci_mv_fdt.c index ee08093482c5..4b9c0068dda8 100644 --- a/sys/dev/ahci/ahci_mv_fdt.c +++ b/sys/dev/ahci/ahci_mv_fdt.c @@ -151,5 +151,5 @@ static driver_t ahci_driver = { sizeof(struct ahci_controller) }; -DRIVER_MODULE(ahci_mv, simplebus, ahci_driver, ahci_devclass, NULL, NULL); -DRIVER_MODULE(ahci_mv, ofwbus, ahci_driver, ahci_devclass, NULL, NULL); +DRIVER_MODULE(ahci_mv, simplebus, ahci_driver, NULL, NULL); +DRIVER_MODULE(ahci_mv, ofwbus, ahci_driver, NULL, NULL); diff --git a/sys/dev/ahci/ahci_pci.c b/sys/dev/ahci/ahci_pci.c index 5f8663b96609..15dbfe95ee3e 100644 --- a/sys/dev/ahci/ahci_pci.c +++ b/sys/dev/ahci/ahci_pci.c @@ -746,15 +746,18 @@ static device_method_t ahci_methods[] = { DEVMETHOD(bus_get_dma_tag, ahci_get_dma_tag), DEVMETHOD_END }; + static driver_t ahci_driver = { "ahci", ahci_methods, sizeof(struct ahci_controller) }; -DRIVER_MODULE(ahci, pci, ahci_driver, ahci_devclass, NULL, NULL); + +DRIVER_MODULE(ahci, pci, ahci_driver, NULL, NULL); /* Also matches class / subclass / progid XXX need to add when we have masking support */ MODULE_PNP_INFO("W32:vendor/device", pci, ahci, ahci_ids, nitems(ahci_ids) - 1); + static device_method_t ahci_ata_methods[] = { DEVMETHOD(device_probe, ahci_ata_probe), DEVMETHOD(device_attach, ahci_pci_attach), @@ -769,9 +772,11 @@ static device_method_t ahci_ata_methods[] = { DEVMETHOD(bus_child_location, ahci_child_location), DEVMETHOD_END }; + static driver_t ahci_ata_driver = { "ahci", ahci_ata_methods, sizeof(struct ahci_controller) }; -DRIVER_MODULE(ahci, atapci, ahci_ata_driver, ahci_devclass, NULL, NULL); + +DRIVER_MODULE(ahci, atapci, ahci_ata_driver, NULL, NULL);