kernel: stop patching -funit-at-a-time into CFLAGS, it has no effect on recent compilers
[openwrt/staging/yousong.git] / target / linux / generic / patches-3.6 / 270-regmap_dynamic.patch
1 --- a/drivers/base/regmap/Kconfig
2 +++ b/drivers/base/regmap/Kconfig
3 @@ -3,19 +3,21 @@
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 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 --- a/include/linux/regmap.h
28 +++ b/include/linux/regmap.h
29 @@ -43,7 +43,7 @@ struct reg_default {
30 unsigned int def;
31 };
32
33 -#ifdef CONFIG_REGMAP
34 +#if IS_ENABLED(CONFIG_REGMAP)
35
36 enum regmap_endian {
37 /* Unspecified -> 0 -> Backwards compatible default */
38 --- a/drivers/base/regmap/Makefile
39 +++ b/drivers/base/regmap/Makefile
40 @@ -1,6 +1,8 @@
41 -obj-$(CONFIG_REGMAP) += regmap.o regcache.o
42 -obj-$(CONFIG_REGMAP) += regcache-rbtree.o regcache-lzo.o
43 -obj-$(CONFIG_DEBUG_FS) += regmap-debugfs.o
44 +regmap-core-objs = regmap.o regcache.o regcache-rbtree.o regcache-lzo.o
45 +ifdef CONFIG_DEBUG_FS
46 +regmap-core-objs += regmap-debugfs.o
47 +endif
48 +obj-$(CONFIG_REGMAP) += regmap-core.o
49 obj-$(CONFIG_REGMAP_I2C) += regmap-i2c.o
50 obj-$(CONFIG_REGMAP_SPI) += regmap-spi.o
51 obj-$(CONFIG_REGMAP_MMIO) += regmap-mmio.o
52 --- a/drivers/base/regmap/regmap.c
53 +++ b/drivers/base/regmap/regmap.c
54 @@ -13,6 +13,7 @@
55 #include <linux/device.h>
56 #include <linux/slab.h>
57 #include <linux/export.h>
58 +#include <linux/module.h>
59 #include <linux/mutex.h>
60 #include <linux/err.h>
61 #include <linux/rbtree.h>
62 @@ -1418,3 +1419,5 @@ static int __init regmap_initcall(void)
63 return 0;
64 }
65 postcore_initcall(regmap_initcall);
66 +
67 +MODULE_LICENSE("GPL");