diff options
author | Mark Brown <broonie@kernel.org> | 2017-12-13 19:46:37 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-12-13 19:46:37 +0300 |
commit | 4045559c099998642e35d1444251c3bf042c7a4f (patch) | |
tree | 6a5cf332ae8f37382c8f31acf9a66a8a6fa78114 /drivers/base/regmap/regmap.c | |
parent | a1a68fcaf165a6ed202d8e29a692c559e10106c4 (diff) | |
parent | 72465736adf2aade263a9475a1d42007fd49e703 (diff) | |
download | linux-4045559c099998642e35d1444251c3bf042c7a4f.tar.xz |
Merge branches 'topic/hwspinlock' and 'topic/nolock' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into regmap-const
Diffstat (limited to 'drivers/base/regmap/regmap.c')
-rw-r--r-- | drivers/base/regmap/regmap.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index f25ab18ca057..496da7bc5e77 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -457,6 +457,11 @@ static void regmap_unlock_hwlock_irqrestore(void *__map) hwspin_unlock_irqrestore(map->hwlock, &map->spinlock_flags); } +static void regmap_lock_unlock_none(void *__map) +{ + +} + static void regmap_lock_mutex(void *__map) { struct regmap *map = __map; @@ -667,7 +672,10 @@ struct regmap *__regmap_init(struct device *dev, goto err; } - if (config->lock && config->unlock) { + if (config->disable_locking) { + map->lock = map->unlock = regmap_lock_unlock_none; + regmap_debugfs_disable(map); + } else if (config->lock && config->unlock) { map->lock = config->lock; map->unlock = config->unlock; map->lock_arg = config->lock_arg; |