device_delete Remove subdevices from global dev hash table
This commit is contained in:
@@ -135,6 +135,13 @@ void device_delete(const char* key, struct proc* proc, struct reschedule_ctx* rc
|
||||
|
||||
list_remove(device->subdevices, &subdevice->subdevices_link);
|
||||
|
||||
size_t sd_key_len = strlen_null(subdevice->key);
|
||||
uint32_t sd_hash = hash_fnv32(subdevice->key, sd_key_len);
|
||||
|
||||
hash_delete(&device_table, subdevice->key, sd_key_len, sd_hash,
|
||||
lengthof(device_table.device_buckets), device_buckets, struct device,
|
||||
device_table_link, key, found_link);
|
||||
|
||||
device->fini(subdevice, proc, rctx);
|
||||
|
||||
spin_unlock(&subdevice->lock, fsd);
|
||||
|
||||
Reference in New Issue
Block a user