Commit 5339a2ae authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull regmap updates from Mark Brown:
 "A very quiet release for regmap this time, just two cleanup patches
  and one almost cleanup patch which saves individual MMIO regmaps
  flagging themselves as having fast I/O"

* tag 'regmap-v6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
  regmap: Annotate that MMIO implies fast IO
  regmap: get rid of redundant debugfs_file_{get,put}()
  regmap: kunit: Constify regmap_range_cfg array
parents ffec878f ffc72771
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -470,10 +470,6 @@ static ssize_t regmap_cache_only_write_file(struct file *file,
	if (err)
		return count;

	err = debugfs_file_get(file->f_path.dentry);
	if (err)
		return err;

	map->lock(map->lock_arg);

	if (new_val && !map->cache_only) {
@@ -486,7 +482,6 @@ static ssize_t regmap_cache_only_write_file(struct file *file,
	map->cache_only = new_val;

	map->unlock(map->lock_arg);
	debugfs_file_put(file->f_path.dentry);

	if (require_sync) {
		err = regcache_sync(map);
@@ -517,10 +512,6 @@ static ssize_t regmap_cache_bypass_write_file(struct file *file,
	if (err)
		return count;

	err = debugfs_file_get(file->f_path.dentry);
	if (err)
		return err;

	map->lock(map->lock_arg);

	if (new_val && !map->cache_bypass) {
@@ -532,7 +523,6 @@ static ssize_t regmap_cache_bypass_write_file(struct file *file,
	map->cache_bypass = new_val;

	map->unlock(map->lock_arg);
	debugfs_file_put(file->f_path.dentry);

	return count;
}
+1 −1
Original line number Diff line number Diff line
@@ -736,7 +736,7 @@ static void stride(struct kunit *test)
	}
}

static struct regmap_range_cfg test_range = {
static const struct regmap_range_cfg test_range = {
	.selector_reg = 1,
	.selector_mask = 0xff,

+4 −4
Original line number Diff line number Diff line
@@ -913,7 +913,7 @@ int regmap_attach_dev(struct device *dev, struct regmap *map,
 * @config: Configuration for register map
 *
 * The return value will be an ERR_PTR() on error or a valid pointer to
 * a struct regmap.
 * a struct regmap. Implies 'fast_io'.
 */
#define regmap_init_mmio_clk(dev, clk_id, regs, config)			\
	__regmap_lockdep_wrapper(__regmap_init_mmio_clk, #config,	\
@@ -927,7 +927,7 @@ int regmap_attach_dev(struct device *dev, struct regmap *map,
 * @config: Configuration for register map
 *
 * The return value will be an ERR_PTR() on error or a valid pointer to
 * a struct regmap.
 * a struct regmap. Implies 'fast_io'.
 */
#define regmap_init_mmio(dev, regs, config)		\
	regmap_init_mmio_clk(dev, NULL, regs, config)
@@ -1138,7 +1138,7 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
 *
 * The return value will be an ERR_PTR() on error or a valid pointer
 * to a struct regmap.  The regmap will be automatically freed by the
 * device management code.
 * device management code. Implies 'fast_io'.
 */
#define devm_regmap_init_mmio_clk(dev, clk_id, regs, config)		\
	__regmap_lockdep_wrapper(__devm_regmap_init_mmio_clk, #config,	\
@@ -1153,7 +1153,7 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
 *
 * The return value will be an ERR_PTR() on error or a valid pointer
 * to a struct regmap.  The regmap will be automatically freed by the
 * device management code.
 * device management code. Implies 'fast_io'.
 */
#define devm_regmap_init_mmio(dev, regs, config)		\
	devm_regmap_init_mmio_clk(dev, NULL, regs, config)