Date: Mon, 2 Oct 2017 02:58:28 +0000 (UTC) From: Ian Lepore <ian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324186 - in head/sys: arm/allwinner arm/freescale/imx arm/nvidia dev/ahci Message-ID: <201710020258.v922wSTU089643@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ian Date: Mon Oct 2 02:58:28 2017 New Revision: 324186 URL: https://svnweb.freebsd.org/changeset/base/324186 Log: 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. Modified: head/sys/arm/allwinner/a10_ahci.c head/sys/arm/freescale/imx/imx6_ahci.c head/sys/arm/nvidia/tegra_ahci.c head/sys/dev/ahci/ahci.c head/sys/dev/ahci/ahci.h head/sys/dev/ahci/ahci_mv_fdt.c head/sys/dev/ahci/ahci_pci.c Modified: head/sys/arm/allwinner/a10_ahci.c ============================================================================== --- head/sys/arm/allwinner/a10_ahci.c Mon Oct 2 01:03:18 2017 (r324185) +++ head/sys/arm/allwinner/a10_ahci.c Mon Oct 2 02:58:28 2017 (r324186) @@ -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), Modified: head/sys/arm/freescale/imx/imx6_ahci.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_ahci.c Mon Oct 2 01:03:18 2017 (r324185) +++ head/sys/arm/freescale/imx/imx6_ahci.c Mon Oct 2 02:58:28 2017 (r324186) @@ -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), Modified: head/sys/arm/nvidia/tegra_ahci.c ============================================================================== --- head/sys/arm/nvidia/tegra_ahci.c Mon Oct 2 01:03:18 2017 (r324185) +++ head/sys/arm/nvidia/tegra_ahci.c Mon Oct 2 02:58:28 2017 (r324186) @@ -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); Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Mon Oct 2 01:03:18 2017 (r324185) +++ head/sys/dev/ahci/ahci.c Mon Oct 2 02:58:28 2017 (r324186) @@ -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); Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Mon Oct 2 01:03:18 2017 (r324185) +++ head/sys/dev/ahci/ahci.h Mon Oct 2 02:58:28 2017 (r324186) @@ -649,3 +649,6 @@ bus_dma_tag_t ahci_get_dma_tag(device_t dev, device_t 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; + Modified: head/sys/dev/ahci/ahci_mv_fdt.c ============================================================================== --- head/sys/dev/ahci/ahci_mv_fdt.c Mon Oct 2 01:03:18 2017 (r324185) +++ head/sys/dev/ahci/ahci_mv_fdt.c Mon Oct 2 02:58:28 2017 (r324186) @@ -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, Modified: head/sys/dev/ahci/ahci_pci.c ============================================================================== --- head/sys/dev/ahci/ahci_pci.c Mon Oct 2 01:03:18 2017 (r324185) +++ head/sys/dev/ahci/ahci_pci.c Mon Oct 2 02:58:28 2017 (r324186) @@ -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),
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710020258.v922wSTU089643>