Fixed x86 GRUB config label
[librecmc/librecmc.git] / target / linux / generic / patches-4.1 / 259-regmap_dynamic.patch
1 --- a/drivers/base/regmap/Kconfig
2 +++ b/drivers/base/regmap/Kconfig
3 @@ -3,29 +3,35 @@
4  # subsystems should select the appropriate symbols.
5  
6  config REGMAP
7 -       default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_AC97 || 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_AC97
15 +       select REGMAP
16         tristate
17  
18  config REGMAP_I2C
19 -       tristate
20 +       tristate "Regmap I2C"
21 +       select REGMAP
22         depends on I2C
23  
24  config REGMAP_SPI
25 -       tristate
26 +       tristate "Regmap SPI"
27 +       select REGMAP
28 +       depends on SPI_MASTER
29         depends on SPI
30  
31  config REGMAP_SPMI
32 +       select REGMAP
33         tristate
34         depends on SPMI
35  
36  config REGMAP_MMIO
37 -       tristate
38 +       tristate "Regmap MMIO"
39 +       select REGMAP
40  
41  config REGMAP_IRQ
42 +       select REGMAP
43         bool
44 --- a/include/linux/regmap.h
45 +++ b/include/linux/regmap.h
46 @@ -50,7 +50,7 @@ struct reg_default {
47         unsigned int def;
48  };
49  
50 -#ifdef CONFIG_REGMAP
51 +#if IS_ENABLED(CONFIG_REGMAP)
52  
53  enum regmap_endian {
54         /* Unspecified -> 0 -> Backwards compatible default */
55 --- a/drivers/base/regmap/Makefile
56 +++ b/drivers/base/regmap/Makefile
57 @@ -1,9 +1,11 @@
58  # For include/trace/define_trace.h to include trace.h
59  CFLAGS_regmap.o := -I$(src)
60  
61 -obj-$(CONFIG_REGMAP) += regmap.o regcache.o
62 -obj-$(CONFIG_REGMAP) += regcache-rbtree.o regcache-lzo.o regcache-flat.o
63 -obj-$(CONFIG_DEBUG_FS) += regmap-debugfs.o
64 +regmap-core-objs = regmap.o regcache.o regcache-rbtree.o regcache-lzo.o regcache-flat.o
65 +ifdef CONFIG_DEBUG_FS
66 +regmap-core-objs += regmap-debugfs.o
67 +endif
68 +obj-$(CONFIG_REGMAP) += regmap-core.o
69  obj-$(CONFIG_REGMAP_AC97) += regmap-ac97.o
70  obj-$(CONFIG_REGMAP_I2C) += regmap-i2c.o
71  obj-$(CONFIG_REGMAP_SPI) += regmap-spi.o
72 --- a/drivers/base/regmap/regmap.c
73 +++ b/drivers/base/regmap/regmap.c
74 @@ -13,6 +13,7 @@
75  #include <linux/device.h>
76  #include <linux/slab.h>
77  #include <linux/export.h>
78 +#include <linux/module.h>
79  #include <linux/mutex.h>
80  #include <linux/err.h>
81  #include <linux/of.h>
82 @@ -2631,3 +2632,5 @@ static int __init regmap_initcall(void)
83         return 0;
84  }
85  postcore_initcall(regmap_initcall);
86 +
87 +MODULE_LICENSE("GPL");