From 9c76cd21b9c935645f9b4c61edfd1e8b5d0cbe4a Mon Sep 17 00:00:00 2001 From: Finley Xiao Date: Tue, 2 May 2017 20:30:13 +0800 Subject: [PATCH] PM / devfreq: rockchip_dmc: add mutex lock for pmu register As dmc may also assess register PMU_BUS_IDLE_REQ, we should prevent pd driver and dmc driver assessing this register at the same time. Change-Id: I546033536c87dcf497774cbc6c8f36a3e651ff07 Signed-off-by: Finley Xiao --- drivers/devfreq/rockchip_dmc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/devfreq/rockchip_dmc.c b/drivers/devfreq/rockchip_dmc.c index dce8b4d945c1..8e0db7368a1a 100644 --- a/drivers/devfreq/rockchip_dmc.c +++ b/drivers/devfreq/rockchip_dmc.c @@ -30,6 +30,7 @@ #include #include +#include #include #include @@ -653,6 +654,9 @@ static int rockchip_dmcfreq_probe(struct platform_device *pdev) data->dev = dev; platform_set_drvdata(pdev, data); + if (rockchip_pm_register_notify_to_dmc(data->devfreq)) + dev_err(dev, "pd fail to register notify to dmc\n"); + if (vop_register_dmc()) dev_err(dev, "fail to register notify to vop.\n"); -- 2.34.1