[PATCH 5.15.y] regmap: fix wrong backport

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

 



f373a1898175 ("regmap: detach regmap from dev on regmap_exit")
wrongly backported upstream commit 3061e170381a.

It should patch regmap_exit() instead of regmap_reinit_cache().

Fixes: f373a1898175 ("regmap: detach regmap from dev on regmap_exit")
Signed-off-by: Tzung-Bi Shih <tzungbi@xxxxxxxxxx>
---
 drivers/base/regmap/regmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 00437ed9d5e0..6d94ad8bf1eb 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -1508,7 +1508,6 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config)
 {
 	int ret;
 
-	regmap_detach_dev(map->dev, map);
 	regcache_exit(map);
 	regmap_debugfs_exit(map);
 
@@ -1543,6 +1542,7 @@ void regmap_exit(struct regmap *map)
 {
 	struct regmap_async *async;
 
+	regmap_detach_dev(map->dev, map);
 	regcache_exit(map);
 	regmap_debugfs_exit(map);
 	regmap_range_exit(map);
-- 
2.48.0.rc2.279.g1de40edade-goog





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux