kernel: move regmap bloat out of the kernel image if it is only being used in modules
[openwrt/svn-archive/archive.git] / target / linux / generic / patches-3.7 / 259-regmap_dynamic.patch
1 --- a/drivers/base/regmap/Kconfig
2 +++ b/drivers/base/regmap/Kconfig
3 @@ -3,20 +3,23 @@
4 # subsystems should select the appropriate symbols.
5
6 config REGMAP
7 - default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_MMIO || REGMAP_IRQ)
8 select LZO_COMPRESS
9 select LZO_DECOMPRESS
10 select IRQ_DOMAIN if REGMAP_IRQ
11 - bool
12 + tristate
13
14 config REGMAP_I2C
15 + select REGMAP
16 tristate
17
18 config REGMAP_SPI
19 + select REGMAP
20 tristate
21
22 config REGMAP_MMIO
23 + select REGMAP
24 tristate
25
26 config REGMAP_IRQ
27 + select REGMAP
28 bool
29 --- a/include/linux/regmap.h
30 +++ b/include/linux/regmap.h
31 @@ -43,7 +43,7 @@ struct reg_default {
32 unsigned int def;
33 };
34
35 -#ifdef CONFIG_REGMAP
36 +#if IS_ENABLED(CONFIG_REGMAP)
37
38 enum regmap_endian {
39 /* Unspecified -> 0 -> Backwards compatible default */