From 87fcba0177d0c53d6bb54a387e3724fc252929b1 Mon Sep 17 00:00:00 2001 From: gonzo Date: Sat, 24 Dec 2016 00:30:29 +0000 Subject: [PATCH] [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 --- sys/dev/spibus/spigen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/spibus/spigen.c b/sys/dev/spibus/spigen.c index ae9de97dda72..22b2fd2feee6 100644 --- a/sys/dev/spibus/spigen.c +++ b/sys/dev/spibus/spigen.c @@ -81,8 +81,10 @@ spigen_identify(driver_t *driver, device_t parent) 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 *);