* [PATCH] mailbox: tegra-hsp: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-07 7:42 Cai Huoqing
2021-10-07 19:51 ` Thierry Reding
0 siblings, 1 reply; 2+ messages in thread
From: Cai Huoqing @ 2021-09-07 7:42 UTC (permalink / raw)
To: caihuoqing
Cc: Jassi Brar, Thierry Reding, Jonathan Hunter, linux-kernel, linux-tegra
Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately
Signed-off-by: Cai Huoqing <caihuoqing@baidu.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 acd0675da681..bfd70934a25e 100644
--- a/drivers/mailbox/tegra-hsp.c
+++ b/drivers/mailbox/tegra-hsp.c
@@ -640,7 +640,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;
@@ -654,8 +653,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.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mailbox: tegra-hsp: Make use of the helper function devm_platform_ioremap_resource()
2021-09-07 7:42 [PATCH] mailbox: tegra-hsp: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
@ 2021-10-07 19:51 ` Thierry Reding
0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2021-10-07 19:51 UTC (permalink / raw)
To: Cai Huoqing; +Cc: Jassi Brar, Jonathan Hunter, linux-kernel, linux-tegra
[-- Attachment #1: Type: text/plain, Size: 406 bytes --]
On Tue, Sep 07, 2021 at 03:42:07PM +0800, Cai Huoqing wrote:
> Use the devm_platform_ioremap_resource() helper instead of
> calling platform_get_resource() and devm_ioremap_resource()
> separately
>
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
> ---
> drivers/mailbox/tegra-hsp.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Acked-by: Thierry Reding <treding@nvidia.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-07 19:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-07 7:42 [PATCH] mailbox: tegra-hsp: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
2021-10-07 19:51 ` Thierry Reding
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).