mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-21 01:03:42 +00:00
make code less broken, only try to create unit 0 since there can only
be one, this will help prevent multipling devices if this driver is ever loaded/unloaded multiple times... Prodded by: julian
This commit is contained in:
parent
8559e0a291
commit
0ddcf11c52
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130402
|
@ -247,8 +247,10 @@ ichwd_identify(driver_t *driver, device_t parent)
|
|||
|
||||
/* good, add child to bus */
|
||||
if ((dev = device_find_child(parent, driver->name, 0)) == NULL)
|
||||
dev = BUS_ADD_CHILD(parent, 0, driver->name, -1);
|
||||
device_set_desc_copy(dev, id->desc);
|
||||
dev = BUS_ADD_CHILD(parent, 0, driver->name, 0);
|
||||
|
||||
if (dev != NULL)
|
||||
device_set_desc_copy(dev, id->desc);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
Loading…
Reference in a new issue