openwrtv4/target/linux/generic
Christian Lamparter 3fce12568a kernel: modules: fix kmod-regmap redux
Jonas Gorski commented on the previous patch:
|This is actually the wrong fix and papers over an issue in one of our
|local patches.
|
|We intentionally allow regmap to be built as a module, see
|
|/target/linux/generic/hack-4.14/259-regmap_dynamic.patch
|[...]
|[The regulator code] optionally supports regmap thanks to the stubs
|provided if regmap is disabled - which breaks if you compile regmap
|as a module.

In order to mitigate this issue, this patch reverts the previous patch
and replaces the existing IS_ENABLED(CONFIG_REGMAP) with
IS_REACHABLE(CONFIG_REGMAP). This solves this particular issue as the
regulator code will now automatically fallback to the regmap stubs in
case the kmod-regmap module is enabled, but nothing else sets
CONFIG_REGMAP=y.

Note: There's still a potential issue that this patch doesn't solve:
If someone ever wants to make a OpenWrt kernel package for a
regulator module that requires the REGMAP feature for a target that
doesn't set CONFIG_REGMAP=y but has CONFIG_REGULATOR=y, the resulting
kmod-regulator-xyz package will not work on the target.
Luckily, there aren't any in-tree OpenWrt kernel module packages for
regulators at the moment. On the bright side: regmap is a critical
part nowadays and all new and upcoming architectures require it by
default. This will likely only ever be a problem for legacy targets
and devices that cannot afford to enable REGMAP.

Cc: Jonas Gorski <jonas.gorski@gmail.com>
Cc: John Crispin <john@phrozen.org>
Fixes: d00913d121 ("kernel: modules: fix kmod-regmap")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2018-08-06 07:17:12 +02:00
..
backport-4.9 kernel: bump 4.9 to 4.9.117 2018-08-03 16:10:38 +02:00
backport-4.14 kernel: bump 4.14 to 4.14.60 2018-08-03 16:10:38 +02:00
files kernel: rtl8366-smi: add Realtek switch management via mii-bus 2018-06-25 20:52:18 +02:00
hack-4.9 kernel: bump 4.9 to 4.9.117 2018-08-03 16:10:38 +02:00
hack-4.14 kernel: modules: fix kmod-regmap redux 2018-08-06 07:17:12 +02:00
image treewide: replace nbd@openwrt.org with nbd@nbd.name 2016-06-07 08:58:42 +02:00
other-files kernel: move initramfs's init script out of base-files 2017-04-04 14:06:40 +02:00
pending-3.18 kernel: adjust bridge port isolate patch to match upstream attribute naming 2018-07-11 20:59:05 +02:00
pending-4.9 kernel: bump 4.9 to 4.9.117 2018-08-03 16:10:38 +02:00
pending-4.14 kernel: bump 4.14 to 4.14.60 2018-08-03 16:10:38 +02:00
config-3.18 config: extend small_flash feature 2018-07-12 18:15:33 +02:00
config-4.9 config: extend small_flash feature 2018-07-12 18:15:33 +02:00
config-4.14 config: extend small_flash feature 2018-07-12 18:15:33 +02:00
PATCHES kernel: update PATCHES with a stricter policy 2013-07-09 20:52:07 +00:00