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

phy: phy-xgene: convert to devm_platform_ioremap_resource

Use devm_platform_ioremap_resource to simplify code

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/1604642930-29019-8-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Chunfeng Yun and committed by
Vinod Koul
5d797059 ee55b501

+1 -3
+1 -3
drivers/phy/phy-xgene.c
··· 1644 1644 { 1645 1645 struct phy_provider *phy_provider; 1646 1646 struct xgene_phy_ctx *ctx; 1647 - struct resource *res; 1648 1647 u32 default_spd[] = DEFAULT_SATA_SPD_SEL; 1649 1648 u32 default_txboost_gain[] = DEFAULT_SATA_TXBOOST_GAIN; 1650 1649 u32 default_txeye_direction[] = DEFAULT_SATA_TXEYEDIRECTION; ··· 1660 1661 1661 1662 ctx->dev = &pdev->dev; 1662 1663 1663 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1664 - ctx->sds_base = devm_ioremap_resource(&pdev->dev, res); 1664 + ctx->sds_base = devm_platform_ioremap_resource(pdev, 0); 1665 1665 if (IS_ERR(ctx->sds_base)) 1666 1666 return PTR_ERR(ctx->sds_base); 1667 1667