Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7733dc1 authored by Fabio Estevam's avatar Fabio Estevam Committed by Felipe Balbi
Browse files

usb: phy: qcom: Use devm_ioremap_resource()



Using devm_ioremap_resource() can make the code simpler, as it
already does the resource NULL check.

Signed-off-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 89c99682
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -270,12 +270,9 @@ static int phy_8x16_probe(struct platform_device *pdev)
	platform_set_drvdata(pdev, qphy);

	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	if (!res)
		return -EINVAL;

	qphy->regs = devm_ioremap(&pdev->dev, res->start, resource_size(res));
	if (!qphy->regs)
		return -ENOMEM;
	qphy->regs = devm_ioremap_resource(&pdev->dev, res);
	if (IS_ERR(qphy->regs))
		return PTR_ERR(qphy->regs);

	phy			= &qphy->phy;
	phy->dev		= &pdev->dev;