Skip to content

Commit 9e87c8b

Browse files
andy-shevlag-linaro
authored andcommitted
mfd: ls2kbmc: Use PCI API instead of direct accesses
There is a PCI API to access device resources. Use it instead of direct accesses. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://patch.msgid.link/20251030113735.3741913-3-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones <lee@kernel.org>
1 parent e11a9ad commit 9e87c8b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/mfd/ls2k-bmc-core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ static int ls2k_bmc_probe(struct pci_dev *dev, const struct pci_device_id *id)
484484

485485
ls2k_bmc_cells[LS2K_BMC_DISPLAY].platform_data = &pd;
486486
ls2k_bmc_cells[LS2K_BMC_DISPLAY].pdata_size = sizeof(pd);
487-
base = dev->resource[0].start + LS2K_DISPLAY_RES_START;
487+
base = pci_resource_start(dev, 0) + LS2K_DISPLAY_RES_START;
488488

489489
/* Remove conflicting efifb device */
490490
ret = aperture_remove_conflicting_devices(base, SZ_4M, "simple-framebuffer");
@@ -493,7 +493,7 @@ static int ls2k_bmc_probe(struct pci_dev *dev, const struct pci_device_id *id)
493493

494494
return devm_mfd_add_devices(&dev->dev, PLATFORM_DEVID_AUTO,
495495
ls2k_bmc_cells, ARRAY_SIZE(ls2k_bmc_cells),
496-
&dev->resource[0], 0, NULL);
496+
pci_resource_n(dev, 0), 0, NULL);
497497
}
498498

499499
static struct pci_device_id ls2k_bmc_devices[] = {

0 commit comments

Comments
 (0)