diff options
author | Ben Widawsky <ben.widawsky@intel.com> | 2021-10-09 18:44:50 +0200 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2021-10-29 20:53:52 +0200 |
commit | c6d7e1341cc99ba49df1384c8c5b3f534a5463b1 (patch) | |
tree | 873608e902aa0fcfeb3ce4375d0abb086f76f07c /arch | |
parent | cxl/pci: Use pci core's DVSEC functionality (diff) | |
download | linux-c6d7e1341cc99ba49df1384c8c5b3f534a5463b1.tar.xz linux-c6d7e1341cc99ba49df1384c8c5b3f534a5463b1.zip |
ocxl: Use pci core's DVSEC functionality
Reduce maintenance burden of DVSEC query implementation by using the
centralized PCI core implementation.
There are two obvious places to simply drop in the new core
implementation. There remains find_dvsec_from_pos() which would benefit
from using a core implementation. As that change is less trivial it is
reserved for later.
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Andrew Donnellan <ajd@linux.ibm.com>
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com> (v1)
Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com>
Link: https://lore.kernel.org/r/163379789065.692348.7117946955275586530.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/platforms/powernv/ocxl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/powernv/ocxl.c b/arch/powerpc/platforms/powernv/ocxl.c index 9105efcf242a..28b009b46464 100644 --- a/arch/powerpc/platforms/powernv/ocxl.c +++ b/arch/powerpc/platforms/powernv/ocxl.c @@ -107,7 +107,8 @@ static int get_max_afu_index(struct pci_dev *dev, int *afu_idx) int pos; u32 val; - pos = find_dvsec_from_pos(dev, OCXL_DVSEC_FUNC_ID, 0); + pos = pci_find_dvsec_capability(dev, PCI_VENDOR_ID_IBM, + OCXL_DVSEC_FUNC_ID); if (!pos) return -ESRCH; |