]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
power: sequencing: pcie-m2: enforce PCI and OF dependencies
authorArnd Bergmann <arnd@arndb.de>
Wed, 1 Apr 2026 09:16:25 +0000 (11:16 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Fri, 3 Apr 2026 12:20:10 +0000 (14:20 +0200)
The driver fails to build when PCI is disabled:

drivers/power/sequencing/pwrseq-pcie-m2.c: In function 'pwrseq_pcie_m2_register_notifier':
drivers/power/sequencing/pwrseq-pcie-m2.c:368:54: error: 'pci_bus_type' undeclared (first use in this function); did you mean 'pci_pcie_type'?
  368 |                         ret = bus_register_notifier(&pci_bus_type, &ctx->nb);
      |                                                      ^~~~~~~~~~~~
      |                                                      pci_pcie_type

Similarly, when CONFIG_OF is disabled:

drivers/power/sequencing/pwrseq-pcie-m2.c: In function 'pwrseq_m2_pcie_create_bt_node':
drivers/power/sequencing/pwrseq-pcie-m2.c:191:9: error: implicit declaration of function 'of_changeset_init' [-Wimplicit-function-declaration]
  191 |         of_changeset_init(ctx->ocs);
      |         ^~~~~~~~~~~~~~~~~

Make both dependencies unconditional to prevent compile-testing
in either configuration.

Fixes: 3f736aecbdc8 ("power: sequencing: pcie-m2: Create serdev device for WCN7850 bluetooth")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://patch.msgid.link/20260401091847.305294-1-arnd@kernel.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
drivers/power/sequencing/Kconfig

index 1ec142525a4aad57e6b9a60790f92e20f971bbee..77c6d922725117a1412415655d718e64e42de0b6 100644 (file)
@@ -37,8 +37,9 @@ config POWER_SEQUENCING_TH1520_GPU
 
 config POWER_SEQUENCING_PCIE_M2
        tristate "PCIe M.2 connector power sequencing driver"
-       depends on (PCI && OF) || COMPILE_TEST
-       select OF_DYNAMIC if OF
+       depends on OF
+       depends on PCI
+       select OF_DYNAMIC
        help
          Say Y here to enable the power sequencing driver for PCIe M.2
          connectors. This driver handles the power sequencing for the M.2