diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2021-01-08 00:06:52 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-01-08 00:06:52 +0100 |
commit | bc351f07260533cc1b3987339551decd00ddd52e (patch) | |
tree | 3b6f396681f08dacc8dd24ce2c586ea2195e825d /drivers/thunderbolt/icm.c | |
parent | KVM: SVM: fix 32-bit compilation (diff) | |
parent | KVM: x86/mmu: Optimize not-present/MMIO SPTE check in get_mmio_spte() (diff) | |
download | linux-bc351f07260533cc1b3987339551decd00ddd52e.tar.xz linux-bc351f07260533cc1b3987339551decd00ddd52e.zip |
Merge branch 'kvm-master' into kvm-next
Fixes to get_mmio_spte, destined to 5.10 stable branch.
Diffstat (limited to 'drivers/thunderbolt/icm.c')
-rw-r--r-- | drivers/thunderbolt/icm.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c index 977ba91f4d0e..82c46b200c34 100644 --- a/drivers/thunderbolt/icm.c +++ b/drivers/thunderbolt/icm.c @@ -1976,7 +1976,9 @@ static int complete_rpm(struct device *dev, void *data) static void remove_unplugged_switch(struct tb_switch *sw) { - pm_runtime_get_sync(sw->dev.parent); + struct device *parent = get_device(sw->dev.parent); + + pm_runtime_get_sync(parent); /* * Signal this and switches below for rpm_complete because @@ -1987,8 +1989,10 @@ static void remove_unplugged_switch(struct tb_switch *sw) bus_for_each_dev(&tb_bus_type, &sw->dev, NULL, complete_rpm); tb_switch_remove(sw); - pm_runtime_mark_last_busy(sw->dev.parent); - pm_runtime_put_autosuspend(sw->dev.parent); + pm_runtime_mark_last_busy(parent); + pm_runtime_put_autosuspend(parent); + + put_device(parent); } static void icm_free_unplugged_children(struct tb_switch *sw) |