diff options
Diffstat (limited to 'hw/ppc')
-rw-r--r-- | hw/ppc/spapr_drc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c index 8c4997d795..98b626acf9 100644 --- a/hw/ppc/spapr_drc.c +++ b/hw/ppc/spapr_drc.c @@ -421,9 +421,8 @@ void spapr_drc_unplug_request(SpaprDrc *drc) int spapr_drc_unplug_timeout_remaining_sec(SpaprDrc *drc) { - if (drc->unplug_requested && timer_pending(drc->unplug_timeout_timer)) { - return (qemu_timeout_ns_to_ms(drc->unplug_timeout_timer->expire_time) - - qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL)) / 1000; + if (drc->unplug_requested) { + return timer_deadline_ms(drc->unplug_timeout_timer) / 1000; } return 0; |