summaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-dwc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-01-22 10:43:09 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2025-01-22 10:43:09 -0800
commitd12f68b5ba08e8b4527532fa8a61c404c9832842 (patch)
treebdc59b00beb9c3adbce1034dcb20ab6b4fc6e41c /drivers/pwm/pwm-dwc.c
parent2bf717b07969b6d9e9ba5bccd3ac778e9aeaab18 (diff)
parente8c59791ebb60790c74b2c3ab520f04a8a57219a (diff)
Merge tag 'pwm/for-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux
Pull pwm updates from Uwe Kleine-König: "This time there are very little changes for pwm. There is nothing new, just a few maintenance cleanups. The contributors this time around were Krzysztof Kozlowski, Mingwei Zheng, Philipp Stanner, and Stanislav Jakubek. Thanks!" * tag 'pwm/for-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux: pwm: stm32: Add check for clk_enable() dt-bindings: pwm: Correct indentation and style in DTS example pwm: stm32-lp: Add check for clk_enable() dt-bindings: pwm: marvell,berlin-pwm: Convert from txt to yaml dt-bindings: pwm: sprd,ums512-pwm: convert to YAML pwm: Replace deprecated PCI functions
Diffstat (limited to 'drivers/pwm/pwm-dwc.c')
-rw-r--r--drivers/pwm/pwm-dwc.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/pwm/pwm-dwc.c b/drivers/pwm/pwm-dwc.c
index fb3eadf6fbc4..b6c16139ce4a 100644
--- a/drivers/pwm/pwm-dwc.c
+++ b/drivers/pwm/pwm-dwc.c
@@ -66,20 +66,16 @@ static int dwc_pwm_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 dev_err_probe(dev, ret, "Failed to iomap PCI BAR\n");
-
info = (const struct dwc_pwm_info *)id->driver_data;
ddata = devm_kzalloc(dev, struct_size(ddata, chips, info->nr), GFP_KERNEL);
if (!ddata)
return -ENOMEM;
- /*
- * No need to check for pcim_iomap_table() failure,
- * pcim_iomap_regions() already does it for us.
- */
- ddata->io_base = pcim_iomap_table(pci)[0];
+ ddata->io_base = pcim_iomap_region(pci, 0, "pwm-dwc");
+ if (IS_ERR(ddata->io_base))
+ return dev_err_probe(dev, PTR_ERR(ddata->io_base),
+ "Failed to request / iomap PCI BAR\n");
+
ddata->info = info;
for (idx = 0; idx < ddata->info->nr; idx++) {