svn commit: r331493 - in stable/11/sys: arm/allwinner arm/freescale/imx arm/nvidia dev/ahci

Ian Lepore ian at FreeBSD.org
Sat Mar 24 18:42:47 UTC 2018


Author: ian
Date: Sat Mar 24 18:42:45 2018
New Revision: 331493
URL: https://svnweb.freebsd.org/changeset/base/331493

Log:
  MFC r324186:
  
  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:
  stable/11/sys/arm/allwinner/a10_ahci.c
  stable/11/sys/arm/freescale/imx/imx6_ahci.c
  stable/11/sys/arm/nvidia/tegra_ahci.c
  stable/11/sys/dev/ahci/ahci.c
  stable/11/sys/dev/ahci/ahci.h
  stable/11/sys/dev/ahci/ahci_pci.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/arm/allwinner/a10_ahci.c
==============================================================================
--- stable/11/sys/arm/allwinner/a10_ahci.c	Sat Mar 24 18:06:34 2018	(r331492)
+++ stable/11/sys/arm/allwinner/a10_ahci.c	Sat Mar 24 18:42:45 2018	(r331493)
@@ -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: stable/11/sys/arm/freescale/imx/imx6_ahci.c
==============================================================================
--- stable/11/sys/arm/freescale/imx/imx6_ahci.c	Sat Mar 24 18:06:34 2018	(r331492)
+++ stable/11/sys/arm/freescale/imx/imx6_ahci.c	Sat Mar 24 18:42:45 2018	(r331493)
@@ -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: stable/11/sys/arm/nvidia/tegra_ahci.c
==============================================================================
--- stable/11/sys/arm/nvidia/tegra_ahci.c	Sat Mar 24 18:06:34 2018	(r331492)
+++ stable/11/sys/arm/nvidia/tegra_ahci.c	Sat Mar 24 18:42:45 2018	(r331493)
@@ -619,8 +619,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: stable/11/sys/dev/ahci/ahci.c
==============================================================================
--- stable/11/sys/dev/ahci/ahci.c	Sat Mar 24 18:06:34 2018	(r331492)
+++ stable/11/sys/dev/ahci/ahci.c	Sat Mar 24 18:42:45 2018	(r331493)
@@ -2740,5 +2740,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: stable/11/sys/dev/ahci/ahci.h
==============================================================================
--- stable/11/sys/dev/ahci/ahci.h	Sat Mar 24 18:06:34 2018	(r331492)
+++ stable/11/sys/dev/ahci/ahci.h	Sat Mar 24 18:42:45 2018	(r331493)
@@ -648,3 +648,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: stable/11/sys/dev/ahci/ahci_pci.c
==============================================================================
--- stable/11/sys/dev/ahci/ahci_pci.c	Sat Mar 24 18:06:34 2018	(r331492)
+++ stable/11/sys/dev/ahci/ahci_pci.c	Sat Mar 24 18:42:45 2018	(r331493)
@@ -642,7 +642,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),


More information about the svn-src-all mailing list