All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: Vinod Koul <vkoul@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Chun-Kuang Hu <chunkuang.hu@kernel.org>
Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	<linux-phy@lists.infradead.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <dri-devel@lists.freedesktop.org>,
	Eddie Hung <eddie.hung@mediatek.com>
Subject: [PATCH 7/9] phy: phy-mtk-hdmi: convert to devm_platform_ioremap_resource
Date: Wed, 28 Jul 2021 15:58:29 +0800	[thread overview]
Message-ID: <1627459111-2907-7-git-send-email-chunfeng.yun@mediatek.com> (raw)
In-Reply-To: <1627459111-2907-1-git-send-email-chunfeng.yun@mediatek.com>

Use devm_platform_ioremap_resource to simplify code

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/phy/mediatek/phy-mtk-hdmi.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/phy/mediatek/phy-mtk-hdmi.c b/drivers/phy/mediatek/phy-mtk-hdmi.c
index 8ad8f717ef43..5fb4217fb8e0 100644
--- a/drivers/phy/mediatek/phy-mtk-hdmi.c
+++ b/drivers/phy/mediatek/phy-mtk-hdmi.c
@@ -100,7 +100,6 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct mtk_hdmi_phy *hdmi_phy;
-	struct resource *mem;
 	struct clk *ref_clk;
 	const char *ref_clk_name;
 	struct clk_init_data clk_init = {
@@ -116,11 +115,9 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev)
 	if (!hdmi_phy)
 		return -ENOMEM;
 
