[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20240527-devm-itv-v1-3-f5829b8e7674@chromium.org>
Date: Mon, 27 May 2024 22:14:47 +0000
From: Ricardo Ribalda <ribalda@...omium.org>
To: Andy Walls <awalls@...metrocast.net>,
Mauro Carvalho Chehab <mchehab@...nel.org>
Cc: Hans Verkuil <hverkuil-cisco@...all.nl>, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org, Ricardo Ribalda <ribalda@...omium.org>
Subject: [PATCH 3/3] media: pci/ivtv: Use managed version of
pci_enable_device
If there is any error during probing, we should probably leave the
device in its previous state.
pcim_ will take care of this.
Signed-off-by: Ricardo Ribalda <ribalda@...omium.org>
---
drivers/media/pci/ivtv/ivtv-driver.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/media/pci/ivtv/ivtv-driver.c b/drivers/media/pci/ivtv/ivtv-driver.c
index 96f40c9685d2..ecc20cd89926 100644
--- a/drivers/media/pci/ivtv/ivtv-driver.c
+++ b/drivers/media/pci/ivtv/ivtv-driver.c
@@ -806,7 +806,7 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev *pdev,
IVTV_DEBUG_INFO("Enabling pci device\n");
- if (pci_enable_device(pdev)) {
+ if (pcim_enable_device(pdev)) {
IVTV_ERR("Can't enable device!\n");
return -EIO;
}
@@ -1402,7 +1402,6 @@ static void ivtv_remove(struct pci_dev *pdev)
free_irq(itv->pdev->irq, (void *)itv);
- pci_disable_device(itv->pdev);
for (i = 0; i < IVTV_VBI_FRAMES; i++)
kfree(itv->vbi.sliced_mpeg_data[i]);
--
2.45.1.288.g0e0cd299f1-goog
Powered by blists - more mailing lists