Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regmap: Remove the redundant config to select hwspinlock

The hwspinlock was changed to a bool by commit d048236dfdfe
("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>

authored by

Baolin Wang and committed by
Mark Brown
a1a68fca 4fbd8d19

+2 -13
-4
drivers/base/regmap/Kconfig
··· 6 6 config REGMAP 7 7 default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_W1 || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ) 8 8 select IRQ_DOMAIN if REGMAP_IRQ 9 - select REGMAP_HWSPINLOCK if HWSPINLOCK=y 10 9 bool 11 10 12 11 config REGCACHE_COMPRESSED ··· 36 37 tristate 37 38 38 39 config REGMAP_IRQ 39 - bool 40 - 41 - config REGMAP_HWSPINLOCK 42 40 bool
+2 -9
drivers/base/regmap/regmap.c
··· 414 414 } 415 415 #endif 416 416 417 - #ifdef REGMAP_HWSPINLOCK 418 417 static void regmap_lock_hwlock(void *__map) 419 418 { 420 419 struct regmap *map = __map; ··· 456 457 457 458 hwspin_unlock_irqrestore(map->hwlock, &map->spinlock_flags); 458 459 } 459 - #endif 460 460 461 461 static void regmap_lock_mutex(void *__map) 462 462 { ··· 672 674 map->unlock = config->unlock; 673 675 map->lock_arg = config->lock_arg; 674 676 } else if (config->hwlock_id) { 675 - #ifdef REGMAP_HWSPINLOCK 676 677 map->hwlock = hwspin_lock_request_specific(config->hwlock_id); 677 678 if (!map->hwlock) { 678 679 ret = -ENXIO; ··· 694 697 } 695 698 696 699 map->lock_arg = map; 697 - #else 698 - ret = -EINVAL; 699 - goto err_map; 700 - #endif 701 700 } else { 702 701 if ((bus && bus->fast_io) || 703 702 config->fast_io) { ··· 1109 1116 regmap_range_exit(map); 1110 1117 kfree(map->work_buf); 1111 1118 err_hwlock: 1112 - if (IS_ENABLED(REGMAP_HWSPINLOCK) && map->hwlock) 1119 + if (map->hwlock) 1113 1120 hwspin_lock_free(map->hwlock); 1114 1121 err_map: 1115 1122 kfree(map); ··· 1298 1305 kfree(async->work_buf); 1299 1306 kfree(async); 1300 1307 } 1301 - if (IS_ENABLED(REGMAP_HWSPINLOCK) && map->hwlock) 1308 + if (map->hwlock) 1302 1309 hwspin_lock_free(map->hwlock); 1303 1310 kfree(map); 1304 1311 }