kernel: update 3.10 to 3.10.9
[openwrt.git] / target / linux / generic / patches-3.10 / 259-regmap_dynamic.patch
1 --- a/drivers/base/regmap/Kconfig
2 +++ b/drivers/base/regmap/Kconfig
3 @@ -3,20 +3,24 @@
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 "Regmap"
13  
14  config REGMAP_I2C
15 -       tristate
16 +       select REGMAP
17 +       tristate "Regmap I2C"
18  
19  config REGMAP_SPI
20 -       tristate
21 +       select REGMAP
22 +       depends on SPI_MASTER
23 +       tristate "Regmap SPI"
24  
25  config REGMAP_MMIO
26 +       select REGMAP
27         tristate
28  
29  config REGMAP_IRQ
30 +       select REGMAP
31         bool
32 --- a/include/linux/regmap.h
33 +++ b/include/linux/regmap.h
34 @@ -46,7 +46,7 @@ struct reg_default {
35         unsigned int def;
36  };
37  
38 -#ifdef CONFIG_REGMAP
39 +#if IS_ENABLED(CONFIG_REGMAP)
40  
41  enum regmap_endian {
42         /* Unspecified -> 0 -> Backwards compatible default */
43 --- a/drivers/base/regmap/Makefile
44 +++ b/drivers/base/regmap/Makefile
45 @@ -1,6 +1,8 @@
46 -obj-$(CONFIG_REGMAP) += regmap.o regcache.o
47 -obj-$(CONFIG_REGMAP) += regcache-rbtree.o regcache-lzo.o regcache-flat.o
48 -obj-$(CONFIG_DEBUG_FS) += regmap-debugfs.o
49 +regmap-core-objs = regmap.o regcache.o regcache-rbtree.o regcache-lzo.o regcache-flat.o
50 +ifdef CONFIG_DEBUG_FS
51 +regmap-core-objs += regmap-debugfs.o
52 +endif
53 +obj-$(CONFIG_REGMAP) += regmap-core.o
54  obj-$(CONFIG_REGMAP_I2C) += regmap-i2c.o
55  obj-$(CONFIG_REGMAP_SPI) += regmap-spi.o
56  obj-$(CONFIG_REGMAP_MMIO) += regmap-mmio.o
57 --- a/drivers/base/regmap/regmap.c
58 +++ b/drivers/base/regmap/regmap.c
59 @@ -13,6 +13,7 @@
60  #include <linux/device.h>
61  #include <linux/slab.h>
62  #include <linux/export.h>
63 +#include <linux/module.h>
64  #include <linux/mutex.h>
65  #include <linux/err.h>
66  #include <linux/rbtree.h>
67 @@ -1815,3 +1816,5 @@ static int __init regmap_initcall(void)
68         return 0;
69  }
70  postcore_initcall(regmap_initcall);
71 +
72 +MODULE_LICENSE("GPL");