Re: [PATCH] regmap: detach regmap from dev on regmap_exit

From: Mark Brown
Date: Mon Nov 25 2024 - 07:44:31 EST


On Fri, Nov 22, 2024 at 05:16:30PM +0200, Cosmin Tanislav wrote:

> +int regmap_detach_dev(struct device *dev, struct regmap *map)
> +{
> + if (!dev)
> + return 0;
> +
> + return devres_release(dev, dev_get_regmap_release,
> + dev_get_regmap_match, (void *)map->name);
> +}
> +EXPORT_SYMBOL_GPL(regmap_detach_dev);

Why is this exported?

> @@ -1445,6 +1457,7 @@ void regmap_exit(struct regmap *map)
> {
> struct regmap_async *async;
>
> + regmap_detach_dev(map->dev, map);
> regcache_exit(map);
>
> regmap_debugfs_exit(map);

The one caller is in the same file so it can be static.

Attachment: signature.asc
Description: PGP signature