3479d1a0a8974c4b0f6fc688d52f456862d27c49
[openwrt.git] / target / linux / generic / patches-3.9 / 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 "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 +       tristate "Regmap SPI"
23  
24  config REGMAP_MMIO
25 +       select REGMAP
26         tristate
27  
28  config REGMAP_IRQ
29 +       select REGMAP
30         bool
31 --- a/include/linux/regmap.h
32 +++ b/include/linux/regmap.h
33 @@ -45,7 +45,7 @@ struct reg_default {
34         unsigned int def;
35  };
36  
37 -#ifdef CONFIG_REGMAP
38 +#if IS_ENABLED(CONFIG_REGMAP)
39  
40  enum regmap_endian {
41         /* Unspecified -> 0 -> Backwards compatible default */
42 --- a/drivers/base/regmap/regmap.c
43 +++ b/drivers/base/regmap/regmap.c
44 @@ -13,6 +13,7 @@
45  #include <linux/device.h>
46  #include <linux/slab.h>
47  #include <linux/export.h>
48 +#include <linux/module.h>
49  #include <linux/mutex.h>
50  #include <linux/err.h>
51  #include <linux/rbtree.h>
52 @@ -1777,3 +1778,5 @@ static int __init regmap_initcall(void)
53         return 0;
54  }
55  postcore_initcall(regmap_initcall);
56 +
57 +MODULE_LICENSE("GPL");