summaryrefslogtreecommitdiff
path: root/drivers/phy/broadcom/phy-bcm-ns-usb3.c
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2020-11-06 14:08:36 +0800
committerVinod Koul <vkoul@kernel.org>2020-11-16 12:47:46 +0530
commitf669bc8b9f7beb6b1936882a2c3670dc1bd985ba (patch)
tree8d710a482011711ad6e67b0368793560d2fd58a5 /drivers/phy/broadcom/phy-bcm-ns-usb3.c
parent202de02556bb49ba35f5c7675934b9b14bbb2a56 (diff)
downloadlwn-f669bc8b9f7beb6b1936882a2c3670dc1bd985ba.tar.gz
lwn-f669bc8b9f7beb6b1936882a2c3670dc1bd985ba.zip
phy: broadcom: convert to devm_platform_ioremap_resource(_byname)
Use devm_platform_ioremap_resource(_byname) to simplify code Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Cc: Al Cooper <alcooperx@gmail.com> Link: https://lore.kernel.org/r/1604642930-29019-3-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy/broadcom/phy-bcm-ns-usb3.c')
-rw-r--r--drivers/phy/broadcom/phy-bcm-ns-usb3.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/phy/broadcom/phy-bcm-ns-usb3.c b/drivers/phy/broadcom/phy-bcm-ns-usb3.c
index 47b029fbebbd..42baf4d6dd5d 100644
--- a/drivers/phy/broadcom/phy-bcm-ns-usb3.c
+++ b/drivers/phy/broadcom/phy-bcm-ns-usb3.c
@@ -305,7 +305,6 @@ static int bcm_ns_usb3_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
const struct of_device_id *of_id;
struct bcm_ns_usb3 *usb3;
- struct resource *res;
struct phy_provider *phy_provider;
usb3 = devm_kzalloc(dev, sizeof(*usb3), GFP_KERNEL);
@@ -319,15 +318,13 @@ static int bcm_ns_usb3_probe(struct platform_device *pdev)
return -EINVAL;
usb3->family = (enum bcm_ns_family)of_id->data;
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dmp");
- usb3->dmp = devm_ioremap_resource(dev, res);
+ usb3->dmp = devm_platform_ioremap_resource_byname(pdev, "dmp");
if (IS_ERR(usb3->dmp)) {
dev_err(dev, "Failed to map DMP regs\n");
return PTR_ERR(usb3->dmp);
}
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ccb-mii");
- usb3->ccb_mii = devm_ioremap_resource(dev, res);
+ usb3->ccb_mii = devm_platform_ioremap_resource_byname(pdev, "ccb-mii");
if (IS_ERR(usb3->ccb_mii)) {
dev_err(dev, "Failed to map ChipCommon B MII regs\n");
return PTR_ERR(usb3->ccb_mii);