From patchwork Fri Apr 4 13:53:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 14038506 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 973A41F099F; Fri, 4 Apr 2025 13:54:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743774841; cv=none; b=hTTwBTg77eAPv1mPqEwyMffUEaY1k42dvpaBgWHyvytZOmW09eCQ1kCCWg8Zb4yco/gd/x2jYQxmyom5j8MRtPAIHoFkLs48xlCAc/UgLlUXxtjLXXJImH4g3btjecS1WctfgqVbwYRp/kyvrw472Cwl/V4Ie4/S34oej6QY7z8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743774841; c=relaxed/simple; bh=NEmMiNLJ8sW+fz3Lof0eXQpG7r7OZFQB5oYeF91Zy0k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hoMmUFP76SNQt6NKi7vhsFJN7U6vKxckrSyLt7OdyLh/Weat2XQKs/QuZRxJMaVnrD/sEPCqyKXm35EV1EIxo16RPwkg9uwFErYrePCJrp2hppqBG8B1omaPo8Voa1+qPP9dxrRORrHqR5aDajx87tEC1GHeKbNMtsJxVJdhPOw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AIGco+PL; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AIGco+PL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F3F35C4CEDD; Fri, 4 Apr 2025 13:53:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743774841; bh=NEmMiNLJ8sW+fz3Lof0eXQpG7r7OZFQB5oYeF91Zy0k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AIGco+PLDA9e/gQTH0qRCJqwDt+KNwhodeMpNJ6c6N0AKtyuHBv6qFLkHUxiU8gSp pstaXQWqptS6cMBer24KTJ2+87tTgIXggBn8nnjCN43J0NqiUiR9NcpESzwf75ATno gvd/S7K7vZrDNTecvC1fowKalNklYZpvt77ZGoT0lGI497l1cjss5JEyfXjj43IaG/ TScJwbvfRFUFnnGjJSCNzVy4N2QApGQjbf+jbPApYHMQvEcHKOHDhAe0mNVCE/4/Uf oGNUsc46qS2ZkTCz+nmtlxYyPmQZ4T71yUxkxi8UJ6yxIaDxsnhW4Kf/CF8d3sOZ6R 9dRMVqmPf537Q== From: Philipp Stanner To: Yong Zhi , Sakari Ailus , Bingbu Cao , Dan Scally , Tianshu Qiu , Mauro Carvalho Chehab , Akihiro Tsukada , Bluecherry Maintainers , Andrey Utkin , Ismael Luceno Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Philipp Stanner Subject: [PATCH 1/5] media: ipu3-cio2: Replace deprecated PCI functions Date: Fri, 4 Apr 2025 15:53:41 +0200 Message-ID: <20250404135344.93241-3-phasta@kernel.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250404135344.93241-2-phasta@kernel.org> References: <20250404135344.93241-2-phasta@kernel.org> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 pcim_iomap_table() and pcim_iomap_regions() have been deprecated. Replace them with pcim_iomap_region(), and pass the actual driver name to that function. Signed-off-by: Philipp Stanner --- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2.c b/drivers/media/pci/intel/ipu3/ipu3-cio2.c index 0c365eb59085..16fde96c9fb2 100644 --- a/drivers/media/pci/intel/ipu3/ipu3-cio2.c +++ b/drivers/media/pci/intel/ipu3/ipu3-cio2.c @@ -1702,14 +1702,13 @@ static int cio2_pci_probe(struct pci_dev *pci_dev, dev_info(dev, "device 0x%x (rev: 0x%x)\n", pci_dev->device, pci_dev->revision); - r = pcim_iomap_regions(pci_dev, 1 << CIO2_PCI_BAR, pci_name(pci_dev)); + cio2->base = pcim_iomap_region(pci_dev, CIO2_PCI_BAR, CIO2_NAME); + r = PTR_ERR_OR_ZERO(cio2->base); if (r) { dev_err(dev, "failed to remap I/O memory (%d)\n", r); return -ENODEV; } - cio2->base = pcim_iomap_table(pci_dev)[CIO2_PCI_BAR]; - pci_set_drvdata(pci_dev, cio2); pci_set_master(pci_dev); From patchwork Fri Apr 4 13:53:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 14038507 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 23D291F2BA9; Fri, 4 Apr 2025 13:54:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743774845; cv=none; b=ZGgR9a/tvk8arwq3DrZRypzYNpiqpuYXmWXYmHeG7vHSYmof+fSShJuDMQFXHdBdOBgjJOLIWG7zwsMNxgvtNc/eMKIG4C3j56/bi+Cgg2ng03sP/2yTjy566x5GTBOxsTZXMNAU2aADE9W3Fc5wwmSLixDAyyZdwZfHZ0gu0YY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743774845; c=relaxed/simple; bh=8Noe45DVxrCipOpWiqDqps479fMfVGGdmsz1KXnYi1Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AeeCiHYaoBB5GkPdbqDD9c0bNmC9M+2TVXbAW+SKaVJnqX7KEVd8WhnCjMcDxVdJVH+CjV44R1VePWzBE5pUCvc32pke5fMK5W9LsC1zaSnfmUrCdZ8U1BSDZlUb4XLr8wDuvkaLs0nOHR11e5axdEU7sfbwWgJ3VrKFKv7OEKM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ComEo/g/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ComEo/g/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E4F1C4CEE9; Fri, 4 Apr 2025 13:54:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743774844; bh=8Noe45DVxrCipOpWiqDqps479fMfVGGdmsz1KXnYi1Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ComEo/g/HlOYpEctlr7fUCiADzIpWG+fu9oTfbePwlEKLX/03GddMzNQ4qOAgyRrQ Ywh6xDqdHPqVLTy21pRYEZKMqMQq78/MXuPnMu1CCr4AXQa6mPtnRtvHZIsyWqDtBt TMzwu2KXFsRKHrNysofiTGwYcfqJxTNQ40Bc2zMupolpJz8japBxW8O8m9Zjlarn20 NdDOR7A0hTRbRqtMZZ1pD01nydG7ugSrneVVVmaXTwJSNq+nNoHx6Z3jjqcP72O8Nv bEehQuOiHFgt9c0G1OZfwLchTxm/3eBglWy0xEkRdIRi7buFOKR6OnCQupuo2vhmGz aMboOjBGKPJfA== From: Philipp Stanner To: Yong Zhi , Sakari Ailus , Bingbu Cao , Dan Scally , Tianshu Qiu , Mauro Carvalho Chehab , Akihiro Tsukada , Bluecherry Maintainers , Andrey Utkin , Ismael Luceno Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Philipp Stanner Subject: [PATCH 2/5] media: pt3: Replace deprecated PCI functions Date: Fri, 4 Apr 2025 15:53:42 +0200 Message-ID: <20250404135344.93241-4-phasta@kernel.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250404135344.93241-2-phasta@kernel.org> References: <20250404135344.93241-2-phasta@kernel.org> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 pcim_iomap_table() and pcim_iomap_regions() have been deprecated. Replace them with pcim_iomap_region(). Signed-off-by: Philipp Stanner --- 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) { From patchwork Fri Apr 4 13:53:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 14038508 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D74E1F2BA9; Fri, 4 Apr 2025 13:54:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743774848; cv=none; b=Cfjdxbsv0E8hFt2mUJjT0olfGp+vqDDbeXfEx4I0W3RTtJyyj5M/+TU3iZgYPuwQ4zBxNTUOulJm9PSGc4hLQOrNe3lhUOkUd+voT/tuDAk/WRprel45th0KnHit7GF6hCA2NDmxQq0HDIDVc1jU2/r6gpXN9YpgbCb8JYoIxoc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743774848; c=relaxed/simple; bh=CLplenXM0KPfFaxZUpLNedqikRzDMW7yNpWq4mZVXhU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sZen7zok7/nptl4dmVvGnSnTfs+7qY7tfCH4PK+dktIMRziGcXI0BGXZsNC+J2GBaQPf0rmMTlNOVjwwyP///J92nx9AhMe6JZCBjS9vZN+eu6VOUiXnUDKXsIHiuM+jJwFP65NuxEk7YvMj2BkytqDjCLOq+sHLwx2aDoVUNAE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Bdj+967Z; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Bdj+967Z" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FBE6C4CEDD; Fri, 4 Apr 2025 13:54:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743774848; bh=CLplenXM0KPfFaxZUpLNedqikRzDMW7yNpWq4mZVXhU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bdj+967ZEIWakpSpD+2lzKJnrIqeFqqt2lWyspgi7j3+36lMoJs4NO1XiStNMQQyd hPbv8N9nSnxfSA6pSkoQXS7LrpYl06ShGm9JhO3GdNnRVJ37lSyFsU/5Mr7M7LjClx 7up2ejG/nM0gH4yorvCa5sobpbiWrID861Zj04tvGxL0onwh6wSCT8fyoFN2JqafFk NqIBL3Fl0m+DzaMn6Tgg+JYnVrg+2nItUu4c1x3S3ncArtQSwq+QCwkbTCpeSdoxAX wWAnJ5rGUcHOKmtcxSOG9ruOkxMlVEP8WCHYv9ztTbG3AobvQ9ekYZ/79Wp8R0yW5Y Sj3CAl2DrxeIg== From: Philipp Stanner To: Yong Zhi , Sakari Ailus , Bingbu Cao , Dan Scally , Tianshu Qiu , Mauro Carvalho Chehab , Akihiro Tsukada , Bluecherry Maintainers , Andrey Utkin , Ismael Luceno Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Philipp Stanner Subject: [PATCH 3/5] media: intel/ipu6: Replace deprecated PCI functions Date: Fri, 4 Apr 2025 15:53:43 +0200 Message-ID: <20250404135344.93241-5-phasta@kernel.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250404135344.93241-2-phasta@kernel.org> References: <20250404135344.93241-2-phasta@kernel.org> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 pcim_iomap_table() and pcim_iomap_regions() have been deprecated. Furthermore, the "name" parameter in pcim_iomap_regions() and its successor, pcim_iomap_region(), should always reflect the driver name, whereas currently it is the device's name. Replace the deprecated functions with pcim_iomap_region() and pass the actual driver name. Signed-off-by: Philipp Stanner --- drivers/media/pci/intel/ipu6/ipu6.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/pci/intel/ipu6/ipu6.c b/drivers/media/pci/intel/ipu6/ipu6.c index 277af7cda8ee..345662542a64 100644 --- a/drivers/media/pci/intel/ipu6/ipu6.c +++ b/drivers/media/pci/intel/ipu6/ipu6.c @@ -525,11 +525,11 @@ static int ipu6_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) phys = pci_resource_start(pdev, IPU6_PCI_BAR); dev_dbg(dev, "IPU6 PCI bar[%u] = %pa\n", IPU6_PCI_BAR, &phys); - ret = pcim_iomap_regions(pdev, 1 << IPU6_PCI_BAR, pci_name(pdev)); - if (ret) - return dev_err_probe(dev, ret, "Failed to I/O mem remapping\n"); + isp->base = pcim_iomap_region(pdev, IPU6_PCI_BAR, IPU6_NAME); + if (IS_ERR(isp->base)) + return dev_err_probe(dev, PTR_ERR(isp->base), + "Failed to I/O mem remapping\n"); - isp->base = pcim_iomap_table(pdev)[IPU6_PCI_BAR]; pci_set_drvdata(pdev, isp); pci_set_master(pdev); From patchwork Fri Apr 4 13:53:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 14038509 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DEEB71F3B87; Fri, 4 Apr 2025 13:54:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743774852; cv=none; b=AQ5ywoNWLiwkz0UbkjZNF2H5hDrsS+Gx1aJlSX0I7606DJrYHC+whQaedjVfn+3s/WVX6qVpb6UyHgcslX/lTlpd0gGht9zDlE+RwcamePfiwJ9lQZ0I52YbtbHjHFhBERfeqKXriuYeZBRmzVigO6A1ACQvyplHZTWW8T9DCnI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743774852; c=relaxed/simple; bh=3g1kiruXd/1vYGMd8zg8tiToBrR00gAQSaRMjlzmpRs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sIIEvoMS4UzYUkVIWAZFU3D4QCwlCGNYe+rBbVmZZDYEwuIMXHB0A/s7UfUZ2iNflviqbq7U2nbBEr5q1VVcj4WhUtN/iwAlCVCiVKSDc3LVGjRjIcamY+1bRhpZQ0LZrnIJYOJY9dqqcL0KMKJxRt3PhUtNG2ShsCXCLdgmDl8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IZ9ZvOKu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IZ9ZvOKu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 85906C4CEDD; Fri, 4 Apr 2025 13:54:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743774851; bh=3g1kiruXd/1vYGMd8zg8tiToBrR00gAQSaRMjlzmpRs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IZ9ZvOKuY3FSXrmx9JHEy+JNBOt2sDmWNDceP28zPuTU1rKJ0X+XCX55JezDj+gj7 wcYqE0cEycQ//4ehceFe+jNbPGkf9blhzYBTDdR7JPhGg+NJJHRtsGOSVab0Eblt9N xjW1LHjK2VOAwv+YjLph6S14H3ZKuDdoj42JMl5OpzzSx0SvVibGKYIk3Yi1K8F1Cn 3n1+WwEj/OLkiH6HuZRKfP5xVJcf4ULNzN3uDpwqE4eONvw+zu1ZR2+gGO9eL/Qbdu OBIcQ5stNICX54OIWG7CLlkkpXvaYcLDEQq9CuesgPdve2kQ7isCiGNg1HAZ6Bjf9g d+8X5grX4PtNg== From: Philipp Stanner To: Yong Zhi , Sakari Ailus , Bingbu Cao , Dan Scally , Tianshu Qiu , Mauro Carvalho Chehab , Akihiro Tsukada , Bluecherry Maintainers , Andrey Utkin , Ismael Luceno Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Philipp Stanner Subject: [PATCH 4/5] media: solo6x10: Replace deprecated PCI functions Date: Fri, 4 Apr 2025 15:53:44 +0200 Message-ID: <20250404135344.93241-6-phasta@kernel.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250404135344.93241-2-phasta@kernel.org> References: <20250404135344.93241-2-phasta@kernel.org> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 pcim_iomap_table() and pcim_iomap_regions() have been deprecated. Replace them with pcim_iomap_region(). Signed-off-by: Philipp Stanner --- drivers/media/pci/solo6x10/solo6x10-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/pci/solo6x10/solo6x10-core.c b/drivers/media/pci/solo6x10/solo6x10-core.c index 6ec1480a6d18..febb2c156cf6 100644 --- a/drivers/media/pci/solo6x10/solo6x10-core.c +++ b/drivers/media/pci/solo6x10/solo6x10-core.c @@ -477,10 +477,10 @@ static int solo_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) pci_write_config_byte(pdev, 0x40, 0x00); pci_write_config_byte(pdev, 0x41, 0x00); - ret = pcim_iomap_regions(pdev, BIT(0), SOLO6X10_NAME); + solo_dev->reg_base = pcim_iomap_region(pdev, 0, SOLO6X10_NAME); + ret = PTR_ERR_OR_ZERO(solo_dev->reg_base); if (ret) goto fail_probe; - solo_dev->reg_base = pcim_iomap_table(pdev)[0]; chip_id = solo_reg_read(solo_dev, SOLO_CHIP_OPTION) & SOLO_CHIP_ID_MASK; From patchwork Fri Apr 4 13:53:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 14038510 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E8491F3B92; Fri, 4 Apr 2025 13:54:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743774858; cv=none; b=hGYl32VidkZ9J1xyHVoocPljdHJiV6h8WtbZKR68misdQoGjRRIHyXFsvm8AY/omyKD1HBTH+YTKxey+U9ysrzX5cA/BCMS6YeOOJWQxr2Y1hx0NxJFFSi6lBZxjtrF1K2mDOnJFzNvyKFRuHkTAM9h+ZyBzuMiKTh6TiWhuDbQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743774858; c=relaxed/simple; bh=7ymnAIVE6QQ58E88Ri+jSO940Kj+C1uzuSwsIQri0B8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iwCwsnM3TZV61gnxHCE+yrbUScfrB84Zn+qhoApRjzvCuBw5I3j8E8x7S2PdOTVx1+FcsVy5AwNzi4xIx0sQaMjVQyuXs20CwCCfrMiOUBPNvwofiv8hOreuiCCvhSm4Xw2FjfB9blmjmNRwQikDi3uLlbsE0rWJtjpmD087BqA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OZsMaGUd; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OZsMaGUd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E24EFC4CEE9; Fri, 4 Apr 2025 13:54:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743774854; bh=7ymnAIVE6QQ58E88Ri+jSO940Kj+C1uzuSwsIQri0B8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OZsMaGUd5QWZA5oJ2EI1WN97sxwdnYSojB6+d1NKdFQnvwSZ6ITyr1k7I+dqYbEaU jXttcZ+2geUhOInPgc4eakcpc0dMgVQr7atYbwNq8OJwSYpYwWa0f6MnfoPtVWfLh3 GDH3P/XOHSaRDf3JX7Lz4wVozSSVLZGA9RPtUMeJk5N2rsjmy/kpAAilyLiKeIf372 JBMZGqJC6MgfLyecv5OVVv5WkoLMOjnLOY1wckhSWnDNegaE/wufsPv+AobicHpLs8 U16map6yLtvM47zBwnJBz6hoCzo9Ns8rKJlN7PWyEWM6z0oxgORKATqPxDDVdoZx2O OibtoTNaZCEpw== From: Philipp Stanner To: Yong Zhi , Sakari Ailus , Bingbu Cao , Dan Scally , Tianshu Qiu , Mauro Carvalho Chehab , Akihiro Tsukada , Bluecherry Maintainers , Andrey Utkin , Ismael Luceno Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Philipp Stanner Subject: [PATCH 5/5] media: tw5864: Replace deprecated PCI functions Date: Fri, 4 Apr 2025 15:53:45 +0200 Message-ID: <20250404135344.93241-7-phasta@kernel.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250404135344.93241-2-phasta@kernel.org> References: <20250404135344.93241-2-phasta@kernel.org> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 pcim_iomap_table() and pcim_iomap_regions() have been deprecated. pcim_iomap_regions(), furthermore, has so far wrongly been passed the device's name instead of the driver's name, which makes that function's debug prints useless. Replace the deprecated function with pcim_iomap_region(). Define the driver name globally and use it where appropriate. Signed-off-by: Philipp Stanner --- drivers/media/pci/tw5864/tw5864-core.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/media/pci/tw5864/tw5864-core.c b/drivers/media/pci/tw5864/tw5864-core.c index 4d33caf83307..832788603f88 100644 --- a/drivers/media/pci/tw5864/tw5864-core.c +++ b/drivers/media/pci/tw5864/tw5864-core.c @@ -24,6 +24,8 @@ #include "tw5864.h" #include "tw5864-reg.h" +#define DRIVER_NAME "tw5864" + MODULE_DESCRIPTION("V4L2 driver module for tw5864-based multimedia capture & encoding devices"); MODULE_AUTHOR("Bluecherry Maintainers "); MODULE_AUTHOR("Andrey Utkin "); @@ -246,7 +248,8 @@ static int tw5864_initdev(struct pci_dev *pci_dev, if (!dev) return -ENOMEM; - snprintf(dev->name, sizeof(dev->name), "tw5864:%s", pci_name(pci_dev)); + snprintf(dev->name, sizeof(dev->name), "%s:%s", DRIVER_NAME, + pci_name(pci_dev)); err = v4l2_device_register(&pci_dev->dev, &dev->v4l2_dev); if (err) @@ -269,12 +272,12 @@ static int tw5864_initdev(struct pci_dev *pci_dev, } /* get mmio */ - err = pcim_iomap_regions(pci_dev, BIT(0), dev->name); + dev->mmio = pcim_iomap_region(pci_dev, 0, DRIVER_NAME); + err = PTR_ERR_OR_ZERO(dev->mmio); if (err) { dev_err(&dev->pci->dev, "Cannot request regions for MMIO\n"); goto unreg_v4l2; } - dev->mmio = pcim_iomap_table(pci_dev)[0]; spin_lock_init(&dev->slock); @@ -290,7 +293,7 @@ static int tw5864_initdev(struct pci_dev *pci_dev, /* get irq */ err = devm_request_irq(&pci_dev->dev, pci_dev->irq, tw5864_isr, - IRQF_SHARED, "tw5864", dev); + IRQF_SHARED, DRIVER_NAME, dev); if (err < 0) { dev_err(&dev->pci->dev, "can't get IRQ %d\n", pci_dev->irq); goto fini_video; @@ -324,7 +327,7 @@ static void tw5864_finidev(struct pci_dev *pci_dev) } static struct pci_driver tw5864_pci_driver = { - .name = "tw5864", + .name = DRIVER_NAME, .id_table = tw5864_pci_tbl, .probe = tw5864_initdev, .remove = tw5864_finidev,