Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Nov 2013 16:08:24 +0000 (UTC)
From:      Luiz Otavio O Souza <loos@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r258050 - head/sys/dev/gpio
Message-ID:  <201311121608.rACG8O3C004230@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: loos
Date: Tue Nov 12 16:08:23 2013
New Revision: 258050
URL: http://svnweb.freebsd.org/changeset/base/258050

Log:
  Fix gpiobus to return BUS_PROBE_GENERIC insted of BUS_PROBE_SPECIFIC (0) so
  it can be overriden by its OFW/FDT version.
  
  Give a chance for GPIO devices that implement the device_identify method to
  attach.
  
  Approved by:	adrian (mentor)

Modified:
  head/sys/dev/gpio/gpiobus.c

Modified: head/sys/dev/gpio/gpiobus.c
==============================================================================
--- head/sys/dev/gpio/gpiobus.c	Tue Nov 12 15:09:28 2013	(r258049)
+++ head/sys/dev/gpio/gpiobus.c	Tue Nov 12 16:08:23 2013	(r258050)
@@ -175,7 +175,8 @@ static int
 gpiobus_probe(device_t dev)
 {
 	device_set_desc(dev, "GPIO bus");
-	return (0);
+
+	return (BUS_PROBE_GENERIC);
 }
 
 static int
@@ -209,7 +210,9 @@ gpiobus_attach(device_t dev)
 	/*
 	 * Get parent's pins and mark them as unmapped
 	 */
+	bus_generic_probe(dev);
 	bus_enumerate_hinted_children(dev);
+
 	return (bus_generic_attach(dev));
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311121608.rACG8O3C004230>