Skip to content

Commit 4dac48e

Browse files
committed
Merge branch 'pci/pwrctrl'
- Rename pwrctrl Kconfig symbols from 'PWRCTL' to 'PWRCTRL' to match the filename paths. Retain old deprecated symbols for compatibility, except for the pwrctrl slot driver (PCI_PWRCTRL_SLOT) (Johan Hovold) - When unregistering pwrctrl, cancel outstanding rescan work before cleaning up data structures to avoid use-after-free issues (Brian Norris) * pci/pwrctrl: arm64: Kconfig: switch to HAVE_PWRCTRL wifi: ath12k: switch to PCI_PWRCTRL_PWRSEQ wifi: ath11k: switch to PCI_PWRCTRL_PWRSEQ PCI/pwrctrl: Rename pwrctrl Kconfig symbols and slot module PCI/pwrctrl: Cancel outstanding rescan work when unregistering
2 parents f377d9c + 46bc169 commit 4dac48e

File tree

6 files changed

+25
-13
lines changed

6 files changed

+25
-13
lines changed

arch/arm64/Kconfig.platforms

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ config ARCH_QCOM
269269
bool "Qualcomm Platforms"
270270
select GPIOLIB
271271
select PINCTRL
272-
select HAVE_PWRCTL if PCI
272+
select HAVE_PWRCTRL if PCI
273273
help
274274
This enables support for the ARMv8 based Qualcomm chipsets.
275275

drivers/net/wireless/ath/ath11k/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ config ATH11K_PCI
2424
select MHI_BUS
2525
select QRTR
2626
select QRTR_MHI
27-
select PCI_PWRCTL_PWRSEQ if HAVE_PWRCTL
27+
select PCI_PWRCTRL_PWRSEQ if HAVE_PWRCTRL
2828
help
2929
This module adds support for PCIE bus
3030

drivers/net/wireless/ath/ath12k/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ config ATH12K
77
select MHI_BUS
88
select QRTR
99
select QRTR_MHI
10-
select PCI_PWRCTL_PWRSEQ if HAVE_PWRCTL
10+
select PCI_PWRCTRL_PWRSEQ if HAVE_PWRCTRL
1111
help
1212
Enable support for Qualcomm Technologies Wi-Fi 7 (IEEE
1313
802.11be) family of chipsets, for example WCN7850 and

drivers/pci/pwrctrl/Kconfig

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,33 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22

3-
config HAVE_PWRCTL
3+
config HAVE_PWRCTRL
44
bool
55

6-
config PCI_PWRCTL
6+
config PCI_PWRCTRL
77
tristate
88

9-
config PCI_PWRCTL_PWRSEQ
9+
config PCI_PWRCTRL_PWRSEQ
1010
tristate
1111
select POWER_SEQUENCING
12-
select PCI_PWRCTL
12+
select PCI_PWRCTRL
1313

14-
config PCI_PWRCTL_SLOT
14+
config PCI_PWRCTRL_SLOT
1515
tristate "PCI Power Control driver for PCI slots"
16-
select PCI_PWRCTL
16+
select PCI_PWRCTRL
1717
help
1818
Say Y here to enable the PCI Power Control driver to control the power
1919
state of PCI slots.
2020

2121
This is a generic driver that controls the power state of different
2222
PCI slots. The voltage regulators powering the rails of the PCI slots
2323
are expected to be defined in the devicetree node of the PCI bridge.
24+
25+
# deprecated
26+
config HAVE_PWRCTL
27+
bool
28+
select HAVE_PWRCTRL
29+
30+
# deprecated
31+
config PCI_PWRCTL_PWRSEQ
32+
tristate
33+
select PCI_PWRCTRL_PWRSEQ

drivers/pci/pwrctrl/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22

3-
obj-$(CONFIG_PCI_PWRCTL) += pci-pwrctrl-core.o
3+
obj-$(CONFIG_PCI_PWRCTRL) += pci-pwrctrl-core.o
44
pci-pwrctrl-core-y := core.o
55

6-
obj-$(CONFIG_PCI_PWRCTL_PWRSEQ) += pci-pwrctrl-pwrseq.o
6+
obj-$(CONFIG_PCI_PWRCTRL_PWRSEQ) += pci-pwrctrl-pwrseq.o
77

8-
obj-$(CONFIG_PCI_PWRCTL_SLOT) += pci-pwrctl-slot.o
9-
pci-pwrctl-slot-y := slot.o
8+
obj-$(CONFIG_PCI_PWRCTRL_SLOT) += pci-pwrctrl-slot.o
9+
pci-pwrctrl-slot-y := slot.o

drivers/pci/pwrctrl/core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ EXPORT_SYMBOL_GPL(pci_pwrctrl_device_set_ready);
101101
*/
102102
void pci_pwrctrl_device_unset_ready(struct pci_pwrctrl *pwrctrl)
103103
{
104+
cancel_work_sync(&pwrctrl->work);
105+
104106
/*
105107
* We don't have to delete the link here. Typically, this function
106108
* is only called when the power control device is being detached. If

0 commit comments

Comments
 (0)