diff options
| author | Heiner Kallweit <[email protected]> | 2025-03-12 19:21:42 +0000 |
|---|---|---|
| committer | Paolo Abeni <[email protected]> | 2025-03-19 18:03:31 +0000 |
| commit | 34e5ededf4b8ad4c9e58f0cab8596e26c8fa59a2 (patch) | |
| tree | d7d37a0ff2fc78e338c72ae77a0fc29b2fb07179 | |
| parent | Merge branch 'net-bring-back-dev_addr_sem' (diff) | |
| download | kernel-34e5ededf4b8ad4c9e58f0cab8596e26c8fa59a2.tar.gz kernel-34e5ededf4b8ad4c9e58f0cab8596e26c8fa59a2.zip | |
r8169: switch away from deprecated pcim_iomap_table
Avoid using deprecated pcim_iomap_table by switching to
pcim_iomap_region.
Signed-off-by: Heiner Kallweit <[email protected]>
Reviewed-by: Jacob Keller <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
| -rw-r--r-- | drivers/net/ethernet/realtek/r8169_main.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index b18daeeda40d..53e541ddb439 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -5447,11 +5447,10 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) if (region < 0) return dev_err_probe(&pdev->dev, -ENODEV, "no MMIO resource found\n"); - rc = pcim_iomap_regions(pdev, BIT(region), KBUILD_MODNAME); - if (rc < 0) - return dev_err_probe(&pdev->dev, rc, "cannot remap MMIO, aborting\n"); - - tp->mmio_addr = pcim_iomap_table(pdev)[region]; + tp->mmio_addr = pcim_iomap_region(pdev, region, KBUILD_MODNAME); + if (IS_ERR(tp->mmio_addr)) + return dev_err_probe(&pdev->dev, PTR_ERR(tp->mmio_addr), + "cannot remap MMIO, aborting\n"); txconfig = RTL_R32(tp, TxConfig); if (txconfig == ~0U) |
