Skip to content

Commit b53e197

Browse files
Minghao Chivinodkoul
authored andcommitted
phy: 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: Minghao Chi <chi.minghao@zte.com.cn> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/202211171411439883050@zte.com.cn Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 4d0c216 commit b53e197

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/phy/marvell/phy-mmp3-hsic.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,10 @@ static int mmp3_hsic_phy_probe(struct platform_device *pdev)
4141
{
4242
struct device *dev = &pdev->dev;
4343
struct phy_provider *provider;
44-
struct resource *resource;
4544
void __iomem *base;
4645
struct phy *phy;
4746

48-
resource = platform_get_resource(pdev, IORESOURCE_MEM, 0);
49-
base = devm_ioremap_resource(dev, resource);
47+
base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
5048
if (IS_ERR(base))
5149
return PTR_ERR(base);
5250

0 commit comments

Comments
 (0)