Fix device list of drivers in use

This commit is contained in:
PaulStoffregen 2017-10-08 03:35:20 -07:00
parent a1cde4e568
commit 2b0fda8a11
1 changed files with 1 additions and 4 deletions

View File

@ -344,11 +344,8 @@ void USBHost::claim_drivers(Device_t *dev)
available_drivers = driver->next;
}
// add to list of drivers using this device
if (dev->drivers) {
dev->drivers->next = driver;
}
driver->next = dev->drivers;
dev->drivers = driver;
driver->next = NULL;
driver->device = dev;
// not done, may be more interface for more drivers
}