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 <[email protected]> Signed-off-by: ye xingchen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 4d0c216 commit b53e197

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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)