Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ptp_pch: Replace deprecated PCI functions

pcim_iomap_regions() and pcim_iomap_table() have been deprecated in
commit e354bb84a4c1 ("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>

authored by

Philipp Stanner and committed by
Jakub Kicinski
9c5649c1 f611cc38

+3 -3
+3 -3
drivers/ptp/ptp_pch.c
··· 462 462 return ret; 463 463 } 464 464 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); 466 468 if (ret) { 467 469 dev_err(&pdev->dev, "could not locate IO memory address\n"); 468 470 return ret; 469 471 } 470 472 471 - /* get the virtual address to the 1588 registers */ 472 - chip->regs = pcim_iomap_table(pdev)[IO_MEM_BAR]; 473 473 chip->caps = ptp_pch_caps; 474 474 chip->ptp_clock = ptp_clock_register(&chip->caps, &pdev->dev); 475 475 if (IS_ERR(chip->ptp_clock))