[RFC] memory: exynos5422-dmc: Document mutex scope

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Document scope of the mutex used by driver.

Signed-off-by: Krzysztof Kozlowski <krzk@xxxxxxxxxx>

---

It seems mutex was introduced to protect:
1. setting actual frequency/voltage,
2. dmc->curr_rate (in exynos5_dmc_get_cur_freq()).

However dmc->curr_rate in exynos5_dmc_get_status() is not protected. Is
it a bug?
---
 drivers/memory/samsung/exynos5422-dmc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/memory/samsung/exynos5422-dmc.c b/drivers/memory/samsung/exynos5422-dmc.c
index 93e9c2429c0d..0388066a7d96 100644
--- a/drivers/memory/samsung/exynos5422-dmc.c
+++ b/drivers/memory/samsung/exynos5422-dmc.c
@@ -114,6 +114,7 @@ struct exynos5_dmc {
 	void __iomem *base_drexi0;
 	void __iomem *base_drexi1;
 	struct regmap *clk_regmap;
+	/* Protects curr_rate and frequency/voltage setting section */
 	struct mutex lock;
 	unsigned long curr_rate;
 	unsigned long curr_volt;
-- 
2.17.1




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux