Define a single instance of ahci_devclass and reference it from all the
attachment code for various SOCs and busses. Remove all the static and should-have-been-static and named-differently instances of it. This should eliminate the recently-grown build warnings about multiple definitions when building arm kernels.
This commit is contained in:
parent
8fb0ef085c
commit
74eb18b6cc
@ -373,8 +373,6 @@ ahci_a10_detach(device_t dev)
|
||||
return (ahci_detach(dev));
|
||||
}
|
||||
|
||||
static devclass_t ahci_devclass;
|
||||
|
||||
static device_method_t ahci_ata_methods[] = {
|
||||
DEVMETHOD(device_probe, ahci_a10_probe),
|
||||
DEVMETHOD(device_attach, ahci_a10_attach),
|
||||
|
@ -330,8 +330,6 @@ imx6_ahci_detach(device_t dev)
|
||||
return (ahci_detach(dev));
|
||||
}
|
||||
|
||||
devclass_t ahci_devclass;
|
||||
|
||||
static device_method_t imx6_ahci_ata_methods[] = {
|
||||
/* device probe, attach and detach methods */
|
||||
DEVMETHOD(device_probe, imx6_ahci_probe),
|
||||
|
@ -618,8 +618,7 @@ static device_method_t tegra_ahci_methods[] = {
|
||||
DEVMETHOD_END
|
||||
};
|
||||
|
||||
static devclass_t tegra_ahci_devclass;
|
||||
static DEFINE_CLASS_0(ahci, tegra_ahci_driver, tegra_ahci_methods,
|
||||
sizeof(struct tegra_ahci_sc));
|
||||
DRIVER_MODULE(tegra_ahci, simplebus, tegra_ahci_driver, tegra_ahci_devclass,
|
||||
DRIVER_MODULE(tegra_ahci, simplebus, tegra_ahci_driver, ahci_devclass,
|
||||
NULL, NULL);
|
||||
|
@ -2747,5 +2747,8 @@ ahcipoll(struct cam_sim *sim)
|
||||
ahci_reset_to(ch);
|
||||
}
|
||||
}
|
||||
|
||||
devclass_t ahci_devclass;
|
||||
|
||||
MODULE_VERSION(ahci, 1);
|
||||
MODULE_DEPEND(ahci, cam, 1, 1, 1);
|
||||
|
@ -649,3 +649,6 @@ bus_dma_tag_t ahci_get_dma_tag(device_t dev, device_t child);
|
||||
int ahci_ctlr_reset(device_t dev);
|
||||
int ahci_ctlr_setup(device_t dev);
|
||||
void ahci_free_mem(device_t dev);
|
||||
|
||||
extern devclass_t ahci_devclass;
|
||||
|
||||
|
@ -145,7 +145,6 @@ static device_method_t ahci_methods[] = {
|
||||
DEVMETHOD_END
|
||||
};
|
||||
|
||||
static devclass_t ahci_devclass;
|
||||
static driver_t ahci_driver = {
|
||||
"ahci",
|
||||
ahci_methods,
|
||||
|
@ -636,7 +636,6 @@ ahci_pci_resume(device_t dev)
|
||||
return (bus_generic_resume(dev));
|
||||
}
|
||||
|
||||
devclass_t ahci_devclass;
|
||||
static device_method_t ahci_methods[] = {
|
||||
DEVMETHOD(device_probe, ahci_probe),
|
||||
DEVMETHOD(device_attach, ahci_pci_attach),
|
||||
|
Loading…
Reference in New Issue
Block a user