kernel: port the regmap fix to 3.6 (#12749), refresh patches for other versions
[openwrt.git] / target / linux / generic / patches-3.3 / 270-regmap_dynamic.patch
1 --- a/drivers/base/regmap/Kconfig
2 +++ b/drivers/base/regmap/Kconfig
3 @@ -3,16 +3,17 @@
4  # subsystems should select the appropriate symbols.
5  
6  config REGMAP
7 -       default y if (REGMAP_I2C || REGMAP_SPI)
8         select LZO_COMPRESS
9         select LZO_DECOMPRESS
10 -       bool
11 +       tristate "Regmap"
12  
13  config REGMAP_I2C
14 -       tristate
15 +       select REGMAP
16 +       tristate "Regmap I2C"
17  
18  config REGMAP_SPI
19 -       tristate
20 +       select REGMAP
21 +       tristate "Regmap SPI"
22  
23  config REGMAP_IRQ
24         bool
25 --- a/drivers/base/regmap/Makefile
26 +++ b/drivers/base/regmap/Makefile
27 @@ -1,6 +1,8 @@
28 -obj-$(CONFIG_REGMAP) += regmap.o regcache.o
29 -obj-$(CONFIG_REGMAP) += regcache-rbtree.o regcache-lzo.o
30 -obj-$(CONFIG_DEBUG_FS) += regmap-debugfs.o
31 +regmap-core-objs = regmap.o regcache.o regcache-rbtree.o regcache-lzo.o
32 +ifdef CONFIG_DEBUGFS
33 +regmap-core-objs += regmap-debugfs.o
34 +endif
35 +obj-$(CONFIG_REGMAP) += regmap-core.o
36  obj-$(CONFIG_REGMAP_I2C) += regmap-i2c.o
37  obj-$(CONFIG_REGMAP_SPI) += regmap-spi.o
38  obj-$(CONFIG_REGMAP_IRQ) += regmap-irq.o