[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
This commit is contained in:
Oleksandr Tymoshenko 2016-12-24 00:30:29 +00:00
parent b2fc0141d9
commit 32d7412741

View File

@ -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 *);