summaryrefslogtreecommitdiff
path: root/drivers/phy/ralink
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2020-11-06 14:08:44 +0800
committerVinod Koul <vkoul@kernel.org>2020-11-16 12:47:47 +0530
commitfc5662127a257eafcb37133fa272b1ab0813ae07 (patch)
tree8be07842538304f3c91f9536704e78227ef63b8c /drivers/phy/ralink
parent8a7772cdd91de4eea6dcd9df9b6fce7f4c012208 (diff)
phy: phy-ralink-usb: 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-11-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy/ralink')
-rw-r--r--drivers/phy/ralink/phy-ralink-usb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/phy/ralink/phy-ralink-usb.c b/drivers/phy/ralink/phy-ralink-usb.c
index 95dfa9fd284d..2bd8ad2e76ed 100644
--- a/drivers/phy/ralink/phy-ralink-usb.c
+++ b/drivers/phy/ralink/phy-ralink-usb.c
@@ -170,7 +170,6 @@ MODULE_DEVICE_TABLE(of, ralink_usb_phy_of_match);
static int ralink_usb_phy_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
- struct resource *res;
struct phy_provider *phy_provider;
const struct of_device_id *match;
struct ralink_usb_phy *phy;
@@ -194,8 +193,7 @@ static int ralink_usb_phy_probe(struct platform_device *pdev)
/* The MT7628 and MT7688 require extra setup of PHY registers. */
if (of_device_is_compatible(dev->of_node, "mediatek,mt7628-usbphy")) {
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- phy->base = devm_ioremap_resource(&pdev->dev, res);
+ phy->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(phy->base)) {
dev_err(dev, "failed to remap register memory\n");
return PTR_ERR(phy->base);