[RFC] memory: exynos5422-dmc: Document mutex scope
Krzysztof Kozlowski
krzk at kernel.org
Fri Jul 24 14:08:57 EDT 2020
Document scope of the mutex used by driver.
Signed-off-by: Krzysztof Kozlowski <krzk at kernel.org>
---
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
More information about the linux-arm-kernel
mailing list