public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] firewire: ohci: Replace deprecated PCI functions
@ 2024-10-28  9:44 Philipp Stanner
  2024-10-29  1:19 ` Takashi Sakamoto
  0 siblings, 1 reply; 2+ messages in thread
From: Philipp Stanner @ 2024-10-28  9:44 UTC (permalink / raw)
  To: Takashi Sakamoto, linux1394-devel; +Cc: linux-kernel, Philipp Stanner

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().

Signed-off-by: Philipp Stanner <pstanner@redhat.com>
---
 drivers/firewire/ohci.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index 7ee55c2804de..3c045a6fd2ef 100644
--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -3726,12 +3726,11 @@ static int pci_probe(struct pci_dev *dev,
 		return -ENXIO;
 	}
 
-	err = pcim_iomap_regions(dev, 1 << 0, ohci_driver_name);
-	if (err) {
+	ohci->registers = pcim_iomap_region(dev, 0, ohci_driver_name);
+	if (IS_ERR(ohci->registers)) {
 		ohci_err(ohci, "request and map MMIO resource unavailable\n");
 		return -ENXIO;
 	}
-	ohci->registers = pcim_iomap_table(dev)[0];
 
 	for (i = 0; i < ARRAY_SIZE(ohci_quirks); i++)
 		if ((ohci_quirks[i].vendor == dev->vendor) &&
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] firewire: ohci: Replace deprecated PCI functions
  2024-10-28  9:44 [PATCH] firewire: ohci: Replace deprecated PCI functions Philipp Stanner
@ 2024-10-29  1:19 ` Takashi Sakamoto
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Sakamoto @ 2024-10-29  1:19 UTC (permalink / raw)
  To: Philipp Stanner; +Cc: linux1394-devel, linux-kernel

Hi,

On Mon, Oct 28, 2024 at 10:44:42AM +0100, Philipp Stanner wrote:
> 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().
> 
> Signed-off-by: Philipp Stanner <pstanner@redhat.com>
> ---
>  drivers/firewire/ohci.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)

Oh, the API has been made available outside of PCI subsystem, great.
Applied to for-next branch.


Thanks

Takashi Sakamoto

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-29  1:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-28  9:44 [PATCH] firewire: ohci: Replace deprecated PCI functions Philipp Stanner
2024-10-29  1:19 ` Takashi Sakamoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox