diff options
author | Li Zetao <lizetao1@huawei.com> | 2023-08-01 16:51:07 +0800 |
---|---|---|
committer | Jassi Brar <jaswinder.singh@linaro.org> | 2023-09-05 10:10:42 -0500 |
commit | 4aac24c105951fd2d3faeed05f70d4be7af3d26c (patch) | |
tree | f9d914af0b5f6003d5aac3327e0ede81387e22b0 /drivers/mailbox | |
parent | 65d9aa3191432ec672f32291b047a00fe67d71cc (diff) |
mailbox: ti-msgmgr: Use devm_platform_ioremap_resource_byname()
Convert platform_get_resource_byname() + devm_ioremap_resource() to a
single call to devm_platform_ioremap_resource_byname(), as this is
exactly what this function does.
Signed-off-by: Li Zetao <lizetao1@huawei.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Diffstat (limited to 'drivers/mailbox')
-rw-r--r-- | drivers/mailbox/ti-msgmgr.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/mailbox/ti-msgmgr.c b/drivers/mailbox/ti-msgmgr.c index 03048cbda525..a94577f16a47 100644 --- a/drivers/mailbox/ti-msgmgr.c +++ b/drivers/mailbox/ti-msgmgr.c @@ -812,7 +812,6 @@ static int ti_msgmgr_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; const struct of_device_id *of_id; struct device_node *np; - struct resource *res; const struct ti_msgmgr_desc *desc; struct ti_msgmgr_inst *inst; struct ti_queue_inst *qinst; @@ -843,22 +842,19 @@ static int ti_msgmgr_probe(struct platform_device *pdev) inst->dev = dev; inst->desc = desc; - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, - desc->data_region_name); - inst->queue_proxy_region = devm_ioremap_resource(dev, res); + inst->queue_proxy_region = + devm_platform_ioremap_resource_byname(pdev, desc->data_region_name); if (IS_ERR(inst->queue_proxy_region)) return PTR_ERR(inst->queue_proxy_region); - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, - desc->status_region_name); - inst->queue_state_debug_region = devm_ioremap_resource(dev, res); + inst->queue_state_debug_region = + devm_platform_ioremap_resource_byname(pdev, desc->status_region_name); if (IS_ERR(inst->queue_state_debug_region)) return PTR_ERR(inst->queue_state_debug_region); if (desc->is_sproxy) { - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, - desc->ctrl_region_name); - inst->queue_ctrl_region = devm_ioremap_resource(dev, res); + inst->queue_ctrl_region = + devm_platform_ioremap_resource_byname(pdev, desc->ctrl_region_name); if (IS_ERR(inst->queue_ctrl_region)) return PTR_ERR(inst->queue_ctrl_region); } |