[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251113140355.GI1949330@google.com>
Date: Thu, 13 Nov 2025 14:03:55 +0000
From: Lee Jones <lee@...nel.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Binbin Zhou <zhoubinbin@...ngson.cn>, linux-kernel@...r.kernel.org,
Chong Qiao <qiaochong@...ngson.cn>
Subject: Re: [PATCH v1 2/2] mfd: ls2kbmc: Use PCI API instead of direct
accesses
On Thu, 30 Oct 2025, Andy Shevchenko wrote:
> There is PCI API to access device resources. Use it instead of
Nit: "There is a ..."
> direct accesses.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
> drivers/mfd/ls2k-bmc-core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mfd/ls2k-bmc-core.c b/drivers/mfd/ls2k-bmc-core.c
> index 616ff0a28b00..7b0a5fed1d1d 100644
> --- a/drivers/mfd/ls2k-bmc-core.c
> +++ b/drivers/mfd/ls2k-bmc-core.c
> @@ -484,7 +484,7 @@ static int ls2k_bmc_probe(struct pci_dev *dev, const struct pci_device_id *id)
>
> ls2k_bmc_cells[LS2K_BMC_DISPLAY].platform_data = &pd;
> ls2k_bmc_cells[LS2K_BMC_DISPLAY].pdata_size = sizeof(pd);
> - base = dev->resource[0].start + LS2K_DISPLAY_RES_START;
> + base = pci_resource_start(dev, 0) + LS2K_DISPLAY_RES_START;
>
> /* Remove conflicting efifb device */
> 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)
>
> return devm_mfd_add_devices(&dev->dev, PLATFORM_DEVID_AUTO,
> ls2k_bmc_cells, ARRAY_SIZE(ls2k_bmc_cells),
> - &dev->resource[0], 0, NULL);
> + pci_resource_n(dev, 0), 0, NULL);
> }
>
> static struct pci_device_id ls2k_bmc_devices[] = {
> --
> 2.50.1
>
--
Lee Jones [李琼斯]
Powered by blists - more mailing lists