From: 陈恒明 Date: Tue, 19 Jul 2011 09:57:31 +0000 (+0800) Subject: rk29: vpu_service: fix bug when __cancel_delayed_work and delay work run at the same... X-Git-Tag: firefly_0821_release~10110^2~2^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c41dd263406cad12ec15d39986a530be1d23ad11;p=firefly-linux-kernel-4.4.55.git rk29: vpu_service: fix bug when __cancel_delayed_work and delay work run at the same time if in inturrept use async interface else use sync interface --- diff --git a/arch/arm/mach-rk29/vpu_service.c b/arch/arm/mach-rk29/vpu_service.c index b0d08b29967d..35c64a99815d 100644 --- a/arch/arm/mach-rk29/vpu_service.c +++ b/arch/arm/mach-rk29/vpu_service.c @@ -391,7 +391,11 @@ static void try_set_reg(void) ((VPU_PP == reg->type) && (NULL == service.reg_pproc)) || ((VPU_ENC == reg->type) && (NULL == service.reg_codec))) { reg_from_wait_to_run(reg); - __cancel_delayed_work(&vpu_service_power_off_work); + if (in_interrupt()) { + __cancel_delayed_work(&vpu_service_power_off_work); + } else { + cancel_delayed_work(&vpu_service_power_off_work); + } vpu_service_power_on(); reg_copy_to_hw(reg); }