df75b4ee211cd67460fcb5ff069f4909d55689ac
[openwrt.git] / target / linux / generic / patches-3.7 / 259-regmap_dynamic.patch
1 Index: linux-3.7.1/drivers/base/regmap/Kconfig
2 ===================================================================
3 --- linux-3.7.1.orig/drivers/base/regmap/Kconfig        2012-12-17 20:14:54.000000000 +0100
4 +++ linux-3.7.1/drivers/base/regmap/Kconfig     2013-01-05 01:07:25.712704474 +0100
5 @@ -3,20 +3,23 @@
6  # subsystems should select the appropriate symbols.
7  
8  config REGMAP
9 -       default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_MMIO || REGMAP_IRQ)
10         select LZO_COMPRESS
11         select LZO_DECOMPRESS
12         select IRQ_DOMAIN if REGMAP_IRQ
13 -       bool
14 +       tristate "Regmap"
15  
16  config REGMAP_I2C
17 -       tristate
18 +       select REGMAP
19 +       tristate "Regmap I2C"
20  
21  config REGMAP_SPI
22 -       tristate
23 +       select REGMAP
24 +       tristate "Regmap SPI"
25  
26  config REGMAP_MMIO
27 +       select REGMAP
28         tristate
29  
30  config REGMAP_IRQ
31 +       select REGMAP
32         bool
33 Index: linux-3.7.1/include/linux/regmap.h
34 ===================================================================
35 --- linux-3.7.1.orig/include/linux/regmap.h     2012-12-17 20:14:54.000000000 +0100
36 +++ linux-3.7.1/include/linux/regmap.h  2013-01-05 01:03:32.012694484 +0100
37 @@ -43,7 +43,7 @@
38         unsigned int def;
39  };
40  
41 -#ifdef CONFIG_REGMAP
42 +#if IS_ENABLED(CONFIG_REGMAP)
43  
44  enum regmap_endian {
45         /* Unspecified -> 0 -> Backwards compatible default */
46 Index: linux-3.7.1/drivers/base/regmap/Makefile
47 ===================================================================
48 --- linux-3.7.1.orig/drivers/base/regmap/Makefile       2012-12-17 20:14:54.000000000 +0100
49 +++ linux-3.7.1/drivers/base/regmap/Makefile    2013-01-05 01:08:16.592706650 +0100
50 @@ -1,6 +1,8 @@
51 -obj-$(CONFIG_REGMAP) += regmap.o regcache.o
52 -obj-$(CONFIG_REGMAP) += regcache-rbtree.o regcache-lzo.o
53 -obj-$(CONFIG_DEBUG_FS) += regmap-debugfs.o
54 +regmap-core-objs = regmap.o regcache.o regcache-rbtree.o regcache-lzo.o
55 +ifdef CONFIG_DEBUG_FS
56 +regmap-core-objs += regmap-debugfs.o
57 +endif
58 +obj-$(CONFIG_REGMAP) += regmap-core.o
59  obj-$(CONFIG_REGMAP_I2C) += regmap-i2c.o
60  obj-$(CONFIG_REGMAP_SPI) += regmap-spi.o
61  obj-$(CONFIG_REGMAP_MMIO) += regmap-mmio.o