Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Dec 2016 00:30:29 +0000 (UTC)
From:      Oleksandr Tymoshenko <gonzo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r310492 - head/sys/dev/spibus
Message-ID:  <201612240030.uBO0UTTL019742@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gonzo
Date: Sat Dec 24 00:30:29 2016
New Revision: 310492
URL: https://svnweb.freebsd.org/changeset/base/310492

Log:
  [spigen] Fix spigen attaching as a driver for SPI devices nodes in FDT
  
  Return BUS_PROBE_NOWILDCARD in probe method to make sure that spigen
  attaches only to the device created in identify method.
  
  Before this change spigen probe method used to return 0 which meant it
  competed with other drivers to be attached to the devices created for
  child nodes of SPI bus node in FDT.
  
  Reported by:	Daniel Braniss
  MFC after:	1 week

Modified:
  head/sys/dev/spibus/spigen.c

Modified: head/sys/dev/spibus/spigen.c
==============================================================================
--- head/sys/dev/spibus/spigen.c	Fri Dec 23 23:14:53 2016	(r310491)
+++ head/sys/dev/spibus/spigen.c	Sat Dec 24 00:30:29 2016	(r310492)
@@ -81,8 +81,10 @@ spigen_identify(driver_t *driver, device
 static int
 spigen_probe(device_t dev)
 {
+
 	device_set_desc(dev, "SPI Generic IO");
-	return (0);
+
+	return (BUS_PROBE_NOWILDCARD);
 }
 
 static int spigen_open(struct cdev *, int, int, struct thread *);



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