aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-lpss-pci.c
diff options
context:
space:
mode:
authorPhilipp Stanner <pstanner@redhat.com>2024-11-11 10:09:45 +0100
committerUwe Kleine-König <ukleinek@kernel.org>2024-12-18 11:12:05 +0100
commit10435e0d2377e5fc0353ba9948aa47b9c029ca7b (patch)
tree2d9e20844246bf2594b4cdd42814683003c12d16 /drivers/pwm/pwm-lpss-pci.c
parentpwm: stm32: Fix complementary output in round_waveform_tohw() (diff)
downloadlinux-rng-10435e0d2377e5fc0353ba9948aa47b9c029ca7b.tar.xz
linux-rng-10435e0d2377e5fc0353ba9948aa47b9c029ca7b.zip
pwm: Replace deprecated PCI functions
pcim_iomap_table() and pcim_request_regions() have been deprecated in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()") and commit d140f80f60358 ("PCI: Deprecate pcim_iomap_regions() in favor of pcim_iomap_region()"). Replace these functions with pcim_iomap_region(). Additionally, pass the actual driver names to pcim_iomap_region() instead of the previous pci_name(), since the 'name' parameter should always reflect which driver owns a region. Signed-off-by: Philipp Stanner <pstanner@redhat.com> Link: https://lore.kernel.org/r/20241111090944.11293-2-pstanner@redhat.com Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
Diffstat (limited to 'drivers/pwm/pwm-lpss-pci.c')
-rw-r--r--drivers/pwm/pwm-lpss-pci.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/pwm/pwm-lpss-pci.c b/drivers/pwm/pwm-lpss-pci.c
index f7ece2809e6b..823f570afb80 100644
--- a/drivers/pwm/pwm-lpss-pci.c
+++ b/drivers/pwm/pwm-lpss-pci.c
@@ -18,6 +18,7 @@ static int pwm_lpss_probe_pci(struct pci_dev *pdev,
const struct pci_device_id *id)
{
const struct pwm_lpss_boardinfo *info;
+ void __iomem *io_base;
struct pwm_chip *chip;
int err;
@@ -25,12 +26,12 @@ static int pwm_lpss_probe_pci(struct pci_dev *pdev,
if (err < 0)
return err;
- err = pcim_iomap_regions(pdev, BIT(0), pci_name(pdev));
- if (err)
- return err;
+ io_base = pcim_iomap_region(pdev, 0, "pwm-lpss");
+ if (IS_ERR(io_base))
+ return PTR_ERR(io_base);
info = (struct pwm_lpss_boardinfo *)id->driver_data;
- chip = devm_pwm_lpss_probe(&pdev->dev, pcim_iomap_table(pdev)[0], info);
+ chip = devm_pwm_lpss_probe(&pdev->dev, io_base, info);
if (IS_ERR(chip))
return PTR_ERR(chip);