Merge remote-tracking branch 'regmap/for-5.10' into regmap-next
authorMark Brown <broonie@kernel.org>
Mon, 5 Oct 2020 17:53:24 +0000 (18:53 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 5 Oct 2020 17:53:24 +0000 (18:53 +0100)
1  2 
drivers/base/regmap/internal.h
drivers/base/regmap/regmap-debugfs.c
drivers/base/regmap/regmap.c

Simple merge
Simple merge
@@@ -707,12 -699,19 +719,15 @@@ struct regmap *__regmap_init(struct dev
                goto err;
        }
  
 -      if (config->name) {
 -              map->name = kstrdup_const(config->name, GFP_KERNEL);
 -              if (!map->name) {
 -                      ret = -ENOMEM;
 -                      goto err_map;
 -              }
 -      }
 +      ret = regmap_set_name(map, config);
 +      if (ret)
 +              goto err_map;
  
+       ret = -EINVAL; /* Later error paths rely on this */
        if (config->disable_locking) {
                map->lock = map->unlock = regmap_lock_unlock_none;
+               map->can_sleep = config->can_sleep;
                regmap_debugfs_disable(map);
        } else if (config->lock && config->unlock) {
                map->lock = config->lock;