soc: qcom: geni: Make use of the helper function devm_platform_ioremap_resource()
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> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20210908080216.1301-3-caihuoqing@baidu.com
This commit is contained in:
parent
172037b12b
commit
d21dc0be36
@ -871,7 +871,6 @@ EXPORT_SYMBOL(geni_icc_disable);
|
||||
static int geni_se_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct resource *res;
|
||||
struct geni_wrapper *wrapper;
|
||||
int ret;
|
||||
|
||||
@ -880,8 +879,7 @@ static int geni_se_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
wrapper->dev = dev;
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
wrapper->base = devm_ioremap_resource(dev, res);
|
||||
wrapper->base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(wrapper->base))
|
||||
return PTR_ERR(wrapper->base);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user