Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy: rockchip: phy-rockchip-typec: Use devm_platform_get_and_ioremap_resource()

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230705090126.26854-2-frank.li@vivo.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Yangtao Li and committed by
Vinod Koul
1f8fe326 14626246

+1 -2
+1 -2
drivers/phy/rockchip/phy-rockchip-typec.c
··· 1116 1116 return -EINVAL; 1117 1117 } 1118 1118 1119 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1120 - tcphy->base = devm_ioremap_resource(dev, res); 1119 + tcphy->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); 1121 1120 if (IS_ERR(tcphy->base)) 1122 1121 return PTR_ERR(tcphy->base); 1123 1122