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

Configure Feed

Select the types of activity you want to include in your feed.

phy: freescale: imx8m-pcie: Use devm_platform_ioremap_resource()

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

Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230428052758.38636-1-yang.lee@linux.alibaba.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Yang Li and committed by
Vinod Koul
1541fbac fdab4786

+1 -3
+1 -3
drivers/phy/freescale/phy-fsl-imx8m-pcie.c
··· 206 206 struct device *dev = &pdev->dev; 207 207 struct device_node *np = dev->of_node; 208 208 struct imx8_pcie_phy *imx8_phy; 209 - struct resource *res; 210 209 211 210 imx8_phy = devm_kzalloc(dev, sizeof(*imx8_phy), GFP_KERNEL); 212 211 if (!imx8_phy) ··· 258 259 "Failed to get PCIE PHY PERST control\n"); 259 260 } 260 261 261 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 262 - imx8_phy->base = devm_ioremap_resource(dev, res); 262 + imx8_phy->base = devm_platform_ioremap_resource(pdev, 0); 263 263 if (IS_ERR(imx8_phy->base)) 264 264 return PTR_ERR(imx8_phy->base); 265 265