mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-29 17:23:36 +00:00
regmap: Fixes for v6.13
A couple of small fixes, fixing an incorrect format specifier in a log message and adding missing cleanup of the devres data used to support dev_get_regmap() when a device is unregistered. -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmdTGowACgkQJNaLcl1U h9B2+Af/aBMFY6CLBtJ9TUXNZY6ikkbx9U5WVdltnwqSLr6gCy2MjMYbMUgY97xc z04Aw0xo+Wtz4jnKFz0FSAxIfHfSOkGBeZNlGWGah1dqCun0glNSQDDHWXkPFuMx TIZJQh2gg5cEykGD9IAgOjX0ZNKW6EjLZyNPwAkEa87ugceyiC6rM3AKVPuVU0g2 tsFBOrJpJ3dJJGGBpGgtjo8YgcEC0NnGSizbggAauY4uAM3E9eeTfNoXgRi/bMzS SLu20ER/5sF71VdzExoAy8j3JrBKUjemHyurTjn6AEbZ6k7WXZhjKSh6crNlxfl9 k2uaPL8VllPXsvaMUdfzG2MnDn1a7A== =IzC3 -----END PGP SIGNATURE----- Merge tag 'regmap-fix-v6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap fixes from Mark Brown: "A couple of small fixes, fixing an incorrect format specifier in a log message and adding missing cleanup of the devres data used to support dev_get_regmap() when a device is unregistered" * tag 'regmap-fix-v6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: detach regmap from dev on regmap_exit regmap: Use correct format specifier for logging range errors
This commit is contained in:
commit
d9e15b2516
@ -598,6 +598,17 @@ int regmap_attach_dev(struct device *dev, struct regmap *map,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(regmap_attach_dev);
|
||||
|
||||
static int dev_get_regmap_match(struct device *dev, void *res, void *data);
|
||||
|
||||
static 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);
|
||||
}
|
||||
|
||||
static enum regmap_endian regmap_get_reg_endian(const struct regmap_bus *bus,
|
||||
const struct regmap_config *config)
|
||||
{
|
||||
@ -1052,13 +1063,13 @@ struct regmap *__regmap_init(struct device *dev,
|
||||
|
||||
/* Sanity check */
|
||||
if (range_cfg->range_max < range_cfg->range_min) {
|
||||
dev_err(map->dev, "Invalid range %d: %d < %d\n", i,
|
||||
dev_err(map->dev, "Invalid range %d: %u < %u\n", i,
|
||||
range_cfg->range_max, range_cfg->range_min);
|
||||
goto err_range;
|
||||
}
|
||||
|
||||
if (range_cfg->range_max > map->max_register) {
|
||||
dev_err(map->dev, "Invalid range %d: %d > %d\n", i,
|
||||
dev_err(map->dev, "Invalid range %d: %u > %u\n", i,
|
||||
range_cfg->range_max, map->max_register);
|
||||
goto err_range;
|
||||
}
|
||||
@ -1445,6 +1456,7 @@ void regmap_exit(struct regmap *map)
|
||||
{
|
||||
struct regmap_async *async;
|
||||
|
||||
regmap_detach_dev(map->dev, map);
|
||||
regcache_exit(map);
|
||||
|
||||
regmap_debugfs_exit(map);
|
||||
|
Loading…
Reference in New Issue
Block a user