Lines Matching refs:new_bus
2354 struct kvm_io_bus *new_bus, *bus; in kvm_io_bus_register_dev() local
2360 new_bus = kzalloc(sizeof(struct kvm_io_bus), GFP_KERNEL); in kvm_io_bus_register_dev()
2361 if (!new_bus) in kvm_io_bus_register_dev()
2363 memcpy(new_bus, bus, sizeof(struct kvm_io_bus)); in kvm_io_bus_register_dev()
2364 new_bus->devs[new_bus->dev_count++] = dev; in kvm_io_bus_register_dev()
2365 rcu_assign_pointer(kvm->buses[bus_idx], new_bus); in kvm_io_bus_register_dev()
2377 struct kvm_io_bus *new_bus, *bus; in kvm_io_bus_unregister_dev() local
2379 new_bus = kzalloc(sizeof(struct kvm_io_bus), GFP_KERNEL); in kvm_io_bus_unregister_dev()
2380 if (!new_bus) in kvm_io_bus_unregister_dev()
2384 memcpy(new_bus, bus, sizeof(struct kvm_io_bus)); in kvm_io_bus_unregister_dev()
2387 for (i = 0; i < new_bus->dev_count; i++) in kvm_io_bus_unregister_dev()
2388 if (new_bus->devs[i] == dev) { in kvm_io_bus_unregister_dev()
2390 new_bus->devs[i] = new_bus->devs[--new_bus->dev_count]; in kvm_io_bus_unregister_dev()
2395 kfree(new_bus); in kvm_io_bus_unregister_dev()
2399 rcu_assign_pointer(kvm->buses[bus_idx], new_bus); in kvm_io_bus_unregister_dev()