From a3911e087d6237f5225bb41bb7d5052c33a794b1 Mon Sep 17 00:00:00 2001 From: Liao Chen Date: Mon, 2 Sep 2024 12:20:14 +0000 Subject: [PATCH 1/2] counter: ftm-quaddec: Enable module autoloading Add MODULE_DEVICE_TABLE(), so modules can be properly autoloaded based on the alias from of_device_id table. Signed-off-by: Liao Chen Link: https://lore.kernel.org/r/20240902122014.905237-1-liaochen4@huawei.com Signed-off-by: William Breathitt Gray --- drivers/counter/ftm-quaddec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/counter/ftm-quaddec.c b/drivers/counter/ftm-quaddec.c index 200876f3ec04..6ac4efb5658b 100644 --- a/drivers/counter/ftm-quaddec.c +++ b/drivers/counter/ftm-quaddec.c @@ -311,6 +311,7 @@ static const struct of_device_id ftm_quaddec_match[] = { { .compatible = "fsl,ftm-quaddec" }, {}, }; +MODULE_DEVICE_TABLE(of, ftm_quaddec_match); static struct platform_driver ftm_quaddec_driver = { .driver = { From 522ae89b78580c62765e160aed3479297baa75be Mon Sep 17 00:00:00 2001 From: Philipp Stanner Date: Mon, 28 Oct 2024 10:13:13 +0100 Subject: [PATCH 2/2] counter: intel-qep: Replace deprecated PCI functions pcim_iomap_regions() and pcim_iomap_table() have been deprecated in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with pcim_iomap_region(). Signed-off-by: Philipp Stanner Link: https://lore.kernel.org/r/20241028091312.17045-2-pstanner@redhat.com Signed-off-by: William Breathitt Gray --- drivers/counter/intel-qep.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/counter/intel-qep.c b/drivers/counter/intel-qep.c index af5942e66f7d..ee2bae27b728 100644 --- a/drivers/counter/intel-qep.c +++ b/drivers/counter/intel-qep.c @@ -408,13 +408,9 @@ static int intel_qep_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 ret; - - regs = pcim_iomap_table(pci)[0]; - if (!regs) - return -ENOMEM; + regs = pcim_iomap_region(pci, 0, pci_name(pci)); + if (IS_ERR(regs)) + return PTR_ERR(regs); qep->dev = dev; qep->regs = regs;