diff mbox series

[1/2] ata: pata_cs5520: Remove not needed call to pci_enable_device_io

Message ID 5068d0ce-2140-4d3f-b305-e8f0d61eed1f@gmail.com (mailing list archive)
State Accepted
Commit 991a9ea2569069663717d31b06aa77619a11ea68
Headers show
Series PCI: Remove pci_enable_device_io() | expand

Commit Message

Heiner Kallweit March 23, 2024, 5:14 p.m. UTC
A few lines earlier pcim_enable_device() is called, which includes
the functionality of pci_enable_device_io(). Therefore we can safely
remove the call to pci_enable_device_io().

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/ata/pata_cs5520.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Sergey Shtylyov March 23, 2024, 5:43 p.m. UTC | #1
Hello!

On 3/23/24 8:14 PM, Heiner Kallweit wrote:

> A few lines earlier pcim_enable_device() is called, which includes
> the functionality of pci_enable_device_io(). Therefore we can safely
> remove the call to pci_enable_device_io().
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>

[...]

MBR, Sergey
Damien Le Moal March 25, 2024, 7:57 a.m. UTC | #2
On 3/24/24 02:14, Heiner Kallweit wrote:
> A few lines earlier pcim_enable_device() is called, which includes
> the functionality of pci_enable_device_io(). Therefore we can safely
> remove the call to pci_enable_device_io().
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Looks OK to me.

Acked-by: Damien Le Moal <dlemoal@kernel.org>
diff mbox series

Patch

diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c
index 38795508c..027cf6710 100644
--- a/drivers/ata/pata_cs5520.c
+++ b/drivers/ata/pata_cs5520.c
@@ -151,12 +151,6 @@  static int cs5520_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	if (!host)
 		return -ENOMEM;
 
-	/* Perform set up for DMA */
-	if (pci_enable_device_io(pdev)) {
-		dev_err(&pdev->dev, "unable to configure BAR2.\n");
-		return -ENODEV;
-	}
-
 	if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32))) {
 		dev_err(&pdev->dev, "unable to configure DMA mask.\n");
 		return -ENODEV;