Skip to content

Commit d92558a

Browse files
author
CKI Backport Bot
committed
ptp_pch: Replace deprecated PCI functions
JIRA: https://issues.redhat.com/browse/RHEL-74024 commit 9c5649c Author: Philipp Stanner <pstanner@redhat.com> Date: Mon Oct 28 10:59:44 2024 +0100 ptp_pch: Replace deprecated PCI functions pcim_iomap_regions() and pcim_iomap_table() have been deprecated in commit e354bb8 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with pcim_iomap_region(). Additionally, pass KBUILD_MODNAME to that function, since the 'name' parameter should indicate who (i.e., which driver) has requested the resource. Signed-off-by: Philipp Stanner <pstanner@redhat.com> Link: https://patch.msgid.link/20241028095943.20498-2-pstanner@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
1 parent 00d19a4 commit d92558a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/ptp/ptp_pch.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,14 +462,14 @@ pch_probe(struct pci_dev *pdev, const struct pci_device_id *id)
462462
return ret;
463463
}
464464

465-
ret = pcim_iomap_regions(pdev, BIT(IO_MEM_BAR), "1588_regs");
465+
/* get the virtual address to the 1588 registers */
466+
chip->regs = pcim_iomap_region(pdev, IO_MEM_BAR, KBUILD_MODNAME);
467+
ret = PTR_ERR_OR_ZERO(chip->regs);
466468
if (ret) {
467469
dev_err(&pdev->dev, "could not locate IO memory address\n");
468470
return ret;
469471
}
470472

471-
/* get the virtual address to the 1588 registers */
472-
chip->regs = pcim_iomap_table(pdev)[IO_MEM_BAR];
473473
chip->caps = ptp_pch_caps;
474474
chip->ptp_clock = ptp_clock_register(&chip->caps, &pdev->dev);
475475
if (IS_ERR(chip->ptp_clock))

0 commit comments

Comments
 (0)