diff mbox series

counter: intel-qep: Replace deprecated PCI functions

Message ID 20241028091312.17045-2-pstanner@redhat.com (mailing list archive)
State Handled Elsewhere
Headers show
Series counter: intel-qep: Replace deprecated PCI functions | expand

Commit Message

Philipp Stanner Oct. 28, 2024, 9:13 a.m. UTC
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/counter/intel-qep.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

Comments

William Breathitt Gray Nov. 1, 2024, 6:04 a.m. UTC | #1
On Mon, 28 Oct 2024 10:13:13 +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().
> 
> 
> [...]

Applied, thanks!

[1/1] counter: intel-qep: Replace deprecated PCI functions
      commit: 522ae89b78580c62765e160aed3479297baa75be

Best regards,
Jarkko Nikula Nov. 1, 2024, 1:12 p.m. UTC | #2
On 10/28/24 11:13 AM, 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/counter/intel-qep.c | 10 +++-------
>   1 file changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/counter/intel-qep.c b/drivers/counter/intel-qep.c
> index af5942e66f7d..ee2bae27b728 100644
> --- a/drivers/counter/intel-qep.c
> +++ b/drivers/counter/intel-qep.c
> @@ -408,13 +408,9 @@ static int intel_qep_probe(struct pci_dev *pci, const struct pci_device_id *id)
>   
>   	pci_set_master(pci);
>   
> -	ret = pcim_iomap_regions(pci, BIT(0), pci_name(pci));
> -	if (ret)
> -		return ret;
> -
> -	regs = pcim_iomap_table(pci)[0];
> -	if (!regs)
> -		return -ENOMEM;
> +	regs = pcim_iomap_region(pci, 0, pci_name(pci));
> +	if (IS_ERR(regs))
> +		return PTR_ERR(regs);
>   
>   	qep->dev = dev;
>   	qep->regs = regs;

Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
diff mbox series

Patch

diff --git a/drivers/counter/intel-qep.c b/drivers/counter/intel-qep.c
index af5942e66f7d..ee2bae27b728 100644
--- a/drivers/counter/intel-qep.c
+++ b/drivers/counter/intel-qep.c
@@ -408,13 +408,9 @@  static int intel_qep_probe(struct pci_dev *pci, const struct pci_device_id *id)
 
 	pci_set_master(pci);
 
-	ret = pcim_iomap_regions(pci, BIT(0), pci_name(pci));
-	if (ret)
-		return ret;
-
-	regs = pcim_iomap_table(pci)[0];
-	if (!regs)
-		return -ENOMEM;
+	regs = pcim_iomap_region(pci, 0, pci_name(pci));
+	if (IS_ERR(regs))
+		return PTR_ERR(regs);
 
 	qep->dev = dev;
 	qep->regs = regs;