-	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	hdmi_phy->regs = devm_ioremap_resource(dev, mem);
-	if (IS_ERR(hdmi_phy->regs)) {
+	hdmi_phy->regs = devm_platform_ioremap_resource(pdev, 0);
+	if (IS_ERR(hdmi_phy->regs))
 		return PTR_ERR(hdmi_phy->regs);
-	}
 
 	ref_clk = devm_clk_get(dev, "pll_ref");
 	if (IS_ERR(ref_clk)) {
-- 
2.18.0


WARNING: multiple messages have this Message-ID (diff)
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: Vinod Koul <vkoul@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Chun-Kuang Hu <chunkuang.hu@kernel.org>
Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	<linux-phy@lists.infradead.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <dri-devel@lists.freedesktop.org>,
	Eddie Hung <eddie.hung@mediatek.com>
Subject: [PATCH 7/9] phy: phy-mtk-hdmi: convert to devm_platform_ioremap_resource
Date: Wed, 28 Jul 2021 15:58:29 +0800	[thread overview]
Message-ID: <1627459111-2907-7-git-send-email-chunfeng.yun@mediatek.com> (raw)
In-Reply-To: <1627459111-2907-1-git-send-email-chunfeng.yun@mediatek.com>

Use devm_platform_ioremap_resource to simplify code

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/phy/mediatek/phy-mtk-hdmi.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/phy/mediatek/phy-mtk-hdmi.c b/drivers/phy/mediatek/phy-mtk-hdmi.c
index 8ad8f717ef43..5fb4217fb8e0 100644
--- a/drivers/phy/mediatek/phy-mtk-hdmi.c
+++ b/drivers/phy/mediatek/phy-mtk-hdmi.c
@@ -100,7 +100,6 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct mtk_hdmi_phy *hdmi_phy;
-	struct resource *mem;
 	struct clk *ref_clk;
 	const char *ref_clk_name;
 	struct clk_init_data clk_init = {
@@ -116,11 +115,9 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev)
 	if (!hdmi_phy)
 		return -ENOMEM;
 
-	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	hdmi_phy->regs = devm_ioremap_resource(dev, mem);
-	if (IS_ERR(hdmi_phy->regs)) {
+	hdmi_phy->regs = devm_platform_ioremap_resource(pdev, 0);
+	if (IS_ERR(hdmi_phy->regs))
 		return PTR_ERR(hdmi_phy->regs);
-	}
 
 	ref_clk = devm_clk_get(dev, "pll_ref");
 	if (IS_ERR(ref_clk)) {
-- 
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: Vinod Koul <vkoul@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Chun-Kuang Hu <chunkuang.hu@kernel.org>
Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	<linux-phy@lists.infradead.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <dri-devel@lists.freedesktop.org>,
	Eddie Hung <eddie.hung@mediatek.com>
Subject: [PATCH 7/9] phy: phy-mtk-hdmi: convert to devm_platform_ioremap_resource
Date: Wed, 28 Jul 2021 15:58:29 +0800	[thread overview]
Message-ID: <1627459111-2907-7-git-send-email-chunfeng.yun@mediatek.com> (raw)
In-Reply-To: <1627459111-2907-1-git-send-email-chunfeng.yun@mediatek.com>

Use devm_platform_ioremap_resource to simplify code

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/phy/mediatek/phy-mtk-hdmi.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/phy/mediatek/phy-mtk-hdmi.c b/drivers/phy/mediatek/phy-mtk-hdmi.c
index 8ad8f717ef43..5fb4217fb8e0 100644
--- a/drivers/phy/mediatek/phy-mtk-hdmi.c
+++ b/drivers/phy/mediatek/phy-mtk-hdmi.c
@@ -100,7 +100,6 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct mtk_hdmi_phy *hdmi_phy;
-	struct resource *mem;
 	struct clk *ref_clk;
 	const char *ref_clk_name;
 	struct clk_init_data clk_init = {
@@ -116,11 +115,9 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev)
 	if (!hdmi_phy)
 		return -ENOMEM;
 
-	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	hdmi_phy->regs = devm_ioremap_resource(dev, mem);
-	if (IS_ERR(hdmi_phy->regs)) {
+	hdmi_phy->regs = devm_platform_ioremap_resource(pdev, 0);
+	if (IS_ERR(hdmi_phy->regs))
 		return PTR_ERR(hdmi_phy->regs);
-	}
 
 	ref_clk = devm_clk_get(dev, "pll_ref");
 	if (IS_ERR(ref_clk)) {
-- 
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: Vinod Koul <vkoul@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Chun-Kuang Hu <chunkuang.hu@kernel.org>
Cc: devicetree@vger.kernel.org, Eddie Hung <eddie.hung@mediatek.com>,
	linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-mediatek@lists.infradead.org,
	dri-devel@lists.freedesktop.org,
	Chunfeng Yun <chunfeng.yun@mediatek.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 7/9] phy: phy-mtk-hdmi: convert to devm_platform_ioremap_resource
Date: Wed, 28 Jul 2021 15:58:29 +0800	[thread overview]
Message-ID: <1627459111-2907-7-git-send-email-chunfeng.yun@mediatek.com> (raw)
In-Reply-To: <1627459111-2907-1-git-send-email-chunfeng.yun@mediatek.com>

Use devm_platform_ioremap_resource to simplify code

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/phy/mediatek/phy-mtk-hdmi.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/phy/mediatek/phy-mtk-hdmi.c b/drivers/phy/mediatek/phy-mtk-hdmi.c
index 8ad8f717ef43..5fb4217fb8e0 100644
--- a/drivers/phy/mediatek/phy-mtk-hdmi.c
+++ b/drivers/phy/mediatek/phy-mtk-hdmi.c
@@ -100,7 +100,6 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct mtk_hdmi_phy *hdmi_phy;
-	struct resource *mem;
 	struct clk *ref_clk;
 	const char *ref_clk_name;
 	struct clk_init_data clk_init = {
@@ -116,11 +115,9 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev)
 	if (!hdmi_phy)
 		return -ENOMEM;
 
-	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	hdmi_phy->regs = devm_ioremap_resource(dev, mem);
-	if (IS_ERR(hdmi_phy->regs)) {
+	hdmi_phy->regs = devm_platform_ioremap_resource(pdev, 0);
+	if (IS_ERR(hdmi_phy->regs))
 		return PTR_ERR(hdmi_phy->regs);
-	}
 
 	ref_clk = devm_clk_get(dev, "pll_ref");
 	if (IS_ERR(ref_clk)) {
-- 
2.18.0


WARNING: multiple messages have this Message-ID (diff)
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: Vinod Koul <vkoul@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Chun-Kuang Hu <chunkuang.hu@kernel.org>
Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	<linux-phy@lists.infradead.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <dri-devel@lists.freedesktop.org>,
	Eddie Hung <eddie.hung@mediatek.com>
Subject: [PATCH 7/9] phy: phy-mtk-hdmi: convert to devm_platform_ioremap_resource
Date: Wed, 28 Jul 2021 15:58:29 +0800	[thread overview]
Message-ID: <1627459111-2907-7-git-send-email-chunfeng.yun@mediatek.com> (raw)
In-Reply-To: <1627459111-2907-1-git-send-email-chunfeng.yun@mediatek.com>

Use devm_platform_ioremap_resource to simplify code

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/phy/mediatek/phy-mtk-hdmi.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/phy/mediatek/phy-mtk-hdmi.c b/drivers/phy/mediatek/phy-mtk-hdmi.c
index 8ad8f717ef43..5fb4217fb8e0 100644
--- a/drivers/phy/mediatek/phy-mtk-hdmi.c
+++ b/drivers/phy/mediatek/phy-mtk-hdmi.c
@@ -100,7 +100,6 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct mtk_hdmi_phy *hdmi_phy;
-	struct resource *mem;
 	struct clk *ref_clk;
 	const char *ref_clk_name;
 	struct clk_init_data clk_init = {
@@ -116,11 +115,9 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev)
 	if (!hdmi_phy)
 		return -ENOMEM;
 
-	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	hdmi_phy->regs = devm_ioremap_resource(dev, mem);
-	if (IS_ERR(hdmi_phy->regs)) {
+	hdmi_phy->regs = devm_platform_ioremap_resource(pdev, 0);
+	if (IS_ERR(hdmi_phy->regs))
 		return PTR_ERR(hdmi_phy->regs);
-	}
 
 	ref_clk = devm_clk_get(dev, "pll_ref");
 	if (IS_ERR(ref_clk)) {
-- 
2.18.0
-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  parent reply	other threads:[~2021-07-28  7:59 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-28  7:58 [PATCH 1/9] dt-bindings: phy: mediatek: tphy: support type switch by pericfg Chunfeng Yun
2021-07-28  7:58 ` Chunfeng Yun
2021-07-28  7:58 ` Chunfeng Yun
2021-07-28  7:58 ` Chunfeng Yun
2021-07-28  7:58 ` Chunfeng Yun
2021-07-28  7:58 ` [PATCH 2/9] phy: phy-mtk-tphy: use clock bulk to get clocks Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58 ` [PATCH 3/9] phy: phy-mtk-tphy: support type switch by pericfg Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58 ` [PATCH 4/9] phy: phy-mtk-tphy: print error log using child device Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58 ` [PATCH 5/9] phy: phy-mtk-tphy: remove error log of ioremap failure Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58 ` [PATCH 6/9] phy: phy-mtk-ufs: use clock bulk to get clocks Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58 ` Chunfeng Yun [this message]
2021-07-28  7:58   ` [PATCH 7/9] phy: phy-mtk-hdmi: convert to devm_platform_ioremap_resource Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-30 16:23   ` Chun-Kuang Hu
2021-07-30 16:23     ` Chun-Kuang Hu
2021-07-30 16:23     ` Chun-Kuang Hu
2021-07-30 16:23     ` Chun-Kuang Hu
2021-07-30 16:23     ` Chun-Kuang Hu
2021-07-28  7:58 ` [PATCH 8/9] phy: phy-mtk-mipi-dsi: remove dummy assignment of error number Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-30 16:24   ` Chun-Kuang Hu
2021-07-30 16:24     ` Chun-Kuang Hu
2021-07-30 16:24     ` Chun-Kuang Hu
2021-07-30 16:24     ` Chun-Kuang Hu
2021-07-30 16:24     ` Chun-Kuang Hu
2021-07-28  7:58 ` [PATCH 9/9] phy: phy-mtk-mipi-dsi: convert to devm_platform_ioremap_resource Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-28  7:58   ` Chunfeng Yun
2021-07-30 16:25   ` Chun-Kuang Hu
2021-07-30 16:25     ` Chun-Kuang Hu
2021-07-30 16:25     ` Chun-Kuang Hu
2021-07-30 16:25     ` Chun-Kuang Hu
2021-07-30 16:25     ` Chun-Kuang Hu
2021-08-02 21:33 ` [PATCH 1/9] dt-bindings: phy: mediatek: tphy: support type switch by pericfg Rob Herring
2021-08-02 21:33   ` Rob Herring
2021-08-02 21:33   ` Rob Herring
2021-08-02 21:33   ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1627459111-2907-7-git-send-email-chunfeng.yun@mediatek.com \
    --to=chunfeng.yun@mediatek.com \
    --cc=chunkuang.hu@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eddie.hung@mediatek.com \
    --cc=kishon@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh+dt@kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.