mirror of https://gitee.com/openkylin/linux.git
phy: qualcomm: 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> Link: https://lore.kernel.org/r/1604642930-29019-10-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
7458d650e2
commit
8a7772cdd9
|
@ -201,7 +201,6 @@ static int qcom_apq8064_sata_phy_probe(struct platform_device *pdev)
|
|||
{
|
||||
struct qcom_apq8064_sata_phy *phy;
|
||||
struct device *dev = &pdev->dev;
|
||||
struct resource *res;
|
||||
struct phy_provider *phy_provider;
|
||||
struct phy *generic_phy;
|
||||
int ret;
|
||||
|
@ -210,8 +209,7 @@ static int qcom_apq8064_sata_phy_probe(struct platform_device *pdev)
|
|||
if (!phy)
|
||||
return -ENOMEM;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
phy->mmio = devm_ioremap_resource(dev, res);
|
||||
phy->mmio = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(phy->mmio))
|
||||
return PTR_ERR(phy->mmio);
|
||||
|
||||
|
|
|
@ -95,7 +95,6 @@ MODULE_DEVICE_TABLE(of, ipq4019_usb_phy_of_match);
|
|||
static int ipq4019_usb_phy_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct resource *res;
|
||||
struct phy_provider *phy_provider;
|
||||
struct ipq4019_usb_phy *phy;
|
||||
|
||||
|
@ -104,8 +103,7 @@ static int ipq4019_usb_phy_probe(struct platform_device *pdev)
|
|||
return -ENOMEM;
|
||||
|
||||
phy->dev = &pdev->dev;
|
||||
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);
|
||||
|
|
|
@ -128,7 +128,6 @@ static int qcom_ipq806x_sata_phy_probe(struct platform_device *pdev)
|
|||
{
|
||||
struct qcom_ipq806x_sata_phy *phy;
|
||||
struct device *dev = &pdev->dev;
|
||||
struct resource *res;
|
||||
struct phy_provider *phy_provider;
|
||||
struct phy *generic_phy;
|
||||
int ret;
|
||||
|
@ -137,8 +136,7 @@ static int qcom_ipq806x_sata_phy_probe(struct platform_device *pdev)
|
|||
if (!phy)
|
||||
return -ENOMEM;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
phy->mmio = devm_ioremap_resource(dev, res);
|
||||
phy->mmio = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(phy->mmio))
|
||||
return PTR_ERR(phy->mmio);
|
||||
|
||||
|
|
|
@ -250,7 +250,6 @@ static int qcom_pcie2_phy_probe(struct platform_device *pdev)
|
|||
{
|
||||
struct phy_provider *phy_provider;
|
||||
struct qcom_phy *qphy;
|
||||
struct resource *res;
|
||||
struct device *dev = &pdev->dev;
|
||||
struct phy *phy;
|
||||
int ret;
|
||||
|
@ -260,9 +259,7 @@ static int qcom_pcie2_phy_probe(struct platform_device *pdev)
|
|||
return -ENOMEM;
|
||||
|
||||
qphy->dev = dev;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
qphy->base = devm_ioremap_resource(dev, res);
|
||||
qphy->base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(qphy->base))
|
||||
return PTR_ERR(qphy->base);
|
||||
|
||||
|
|
|
@ -844,7 +844,6 @@ static int qusb2_phy_probe(struct platform_device *pdev)
|
|||
struct qusb2_phy *qphy;
|
||||
struct phy_provider *phy_provider;
|
||||
struct phy *generic_phy;
|
||||
struct resource *res;
|
||||
int ret, i;
|
||||
int num;
|
||||
u32 value;
|
||||
|
@ -855,8 +854,7 @@ static int qusb2_phy_probe(struct platform_device *pdev)
|
|||
return -ENOMEM;
|
||||
or = &qphy->overrides;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
qphy->base = devm_ioremap_resource(dev, res);
|
||||
qphy->base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(qphy->base))
|
||||
return PTR_ERR(qphy->base);
|
||||
|
||||
|
|
Loading…
Reference in New Issue