From: Philipp Stanner <phasta@kernel.org>
To: Yong Zhi <yong.zhi@intel.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Bingbu Cao <bingbu.cao@intel.com>,
Dan Scally <djrscally@gmail.com>,
Tianshu Qiu <tian.shu.qiu@intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Akihiro Tsukada <tskd08@gmail.com>,
Bluecherry Maintainers <maintainers@bluecherrydvr.com>,
Andrey Utkin <andrey_utkin@fastmail.com>,
Ismael Luceno <ismael@iodev.co.uk>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Philipp Stanner <phasta@kernel.org>
Subject: [PATCH 2/5] media: pt3: Replace deprecated PCI functions
Date: Fri, 4 Apr 2025 15:53:42 +0200 [thread overview]
Message-ID: <20250404135344.93241-4-phasta@kernel.org> (raw)
In-Reply-To: <20250404135344.93241-2-phasta@kernel.org>
pcim_iomap_table() and pcim_iomap_regions() have been deprecated.
Replace them with pcim_iomap_region().
Signed-off-by: Philipp Stanner <phasta@kernel.org>
---
drivers/media/pci/pt3/pt3.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/media/pci/pt3/pt3.c b/drivers/media/pci/pt3/pt3.c
index 246f73b8a9e7..c55aa782b72c 100644
--- a/drivers/media/pci/pt3/pt3.c
+++ b/drivers/media/pci/pt3/pt3.c
@@ -692,6 +692,7 @@ static int pt3_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
u8 rev;
u32 ver;
int i, ret;
+ void __iomem *iomem;
struct pt3_board *pt3;
struct i2c_adapter *i2c;
@@ -703,10 +704,6 @@ static int pt3_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
return -ENODEV;
pci_set_master(pdev);
- ret = pcim_iomap_regions(pdev, BIT(0) | BIT(2), DRV_NAME);
- if (ret < 0)
- return ret;
-
ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
if (ret) {
dev_err(&pdev->dev, "Failed to set DMA mask\n");
@@ -719,8 +716,16 @@ static int pt3_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
pci_set_drvdata(pdev, pt3);
pt3->pdev = pdev;
mutex_init(&pt3->lock);
- pt3->regs[0] = pcim_iomap_table(pdev)[0];
- pt3->regs[1] = pcim_iomap_table(pdev)[2];
+
+ iomem = pcim_iomap_region(pdev, 0, DRV_NAME);
+ if (IS_ERR(iomem))
+ return PTR_ERR(iomem);
+ pt3->regs[0] = iomem;
+
+ iomem = pcim_iomap_region(pdev, 2, DRV_NAME);
+ if (IS_ERR(iomem))
+ return PTR_ERR(iomem);
+ pt3->regs[1] = iomem;
ver = ioread32(pt3->regs[0] + REG_VERSION);
if ((ver >> 16) != 0x0301) {
--
2.48.1
next prev parent reply other threads:[~2025-04-04 13:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-04 13:53 [PATCH 0/5] media: " Philipp Stanner
2025-04-04 13:53 ` [PATCH 1/5] media: ipu3-cio2: " Philipp Stanner
2025-04-04 13:53 ` Philipp Stanner [this message]
2025-04-15 14:16 ` [PATCH 2/5] media: pt3: " Akihiro TSUKADA
2025-04-04 13:53 ` [PATCH 3/5] media: intel/ipu6: " Philipp Stanner
2025-04-04 13:53 ` [PATCH 4/5] media: solo6x10: " Philipp Stanner
2025-07-29 4:08 ` Ismael Luceno
2025-04-04 13:53 ` [PATCH 5/5] media: tw5864: " Philipp Stanner
2025-04-14 9:06 ` [PATCH 0/5] media: " Philipp Stanner
2025-04-14 9:15 ` Sakari Ailus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250404135344.93241-4-phasta@kernel.org \
--to=phasta@kernel.org \
--cc=andrey_utkin@fastmail.com \
--cc=bingbu.cao@intel.com \
--cc=djrscally@gmail.com \
--cc=ismael@iodev.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=maintainers@bluecherrydvr.com \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=tian.shu.qiu@intel.com \
--cc=tskd08@gmail.com \
--cc=yong.zhi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®