Skip to content

Commit

Permalink
mailbox: tegra-hsp: Convert to devm_platform_ioremap_resource()
Browse files Browse the repository at this point in the history
Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <[email protected]>
Signed-off-by: Jassi Brar <[email protected]>
  • Loading branch information
bbkzz authored and JassiBrar committed Sep 5, 2023
1 parent 840f682 commit fb5bda8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/mailbox/tegra-hsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,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;
Expand All @@ -742,8 +741,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);

Expand Down

0 comments on commit fb5bda8

Please sign in to comment.