mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-12-07 05:04:00 -05:00
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:
|
||
|---|---|---|
| .. | ||
| 202-reduce_module_size.patch | ||
| 204-module_strip.patch | ||
| 207-disable-modorder.patch | ||
| 210-darwin_scripts_include.patch | ||
| 211-host_tools_portability.patch | ||
| 212-byteshift_portability.patch | ||
| 214-spidev_h_portability.patch | ||
| 220-gc_sections.patch | ||
| 221-module_exports.patch | ||
| 230-openwrt_lzma_options.patch | ||
| 250-netfilter_depends.patch | ||
| 251-sound_kconfig.patch | ||
| 259-regmap_dynamic.patch | ||
| 260-crypto_test_dependencies.patch | ||
| 280-rfkill-stubs.patch | ||
| 300-MIPS-r4k_cache-use-more-efficient-cache-blast.patch | ||
| 301-mips_image_cmdline_hack.patch | ||
| 321-powerpc_crtsavres_prereq.patch | ||
| 531-debloat_lzma.patch | ||
| 640-bridge-only-accept-EAP-locally.patch | ||
| 650-netfilter-add-xt_OFFLOAD-target.patch | ||
| 651-wireless_mesh_header.patch | ||
| 660-fq_codel_defaults.patch | ||
| 661-use_fq_codel_by_default.patch | ||
| 662-remove_pfifo_fast.patch | ||
| 700-swconfig_switch_drivers.patch | ||
| 702-phy_add_aneg_done_function.patch | ||
| 721-phy_packets.patch | ||
| 773-bgmac-add-srab-switch.patch | ||
| 835-misc-owl_loader.patch | ||
| 901-debloat_sock_diag.patch | ||
| 902-debloat_proc.patch | ||
| 904-debloat_dma_buf.patch | ||
| 910-kobject_uevent.patch | ||
| 911-kobject_add_broadcast_uevent.patch | ||
| 921-always-create-console-node-in-initramfs.patch | ||
| 930-crashlog.patch | ||
| 940-cleanup-offload-hooks-on-netdev-unregister.patch | ||