diff options
author | Jiri Kosina <jkosina@suse.cz> | 2017-09-05 11:07:05 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2017-09-05 11:07:05 +0200 |
commit | b11918bdbe79bd002d00a9f1d78958167ccfad99 (patch) | |
tree | 931c5680a242041f49b07b20823012ae9bdb98c2 /virt/kvm/eventfd.c | |
parent | Merge branch 'for-4.14/asus' into for-linus (diff) | |
parent | HID: input: throttle battery uevents (diff) | |
download | linux-b11918bdbe79bd002d00a9f1d78958167ccfad99.tar.xz linux-b11918bdbe79bd002d00a9f1d78958167ccfad99.zip |
Merge branch 'for-4.14/battery' into for-linus
- support for batteries driven by HID input reports, from Dmitry Torokhov
Diffstat (limited to 'virt/kvm/eventfd.c')
-rw-r--r-- | virt/kvm/eventfd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c index 9120edf3c94b..f2ac53ab8243 100644 --- a/virt/kvm/eventfd.c +++ b/virt/kvm/eventfd.c @@ -825,7 +825,7 @@ static int kvm_assign_ioeventfd_idx(struct kvm *kvm, if (ret < 0) goto unlock_fail; - kvm->buses[bus_idx]->ioeventfd_count++; + kvm_get_bus(kvm, bus_idx)->ioeventfd_count++; list_add_tail(&p->list, &kvm->ioeventfds); mutex_unlock(&kvm->slots_lock); @@ -848,6 +848,7 @@ kvm_deassign_ioeventfd_idx(struct kvm *kvm, enum kvm_bus bus_idx, { struct _ioeventfd *p, *tmp; struct eventfd_ctx *eventfd; + struct kvm_io_bus *bus; int ret = -ENOENT; eventfd = eventfd_ctx_fdget(args->fd); @@ -870,8 +871,9 @@ kvm_deassign_ioeventfd_idx(struct kvm *kvm, enum kvm_bus bus_idx, continue; kvm_io_bus_unregister_dev(kvm, bus_idx, &p->dev); - if (kvm->buses[bus_idx]) - kvm->buses[bus_idx]->ioeventfd_count--; + bus = kvm_get_bus(kvm, bus_idx); + if (bus) + bus->ioeventfd_count--; ioeventfd_release(p); ret = 0; break; |