Skip to content

Commit 5339a2a

Browse files
committed
Merge tag 'regmap-v6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap
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
2 parents ffec878 + ffc7277 commit 5339a2a

File tree

3 files changed

+5
-15
lines changed

3 files changed

+5
-15
lines changed

drivers/base/regmap/regmap-debugfs.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -470,10 +470,6 @@ static ssize_t regmap_cache_only_write_file(struct file *file,
470470
if (err)
471471
return count;
472472

473-
err = debugfs_file_get(file->f_path.dentry);
474-
if (err)
475-
return err;
476-
477473
map->lock(map->lock_arg);
478474

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

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

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

520-
err = debugfs_file_get(file->f_path.dentry);
521-
if (err)
522-
return err;
523-
524515
map->lock(map->lock_arg);
525516

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

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

537527
return count;
538528
}

drivers/base/regmap/regmap-kunit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ static void stride(struct kunit *test)
736736
}
737737
}
738738

739-
static struct regmap_range_cfg test_range = {
739+
static const struct regmap_range_cfg test_range = {
740740
.selector_reg = 1,
741741
.selector_mask = 0xff,
742742

include/linux/regmap.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ int regmap_attach_dev(struct device *dev, struct regmap *map,
913913
* @config: Configuration for register map
914914
*
915915
* The return value will be an ERR_PTR() on error or a valid pointer to
916-
* a struct regmap.
916+
* a struct regmap. Implies 'fast_io'.
917917
*/
918918
#define regmap_init_mmio_clk(dev, clk_id, regs, config) \
919919
__regmap_lockdep_wrapper(__regmap_init_mmio_clk, #config, \
@@ -927,7 +927,7 @@ int regmap_attach_dev(struct device *dev, struct regmap *map,
927927
* @config: Configuration for register map
928928
*
929929
* The return value will be an ERR_PTR() on error or a valid pointer to
930-
* a struct regmap.
930+
* a struct regmap. Implies 'fast_io'.
931931
*/
932932
#define regmap_init_mmio(dev, regs, config) \
933933
regmap_init_mmio_clk(dev, NULL, regs, config)
@@ -1138,7 +1138,7 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
11381138
*
11391139
* The return value will be an ERR_PTR() on error or a valid pointer
11401140
* to a struct regmap. The regmap will be automatically freed by the
1141-
* device management code.
1141+
* device management code. Implies 'fast_io'.
11421142
*/
11431143
#define devm_regmap_init_mmio_clk(dev, clk_id, regs, config) \
11441144
__regmap_lockdep_wrapper(__devm_regmap_init_mmio_clk, #config, \
@@ -1153,7 +1153,7 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
11531153
*
11541154
* The return value will be an ERR_PTR() on error or a valid pointer
11551155
* to a struct regmap. The regmap will be automatically freed by the
1156-
* device management code.
1156+
* device management code. Implies 'fast_io'.
11571157
*/
11581158
#define devm_regmap_init_mmio(dev, regs, config) \
11591159
devm_regmap_init_mmio_clk(dev, NULL, regs, config)

0 commit comments

Comments
 (0)