Skip to content

Commit 91ff97a

Browse files
Philipp Stanneraxboe
authored andcommitted
mtip32xx: Replace deprecated PCI functions
pcim_iomap_table() and pcim_request_regions() have been deprecated in commit e354bb8 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()") and commit d140f80 ("PCI: Deprecate pcim_iomap_regions() in favor of pcim_iomap_region()"), respectively. Replace these functions with pcim_iomap_region(). Signed-off-by: Philipp Stanner <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 2a8f615 commit 91ff97a

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

drivers/block/mtip32xx/mtip32xx.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2701,7 +2701,12 @@ static int mtip_hw_init(struct driver_data *dd)
27012701
int rv;
27022702
unsigned long timeout, timetaken;
27032703

2704-
dd->mmio = pcim_iomap_table(dd->pdev)[MTIP_ABAR];
2704+
dd->mmio = pcim_iomap_region(dd->pdev, MTIP_ABAR, MTIP_DRV_NAME);
2705+
if (IS_ERR(dd->mmio)) {
2706+
dev_err(&dd->pdev->dev, "Unable to request / ioremap PCI region\n");
2707+
return PTR_ERR(dd->mmio);
2708+
}
2709+
27052710

27062711
mtip_detect_product(dd);
27072712
if (dd->product_type == MTIP_PRODUCT_UNKNOWN) {
@@ -3710,13 +3715,6 @@ static int mtip_pci_probe(struct pci_dev *pdev,
37103715
goto iomap_err;
37113716
}
37123717

3713-
/* Map BAR5 to memory. */
3714-
rv = pcim_iomap_regions(pdev, 1 << MTIP_ABAR, MTIP_DRV_NAME);
3715-
if (rv < 0) {
3716-
dev_err(&pdev->dev, "Unable to map regions\n");
3717-
goto iomap_err;
3718-
}
3719-
37203718
rv = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
37213719
if (rv) {
37223720
dev_warn(&pdev->dev, "64-bit DMA enable failed\n");

0 commit comments

Comments
 (0)