linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5/5] mailbox: tegra-hsp: Convert to devm_platform_ioremap_resource()
       [not found] <20230704133726.28861-1-frank.li@vivo.com>
@ 2023-07-04 13:37 ` Yangtao Li
  0 siblings, 0 replies; only message in thread
From: Yangtao Li @ 2023-07-04 13:37 UTC (permalink / raw)
  To: Jassi Brar, Thierry Reding, Jonathan Hunter
  Cc: Yangtao Li, linux-kernel, linux-tegra

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/mailbox/tegra-hsp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c
index 573481e436f5..1e82cc2661e8 100644
--- a/drivers/mailbox/tegra-hsp.c
+++ b/drivers/mailbox/tegra-hsp.c
@@ -727,7 +727,6 @@ static int tegra_hsp_request_shared_irq(struct tegra_hsp *hsp)
 static int tegra_hsp_probe(struct platform_device *pdev)
 {
 	struct tegra_hsp *hsp;
-	struct resource *res;
 	unsigned int i;
 	u32 value;
 	int err;
@@ -741,8 +740,7 @@ static int tegra_hsp_probe(struct platform_device *pdev)
 	INIT_LIST_HEAD(&hsp->doorbells);
 	spin_lock_init(&hsp->lock);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	hsp->regs = devm_ioremap_resource(&pdev->dev, res);
+	hsp->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(hsp->regs))
 		return PTR_ERR(hsp->regs);
 
-- 
2.39.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-04 13:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20230704133726.28861-1-frank.li@vivo.com>
2023-07-04 13:37 ` [PATCH 5/5] mailbox: tegra-hsp: Convert to devm_platform_ioremap_resource() Yangtao Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).