]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI: dwc: Implement capability search using PCI core APIs
authorHans Zhang <18255117159@163.com>
Wed, 13 Aug 2025 14:45:27 +0000 (22:45 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 14 Aug 2025 20:20:54 +0000 (15:20 -0500)
commit8ffc9f234fdf332310015d507ae22db9a2820d37
treeb40b7da3d418ce082b8ed0aa29a8fdd4a7adc00b
parent4d909bf1a53eb1e2e4d523a8d6f66532ac1bae0b
PCI: dwc: Implement capability search using PCI core APIs

The PCI core now provides generic PCI_FIND_NEXT_CAP() and
PCI_FIND_NEXT_EXT_CAP() macros to search for PCI capabilities, using
config accessors we supply.

Use them in the DWC driver to implement dw_pcie_find_capability() and
dw_pcie_find_ext_capability() instead of duplicating the algorithm.

Signed-off-by: Hans Zhang <18255117159@163.com>
[bhelgaas: commit log]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20250813144529.303548-5-18255117159@163.com
drivers/pci/controller/dwc/pcie-designware.c
drivers/pci/controller/dwc/pcie-designware.h