From: Finley Xiao Date: Wed, 2 Aug 2017 08:19:50 +0000 (+0800) Subject: drm/rockchip: vop: Fix unregister devfreq notifier unsuccessfully X-Git-Tag: release-20171130_firefly~4^2~46 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b260ef595ebe0477ea65cc5e4109b760c9535a58;p=firefly-linux-kernel-4.4.55.git drm/rockchip: vop: Fix unregister devfreq notifier unsuccessfully Change-Id: I0d1e02eea2af59d63ea2948e14277aa6ad9955b6 Signed-off-by: Finley Xiao --- diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 7b4e9ac48956..c2a7b9fe3161 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -3236,13 +3236,13 @@ static int vop_bind(struct device *dev, struct device *master, void *data) for (i = 0; i < ARRAY_SIZE(dmc_vop); i++) { if (dmc_vop[i]) continue; - dmc_vop[i] = vop; if (devfreq_vop) { - dmc_vop[i]->dmc_nb.notifier_call = dmc_notifier_call; + vop->dmc_nb.notifier_call = dmc_notifier_call; devfreq_register_notifier(devfreq_vop, - &dmc_vop[i]->dmc_nb, + &vop->dmc_nb, DEVFREQ_TRANSITION_NOTIFIER); } + dmc_vop[i] = vop; break; } @@ -3265,7 +3265,8 @@ static void vop_unbind(struct device *dev, struct device *master, void *data) if (!devfreq_vop) break; - devfreq_unregister_notifier(devfreq_vop, &dmc_vop[i]->dmc_nb, + devfreq_unregister_notifier(devfreq_vop, + &vop->dmc_nb, DEVFREQ_TRANSITION_NOTIFIER); break; }