Skip to content

Commit

Permalink
regmap: Remove the redundant config to select hwspinlock
Browse files Browse the repository at this point in the history
The hwspinlock was changed to a bool by commit d048236
("hwspinlock: Change hwspinlock to a bool"), so we do not need
the REGMAP_HWSPINLOCK config to select hwspinlock or not.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Baolin Wang authored and Mark Brown committed Nov 29, 2017
1 parent 4fbd8d1 commit a1a68fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
4 changes: 0 additions & 4 deletions drivers/base/regmap/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
config REGMAP
default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_W1 || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ)
select IRQ_DOMAIN if REGMAP_IRQ
select REGMAP_HWSPINLOCK if HWSPINLOCK=y
bool

config REGCACHE_COMPRESSED
Expand Down Expand Up @@ -38,6 +37,3 @@ config REGMAP_MMIO

config REGMAP_IRQ
bool

config REGMAP_HWSPINLOCK
bool
11 changes: 2 additions & 9 deletions drivers/base/regmap/regmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,6 @@ static unsigned int regmap_parse_64_native(const void *buf)
}
#endif

#ifdef REGMAP_HWSPINLOCK
static void regmap_lock_hwlock(void *__map)
{
struct regmap *map = __map;
Expand Down Expand Up @@ -457,7 +456,6 @@ static void regmap_unlock_hwlock_irqrestore(void *__map)

hwspin_unlock_irqrestore(map->hwlock, &map->spinlock_flags);
}
#endif

static void regmap_lock_mutex(void *__map)
{
Expand Down Expand Up @@ -674,7 +672,6 @@ struct regmap *__regmap_init(struct device *dev,
map->unlock = config->unlock;
map->lock_arg = config->lock_arg;
} else if (config->hwlock_id) {
#ifdef REGMAP_HWSPINLOCK
map->hwlock = hwspin_lock_request_specific(config->hwlock_id);
if (!map->hwlock) {
ret = -ENXIO;
Expand All @@ -697,10 +694,6 @@ struct regmap *__regmap_init(struct device *dev,
}

map->lock_arg = map;
#else
ret = -EINVAL;
goto err_map;
#endif
} else {
if ((bus && bus->fast_io) ||
config->fast_io) {
Expand Down Expand Up @@ -1116,7 +1109,7 @@ struct regmap *__regmap_init(struct device *dev,
regmap_range_exit(map);
kfree(map->work_buf);
err_hwlock:
if (IS_ENABLED(REGMAP_HWSPINLOCK) && map->hwlock)
if (map->hwlock)
hwspin_lock_free(map->hwlock);
err_map:
kfree(map);
Expand Down Expand Up @@ -1305,7 +1298,7 @@ void regmap_exit(struct regmap *map)
kfree(async->work_buf);
kfree(async);
}
if (IS_ENABLED(REGMAP_HWSPINLOCK) && map->hwlock)
if (map->hwlock)
hwspin_lock_free(map->hwlock);
kfree(map);
}
Expand Down

0 comments on commit a1a68fc

Please sign in to comment.