svn commit: r355461 - head/sys/arm/mv

Luiz Otavio O Souza loos at FreeBSD.org
Fri Dec 6 20:05:08 UTC 2019


Author: loos
Date: Fri Dec  6 20:05:08 2019
New Revision: 355461
URL: https://svnweb.freebsd.org/changeset/base/355461

Log:
  Fix the ARM64 build, include the necessary <sys/mutex.h> header.
  
  While here, call device_delete_children() to detach and dealloc all the
  existent children and handle the child's detach errors properly.
  
  Reported by:	jenkins, hselasky, ian
  Sponsored by:	Rubicon Communications, LLC (Netgate)

Modified:
  head/sys/arm/mv/a37x0_spi.c

Modified: head/sys/arm/mv/a37x0_spi.c
==============================================================================
--- head/sys/arm/mv/a37x0_spi.c	Fri Dec  6 19:33:39 2019	(r355460)
+++ head/sys/arm/mv/a37x0_spi.c	Fri Dec  6 20:05:08 2019	(r355461)
@@ -29,9 +29,9 @@ __FBSDID("$FreeBSD$");
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/bus.h>
-
 #include <sys/kernel.h>
 #include <sys/module.h>
+#include <sys/mutex.h>
 #include <sys/rman.h>
 
 #include <machine/bus.h>
@@ -228,9 +228,11 @@ a37x0_spi_attach(device_t dev)
 static int
 a37x0_spi_detach(device_t dev)
 {
+	int err;
 	struct a37x0_spi_softc *sc;
 
-	bus_generic_detach(dev);
+	if ((err = device_delete_children(dev)) != 0)
+		return (err);
 	sc = device_get_softc(dev);
 	mtx_destroy(&sc->sc_mtx);
 	if (sc->sc_intrhand)


More information about the svn-src-head mailing list