linux-stable/drivers/base/regmap
Cosmin Tanislav 3061e17038
regmap: detach regmap from dev on regmap_exit
At the end of __regmap_init(), if dev is not NULL, regmap_attach_dev()
is called, which adds a devres reference to the regmap, to be able to
retrieve a dev's regmap by name using dev_get_regmap().

When calling regmap_exit, the opposite does not happen, and the
reference is kept until the dev is detached.

Add a regmap_detach_dev() function and call it in regmap_exit() to make
sure that the devres reference is not kept.

Cc: stable@vger.kernel.org
Fixes: 72b39f6f2b ("regmap: Implement dev_get_regmap()")
Signed-off-by: Cosmin Tanislav <demonsingur@gmail.com>
Rule: add
Link: https://lore.kernel.org/stable/20241128130554.362486-1-demonsingur%40gmail.com
Link: https://patch.msgid.link/20241128131625.363835-1-demonsingur@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-12-02 00:29:31 +00:00
..
internal.h regmap: maple: Provide lockdep (sub)class for maple tree's internal lock 2024-10-31 17:24:19 +00:00
Kconfig regmap: Provide user selectable option to enable regmap 2023-07-13 16:20:28 +01:00
Makefile regmap: Provide a ram backed regmap with raw support 2023-06-12 14:47:54 +01:00
regcache-flat.c regcache: use map->alloc_flags also for allocating cache 2024-08-28 13:52:29 +01:00
regcache-maple.c regmap: maple: Provide lockdep (sub)class for maple tree's internal lock 2024-10-31 17:24:19 +00:00
regcache-rbtree.c regcache: use map->alloc_flags also for allocating cache 2024-08-28 13:52:29 +01:00
regcache.c regmap: Hold the regmap lock when allocating and freeing the cache 2024-08-23 11:03:11 +01:00
regmap-ac97.c regmap: add missing MODULE_DESCRIPTION() macros 2024-06-24 13:38:40 +01:00
regmap-debugfs.c mm, treewide: rename MAX_ORDER to MAX_PAGE_ORDER 2024-01-08 15:27:15 -08:00
regmap-fsi.c regmap: Add FSI bus support 2022-11-25 19:17:02 +00:00
regmap-i2c.c regmap-i2c: add missing MODULE_DESCRIPTION() macro 2024-06-14 15:23:14 +01:00
regmap-i3c.c regmap: Drop capitalisation in MODULE_DESCRIPTION() 2024-04-10 22:45:52 +01:00
regmap-irq.c regmap: irq: Set lockdep class for hierarchical IRQ domains 2024-11-01 18:57:59 +00:00
regmap-kunit.c regmap: kunit: Fix repeated test param 2024-10-29 18:56:49 +00:00
regmap-mdio.c regmap: Drop capitalisation in MODULE_DESCRIPTION() 2024-04-10 22:45:52 +01:00
regmap-mmio.c regmap: mmio: Remove unused 64-bit support code 2023-07-09 22:48:46 +01:00
regmap-ram.c regmap: add missing MODULE_DESCRIPTION() macros 2024-06-24 13:38:40 +01:00
regmap-raw-ram.c regmap: add missing MODULE_DESCRIPTION() macros 2024-06-24 13:38:40 +01:00
regmap-sccb.c regmap: add missing MODULE_DESCRIPTION() macros 2024-06-24 13:38:40 +01:00
regmap-sdw-mbq.c regmap: Drop capitalisation in MODULE_DESCRIPTION() 2024-04-10 22:45:52 +01:00
regmap-sdw.c regmap: Drop capitalisation in MODULE_DESCRIPTION() 2024-04-10 22:45:52 +01:00
regmap-slimbus.c regmap: add missing MODULE_DESCRIPTION() macros 2024-06-24 13:38:40 +01:00
regmap-spi-avmm.c regmap: add missing MODULE_DESCRIPTION() macros 2024-06-24 13:38:40 +01:00
regmap-spi.c regmap: spi: Fix potential off-by-one when calculating reserved size 2024-06-05 22:23:52 +01:00
regmap-spmi.c regmap: add missing MODULE_DESCRIPTION() macros 2024-06-24 13:38:40 +01:00
regmap-w1.c regmap: add missing MODULE_DESCRIPTION() macros 2024-06-24 13:38:40 +01:00
regmap.c regmap: detach regmap from dev on regmap_exit 2024-12-02 00:29:31 +00:00
trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00