Commit a1a68fca authored by Baolin Wang's avatar Baolin Wang Committed by Mark Brown

regmap: Remove the redundant config to select hwspinlock

The hwspinlock was changed to a bool by commit d048236d
("hwspinlock: Change hwspinlock to a bool"), so we do not need
the REGMAP_HWSPINLOCK config to select hwspinlock or not.
Signed-off-by: default avatarBaolin Wang <baolin.wang@linaro.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 4fbd8d19
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
config REGMAP config REGMAP
default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_W1 || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ) default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_W1 || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ)
select IRQ_DOMAIN if REGMAP_IRQ select IRQ_DOMAIN if REGMAP_IRQ
select REGMAP_HWSPINLOCK if HWSPINLOCK=y
bool bool
config REGCACHE_COMPRESSED config REGCACHE_COMPRESSED
...@@ -38,6 +37,3 @@ config REGMAP_MMIO ...@@ -38,6 +37,3 @@ config REGMAP_MMIO
config REGMAP_IRQ config REGMAP_IRQ
bool bool
config REGMAP_HWSPINLOCK
bool
...@@ -414,7 +414,6 @@ static unsigned int regmap_parse_64_native(const void *buf) ...@@ -414,7 +414,6 @@ static unsigned int regmap_parse_64_native(const void *buf)
} }
#endif #endif
#ifdef REGMAP_HWSPINLOCK
static void regmap_lock_hwlock(void *__map) static void regmap_lock_hwlock(void *__map)
{ {
struct regmap *map = __map; struct regmap *map = __map;
...@@ -457,7 +456,6 @@ static void regmap_unlock_hwlock_irqrestore(void *__map) ...@@ -457,7 +456,6 @@ static void regmap_unlock_hwlock_irqrestore(void *__map)
hwspin_unlock_irqrestore(map->hwlock, &map->spinlock_flags); hwspin_unlock_irqrestore(map->hwlock, &map->spinlock_flags);
} }
#endif
static void regmap_lock_mutex(void *__map) static void regmap_lock_mutex(void *__map)
{ {
...@@ -674,7 +672,6 @@ struct regmap *__regmap_init(struct device *dev, ...@@ -674,7 +672,6 @@ struct regmap *__regmap_init(struct device *dev,
map->unlock = config->unlock; map->unlock = config->unlock;
map->lock_arg = config->lock_arg; map->lock_arg = config->lock_arg;
} else if (config->hwlock_id) { } else if (config->hwlock_id) {
#ifdef REGMAP_HWSPINLOCK
map->hwlock = hwspin_lock_request_specific(config->hwlock_id); map->hwlock = hwspin_lock_request_specific(config->hwlock_id);
if (!map->hwlock) { if (!map->hwlock) {
ret = -ENXIO; ret = -ENXIO;
...@@ -697,10 +694,6 @@ struct regmap *__regmap_init(struct device *dev, ...@@ -697,10 +694,6 @@ struct regmap *__regmap_init(struct device *dev,
} }
map->lock_arg = map; map->lock_arg = map;
#else
ret = -EINVAL;
goto err_map;
#endif
} else { } else {
if ((bus && bus->fast_io) || if ((bus && bus->fast_io) ||
config->fast_io) { config->fast_io) {
...@@ -1116,7 +1109,7 @@ struct regmap *__regmap_init(struct device *dev, ...@@ -1116,7 +1109,7 @@ struct regmap *__regmap_init(struct device *dev,
regmap_range_exit(map); regmap_range_exit(map);
kfree(map->work_buf); kfree(map->work_buf);
err_hwlock: err_hwlock:
if (IS_ENABLED(REGMAP_HWSPINLOCK) && map->hwlock) if (map->hwlock)
hwspin_lock_free(map->hwlock); hwspin_lock_free(map->hwlock);
err_map: err_map:
kfree(map); kfree(map);
...@@ -1305,7 +1298,7 @@ void regmap_exit(struct regmap *map) ...@@ -1305,7 +1298,7 @@ void regmap_exit(struct regmap *map)
kfree(async->work_buf); kfree(async->work_buf);
kfree(async); kfree(async);
} }
if (IS_ENABLED(REGMAP_HWSPINLOCK) && map->hwlock) if (map->hwlock)
hwspin_lock_free(map->hwlock); hwspin_lock_free(map->hwlock);
kfree(map); kfree(map);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment