* [PATCH 01/18] drm/renesas: Convert to devm_platform_ioremap_resource()
@ 2023-07-07 7:20 Yangtao Li
2023-07-07 7:20 ` [PATCH 02/18] gpu: ipu-v3: pre: " Yangtao Li
` (17 more replies)
0 siblings, 18 replies; 26+ messages in thread
From: Yangtao Li @ 2023-07-07 7:20 UTC (permalink / raw)
To: Laurent Pinchart, Kieran Bingham, David Airlie, Daniel Vetter
Cc: Yangtao Li, dri-devel, linux-renesas-soc, linux-kernel
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
index e10e4d4b89a2..4bf9f5d15fa8 100644
--- a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
+++ b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
@@ -1002,7 +1002,6 @@ static int rcar_mipi_dsi_get_clocks(struct rcar_mipi_dsi *dsi)
static int rcar_mipi_dsi_probe(struct platform_device *pdev)
{
struct rcar_mipi_dsi *dsi;
- struct resource *mem;
int ret;
dsi = devm_kzalloc(&pdev->dev, sizeof(*dsi), GFP_KERNEL);
@@ -1019,8 +1018,7 @@ static int rcar_mipi_dsi_probe(struct platform_device *pdev)
return ret;
/* Acquire resources. */
- mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- dsi->mmio = devm_ioremap_resource(dsi->dev, mem);
+ dsi->mmio = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(dsi->mmio))
return PTR_ERR(dsi->mmio);
--
2.39.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 02/18] gpu: ipu-v3: pre: Convert to devm_platform_ioremap_resource()
2023-07-07 7:20 [PATCH 01/18] drm/renesas: Convert to devm_platform_ioremap_resource() Yangtao Li
@ 2023-07-07 7:20 ` Yangtao Li
2023-07-07 8:20 ` Philipp Zabel
2023-07-07 7:20 ` [PATCH 03/18] drm/rockchip: dsi: Use devm_platform_get_and_ioremap_resource() Yangtao Li
` (16 subsequent siblings)
17 siblings, 1 reply; 26+ messages in thread
From: Yangtao Li @ 2023-07-07 7:20 UTC (permalink / raw)
To: Philipp Zabel, David Airlie, Daniel Vetter
Cc: Yangtao Li, dri-devel, linux-kernel
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/gpu/ipu-v3/ipu-pre.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/ipu-v3/ipu-pre.c b/drivers/gpu/ipu-v3/ipu-pre.c
index ad82c9e0252f..aef984a43190 100644
--- a/drivers/gpu/ipu-v3/ipu-pre.c
+++ b/drivers/gpu/ipu-v3/ipu-pre.c
@@ -271,15 +271,13 @@ u32 ipu_pre_get_baddr(struct ipu_pre *pre)
static int ipu_pre_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
- struct resource *res;
struct ipu_pre *pre;
pre = devm_kzalloc(dev, sizeof(*pre), GFP_KERNEL);
if (!pre)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- pre->regs = devm_ioremap_resource(&pdev->dev, res);
+ pre->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(pre->regs))
return PTR_ERR(pre->regs);
--
2.39.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 03/18] drm/rockchip: dsi: Use devm_platform_get_and_ioremap_resource()
2023-07-07 7:20 [PATCH 01/18] drm/renesas: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-07 7:20 ` [PATCH 02/18] gpu: ipu-v3: pre: " Yangtao Li
@ 2023-07-07 7:20 ` Yangtao Li
2023-07-07 7:20 ` [PATCH 04/18] drm: kirin: Convert to devm_platform_ioremap_resource() Yangtao Li
` (15 subsequent siblings)
17 siblings, 0 replies; 26+ messages in thread
From: Yangtao Li @ 2023-07-07 7:20 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, David Airlie, Daniel Vetter
Cc: Yangtao Li, dri-devel, linux-arm-kernel, linux-rockchip,
linux-kernel
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: Yangtao Li <frank.li@vivo.com>
---
drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
index 917e79951aac..ab57df7c6eab 100644
--- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
@@ -1351,8 +1351,7 @@ static int dw_mipi_dsi_rockchip_probe(struct platform_device *pdev)
if (!dsi)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- dsi->base = devm_ioremap_resource(dev, res);
+ dsi->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(dsi->base)) {
DRM_DEV_ERROR(dev, "Unable to get dsi registers\n");
return PTR_ERR(dsi->base);
--
2.39.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 04/18] drm: kirin: Convert to devm_platform_ioremap_resource()
2023-07-07 7:20 [PATCH 01/18] drm/renesas: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-07 7:20 ` [PATCH 02/18] gpu: ipu-v3: pre: " Yangtao Li
2023-07-07 7:20 ` [PATCH 03/18] drm/rockchip: dsi: Use devm_platform_get_and_ioremap_resource() Yangtao Li
@ 2023-07-07 7:20 ` Yangtao Li
2023-07-07 7:20 ` [PATCH 05/18] drm/tegra: hdmi: " Yangtao Li
` (14 subsequent siblings)
17 siblings, 0 replies; 26+ messages in thread
From: Yangtao Li @ 2023-07-07 7:20 UTC (permalink / raw)
To: Xinliang Liu, Tian Tao, Xinwei Kong, Sumit Semwal, Yongqin Liu,
John Stultz, David Airlie, Daniel Vetter
Cc: Yangtao Li, dri-devel, linux-kernel
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
index 871f79a6b17e..42ae68c70880 100644
--- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
+++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
@@ -843,7 +843,6 @@ static struct drm_plane_funcs ade_plane_funcs = {
static void *ade_hw_ctx_alloc(struct platform_device *pdev,
struct drm_crtc *crtc)
{
- struct resource *res;
struct device *dev = &pdev->dev;
struct device_node *np = pdev->dev.of_node;
struct ade_hw_ctx *ctx = NULL;
@@ -855,8 +854,7 @@ static void *ade_hw_ctx_alloc(struct platform_device *pdev,
return ERR_PTR(-ENOMEM);
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- ctx->base = devm_ioremap_resource(dev, res);
+ ctx->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(ctx->base)) {
DRM_ERROR("failed to remap ade io base\n");
return ERR_PTR(-EIO);
--
2.39.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 05/18] drm/tegra: hdmi: Convert to devm_platform_ioremap_resource()
2023-07-07 7:20 [PATCH 01/18] drm/renesas: Convert to devm_platform_ioremap_resource() Yangtao Li
` (2 preceding siblings ...)
2023-07-07 7:20 ` [PATCH 04/18] drm: kirin: Convert to devm_platform_ioremap_resource() Yangtao Li
@ 2023-07-07 7:20 ` Yangtao Li
2023-07-07 7:20 ` [PATCH 06/18] drm: bridge: dw_hdmi: Use devm_platform_get_and_ioremap_resource() Yangtao Li
` (13 subsequent siblings)
17 siblings, 0 replies; 26+ messages in thread
From: Yangtao Li @ 2023-07-07 7:20 UTC (permalink / raw)
To: Thierry Reding, Mikko Perttunen, David Airlie, Daniel Vetter,
Jonathan Hunter
Cc: Yangtao Li, dri-devel, linux-tegra, linux-kernel
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/gpu/drm/tegra/hdmi.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
index 6eac54ae1205..f3a44ca87151 100644
--- a/drivers/gpu/drm/tegra/hdmi.c
+++ b/drivers/gpu/drm/tegra/hdmi.c
@@ -1769,7 +1769,6 @@ static irqreturn_t tegra_hdmi_irq(int irq, void *data)
static int tegra_hdmi_probe(struct platform_device *pdev)
{
struct tegra_hdmi *hdmi;
- struct resource *regs;
int err;
hdmi = devm_kzalloc(&pdev->dev, sizeof(*hdmi), GFP_KERNEL);
@@ -1831,8 +1830,7 @@ static int tegra_hdmi_probe(struct platform_device *pdev)
if (err < 0)
return err;
- regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- hdmi->regs = devm_ioremap_resource(&pdev->dev, regs);
+ hdmi->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(hdmi->regs))
return PTR_ERR(hdmi->regs);
--
2.39.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 06/18] drm: bridge: dw_hdmi: Use devm_platform_get_and_ioremap_resource()
2023-07-07 7:20 [PATCH 01/18] drm/renesas: Convert to devm_platform_ioremap_resource() Yangtao Li
` (3 preceding siblings ...)
2023-07-07 7:20 ` [PATCH 05/18] drm/tegra: hdmi: " Yangtao Li
@ 2023-07-07 7:20 ` Yangtao Li
2023-07-07 7:27 ` Neil Armstrong
2023-07-07 7:20 ` [PATCH 07/18] drm/bridge: analogix_dp: Convert to devm_platform_ioremap_resource() Yangtao Li
` (12 subsequent siblings)
17 siblings, 1 reply; 26+ messages in thread
From: Yangtao Li @ 2023-07-07 7:20 UTC (permalink / raw)
To: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, David Airlie, Daniel Vetter
Cc: Yangtao Li, dri-devel, linux-kernel
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: Yangtao Li <frank.li@vivo.com>
---
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
index 7b66f362afd8..b2b320ba2196 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
@@ -3417,8 +3417,7 @@ struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev,
return ERR_PTR(-EINVAL);
}
- iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- hdmi->regs = devm_ioremap_resource(dev, iores);
+ hdmi->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &iores);
if (IS_ERR(hdmi->regs)) {
ret = PTR_ERR(hdmi->regs);
goto err_res;
--
2.39.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 07/18] drm/bridge: analogix_dp: Convert to devm_platform_ioremap_resource()
2023-07-07 7:20 [PATCH 01/18] drm/renesas: Convert to devm_platform_ioremap_resource() Yangtao Li
` (4 preceding siblings ...)
2023-07-07 7:20 ` [PATCH 06/18] drm: bridge: dw_hdmi: Use devm_platform_get_and_ioremap_resource() Yangtao Li
@ 2023-07-07 7:20 ` Yangtao Li
2023-07-07 7:27 ` Neil Armstrong
2023-07-07 7:20 ` [PATCH 08/18] gpu: ipu-v3: prg: " Yangtao Li
` (11 subsequent siblings)
17 siblings, 1 reply; 26+ messages in thread
From: Yangtao Li @ 2023-07-07 7:20 UTC (permalink / raw)
To: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, David Airlie, Daniel Vetter
Cc: Yangtao Li, dri-devel, linux-kernel
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index df9370e0ff23..c6b228f1ed4c 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -1686,7 +1686,6 @@ analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data)
{
struct platform_device *pdev = to_platform_device(dev);
struct analogix_dp_device *dp;
- struct resource *res;
unsigned int irq_flags;
int ret;
@@ -1740,9 +1739,7 @@ analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data)
clk_prepare_enable(dp->clock);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-
- dp->reg_base = devm_ioremap_resource(&pdev->dev, res);
+ dp->reg_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(dp->reg_base)) {
ret = PTR_ERR(dp->reg_base);
goto err_disable_clk;
--
2.39.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 08/18] gpu: ipu-v3: prg: Convert to devm_platform_ioremap_resource()
2023-07-07 7:20 [PATCH 01/18] drm/renesas: Convert to devm_platform_ioremap_resource() Yangtao Li
` (5 preceding siblings ...)
2023-07-07 7:20 ` [PATCH 07/18] drm/bridge: analogix_dp: Convert to devm_platform_ioremap_resource() Yangtao Li
@ 2023-07-07 7:20 ` Yangtao Li
2023-07-07 8:20 ` Philipp Zabel
2023-07-07 7:20 ` [PATCH 09/18] drm/hisilicon: " Yangtao Li
` (10 subsequent siblings)
17 siblings, 1 reply; 26+ messages in thread
From: Yangtao Li @ 2023-07-07 7:20 UTC (permalink / raw)
To: Philipp Zabel, David Airlie, Daniel Vetter
Cc: Yangtao Li, dri-devel, linux-kernel
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/gpu/ipu-v3/ipu-prg.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/ipu-v3/ipu-prg.c b/drivers/gpu/ipu-v3/ipu-prg.c
index 196797c1b4b3..729605709955 100644
--- a/drivers/gpu/ipu-v3/ipu-prg.c
+++ b/drivers/gpu/ipu-v3/ipu-prg.c
@@ -358,7 +358,6 @@ EXPORT_SYMBOL_GPL(ipu_prg_channel_configure_pending);
static int ipu_prg_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
- struct resource *res;
struct ipu_prg *prg;
u32 val;
int i, ret;
@@ -367,12 +366,10 @@ static int ipu_prg_probe(struct platform_device *pdev)
if (!prg)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- prg->regs = devm_ioremap_resource(&pdev->dev, res);
+ prg->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(prg->regs))
return PTR_ERR(prg->regs);
-
prg->clk_ipg = devm_clk_get(dev, "ipg");
if (IS_ERR(prg->clk_ipg))
return PTR_ERR(prg->clk_ipg);
--
2.39.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 09/18] drm/hisilicon: Convert to devm_platform_ioremap_resource()
2023-07-07 7:20 [PATCH 01/18] drm/renesas: Convert to devm_platform_ioremap_resource() Yangtao Li
` (6 preceding siblings ...)
2023-07-07 7:20 ` [PATCH 08/18] gpu: ipu-v3: prg: " Yangtao Li
@ 2023-07-07 7:20 ` Yangtao Li
2023-07-07 7:20 ` [PATCH 10/18] drm: lcdif: " Yangtao Li
` (9 subsequent siblings)
17 siblings, 0 replies; 26+ messages in thread
From: Yangtao Li @ 2023-07-07 7:20 UTC (permalink / raw)
To: Xinliang Liu, Tian Tao, Xinwei Kong, Sumit Semwal, Yongqin Liu,
John Stultz, David Airlie, Daniel Vetter
Cc: Yangtao Li, dri-devel, linux-kernel
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c b/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c
index d9978b79828c..ff4ed4639509 100644
--- a/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c
+++ b/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c
@@ -826,7 +826,6 @@ static const struct component_ops dsi_ops = {
static int dsi_parse_dt(struct platform_device *pdev, struct dw_dsi *dsi)
{
struct dsi_hw_ctx *ctx = dsi->ctx;
- struct resource *res;
ctx->pclk = devm_clk_get(&pdev->dev, "pclk");
if (IS_ERR(ctx->pclk)) {
@@ -834,8 +833,7 @@ static int dsi_parse_dt(struct platform_device *pdev, struct dw_dsi *dsi)
return PTR_ERR(ctx->pclk);
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- ctx->base = devm_ioremap_resource(&pdev->dev, res);
+ ctx->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(ctx->base)) {
DRM_ERROR("failed to remap dsi io region\n");
return PTR_ERR(ctx->base);
--
2.39.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 10/18] drm: lcdif: Convert to devm_platform_ioremap_resource()
2023-07-07 7:20 [PATCH 01/18] drm/renesas: Convert to devm_platform_ioremap_resource() Yangtao Li
` (7 preceding siblings ...)
2023-07-07 7:20 ` [PATCH 09/18] drm/hisilicon: " Yangtao Li
@ 2023-07-07 7:20 ` Yangtao Li
2023-07-07 7:20 ` [PATCH 11/18] drm/mxsfb: " Yangtao Li
` (8 subsequent siblings)
17 siblings, 0 replies; 26+ messages in thread
From: Yangtao Li @ 2023-07-07 7:20 UTC (permalink / raw)
To: Marek Vasut, Stefan Agner, David Airlie, Daniel Vetter, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team
Cc: Yangtao Li, dri-devel, linux-arm-kernel, linux-kernel
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/gpu/drm/mxsfb/lcdif_drv.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/mxsfb/lcdif_drv.c b/drivers/gpu/drm/mxsfb/lcdif_drv.c
index c9d8cbb21407..a7cdd0eec7a2 100644
--- a/drivers/gpu/drm/mxsfb/lcdif_drv.c
+++ b/drivers/gpu/drm/mxsfb/lcdif_drv.c
@@ -134,7 +134,6 @@ static int lcdif_load(struct drm_device *drm)
{
struct platform_device *pdev = to_platform_device(drm->dev);
struct lcdif_drm_private *lcdif;
- struct resource *res;
int ret;
lcdif = devm_kzalloc(&pdev->dev, sizeof(*lcdif), GFP_KERNEL);
@@ -144,8 +143,7 @@ static int lcdif_load(struct drm_device *drm)
lcdif->drm = drm;
drm->dev_private = lcdif;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- lcdif->base = devm_ioremap_resource(drm->dev, res);
+ lcdif->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(lcdif->base))
return PTR_ERR(lcdif->base);
--
2.39.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 11/18] drm/mxsfb: Convert to devm_platform_ioremap_resource()
2023-07-07 7:20 [PATCH 01/18] drm/renesas: Convert to devm_platform_ioremap_resource() Yangtao Li
` (8 preceding siblings ...)
2023-07-07 7:20 ` [PATCH 10/18] drm: lcdif: " Yangtao Li
@ 2023-07-07 7:20 ` Yangtao Li
2023-07-07 7:20 ` [PATCH 12/18] drm/tegra: dpaux: " Yangtao Li
` (7 subsequent siblings)
17 siblings, 0 replies; 26+ messages in thread
From: Yangtao Li @ 2023-07-07 7:20 UTC (permalink / raw)
To: Marek Vasut, Stefan Agner, David Airlie, Daniel Vetter, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team
Cc: Yangtao Li, dri-devel, linux-arm-kernel, linux-kernel
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/gpu/drm/mxsfb/mxsfb_drv.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
index 368b1fbd8305..c8b3fdb1ab09 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
@@ -213,7 +213,6 @@ static int mxsfb_load(struct drm_device *drm,
{
struct platform_device *pdev = to_platform_device(drm->dev);
struct mxsfb_drm_private *mxsfb;
- struct resource *res;
int ret;
mxsfb = devm_kzalloc(&pdev->dev, sizeof(*mxsfb), GFP_KERNEL);
@@ -224,8 +223,7 @@ static int mxsfb_load(struct drm_device *drm,
drm->dev_private = mxsfb;
mxsfb->devdata = devdata;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- mxsfb->base = devm_ioremap_resource(drm->dev, res);
+ mxsfb->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(mxsfb->base))
return PTR_ERR(mxsfb->base);
--
2.39.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 12/18] drm/tegra: dpaux: Convert to devm_platform_ioremap_resource()
2023-07-07 7:20 [PATCH 01/18] drm/renesas: Convert to devm_platform_ioremap_resource() Yangtao Li
` (9 preceding siblings ...)
2023-07-07 7:20 ` [PATCH 11/18] drm/mxsfb: " Yangtao Li
@ 2023-07-07 7:20 ` Yangtao Li
2023-07-07 12:28 ` Thierry Reding
2023-07-07 7:20 ` [PATCH 13/18] drm/stm: ltdc: " Yangtao Li
` (6 subsequent siblings)
17 siblings, 1 reply; 26+ messages in thread
From: Yangtao Li @ 2023-07-07 7:20 UTC (permalink / raw)
To: Thierry Reding, Mikko Perttunen, David Airlie, Daniel Vetter,
Jonathan Hunter
Cc: Yangtao Li, dri-devel, linux-tegra, linux-kernel
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/gpu/drm/tegra/dpaux.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/tegra/dpaux.c b/drivers/gpu/drm/tegra/dpaux.c
index 4d2677dcd831..f120897ce4b3 100644
--- a/drivers/gpu/drm/tegra/dpaux.c
+++ b/drivers/gpu/drm/tegra/dpaux.c
@@ -447,7 +447,6 @@ static const struct pinmux_ops tegra_dpaux_pinmux_ops = {
static int tegra_dpaux_probe(struct platform_device *pdev)
{
struct tegra_dpaux *dpaux;
- struct resource *regs;
u32 value;
int err;
@@ -461,14 +460,13 @@ static int tegra_dpaux_probe(struct platform_device *pdev)
INIT_LIST_HEAD(&dpaux->list);
dpaux->dev = &pdev->dev;
- regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- dpaux->regs = devm_ioremap_resource(&pdev->dev, regs);
+ dpaux->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(dpaux->regs))
return PTR_ERR(dpaux->regs);
dpaux->irq = platform_get_irq(pdev, 0);
if (dpaux->irq < 0)
- return -ENXIO;
+ return dpaux->irq;
if (!pdev->dev.pm_domain) {
dpaux->rst = devm_reset_control_get(&pdev->dev, "dpaux");
--
2.39.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 13/18] drm/stm: ltdc: Convert to devm_platform_ioremap_resource()
2023-07-07 7:20 [PATCH 01/18] drm/renesas: Convert to devm_platform_ioremap_resource() Yangtao Li
` (10 preceding siblings ...)
2023-07-07 7:20 ` [PATCH 12/18] drm/tegra: dpaux: " Yangtao Li
@ 2023-07-07 7:20 ` Yangtao Li
2023-07-07 13:37 ` Raphael Gallais-Pou
2023-07-07 7:20 ` [PATCH 14/18] drm/aspeed: " Yangtao Li
` (5 subsequent siblings)
17 siblings, 1 reply; 26+ messages in thread
From: Yangtao Li @ 2023-07-07 7:20 UTC (permalink / raw)
To: Yannick Fertre, Raphael Gallais-Pou, Philippe Cornu, David Airlie,
Daniel Vetter, Maxime Coquelin, Alexandre Torgue
Cc: Yangtao Li, dri-devel, linux-stm32, linux-arm-kernel,
linux-kernel
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/gpu/drm/stm/ltdc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index b8be4c1db423..734dca4d7dd8 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -1925,7 +1925,6 @@ int ltdc_load(struct drm_device *ddev)
struct drm_panel *panel;
struct drm_crtc *crtc;
struct reset_control *rstc;
- struct resource *res;
int irq, i, nb_endpoints;
int ret = -ENODEV;
@@ -1992,8 +1991,7 @@ int ltdc_load(struct drm_device *ddev)
reset_control_deassert(rstc);
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- ldev->regs = devm_ioremap_resource(dev, res);
+ ldev->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(ldev->regs)) {
DRM_ERROR("Unable to get ltdc registers\n");
ret = PTR_ERR(ldev->regs);
--
2.39.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 14/18] drm/aspeed: Convert to devm_platform_ioremap_resource()
2023-07-07 7:20 [PATCH 01/18] drm/renesas: Convert to devm_platform_ioremap_resource() Yangtao Li
` (11 preceding siblings ...)
2023-07-07 7:20 ` [PATCH 13/18] drm/stm: ltdc: " Yangtao Li
@ 2023-07-07 7:20 ` Yangtao Li
2023-07-07 7:20 ` [PATCH 15/18] drm/tegra: sor: " Yangtao Li
` (4 subsequent siblings)
17 siblings, 0 replies; 26+ messages in thread
From: Yangtao Li @ 2023-07-07 7:20 UTC (permalink / raw)
To: Joel Stanley, David Airlie, Daniel Vetter, Andrew Jeffery
Cc: Yangtao Li, linux-aspeed, dri-devel, linux-arm-kernel,
linux-kernel
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
index c8c7f8215155..d681248f098c 100644
--- a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
+++ b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
@@ -144,11 +144,9 @@ static int aspeed_gfx_load(struct drm_device *drm)
struct device_node *np = pdev->dev.of_node;
const struct aspeed_gfx_config *config;
const struct of_device_id *match;
- struct resource *res;
int ret;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- priv->base = devm_ioremap_resource(drm->dev, res);
+ priv->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);
--
2.39.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 15/18] drm/tegra: sor: Convert to devm_platform_ioremap_resource()
2023-07-07 7:20 [PATCH 01/18] drm/renesas: Convert to devm_platform_ioremap_resource() Yangtao Li
` (12 preceding siblings ...)
2023-07-07 7:20 ` [PATCH 14/18] drm/aspeed: " Yangtao Li
@ 2023-07-07 7:20 ` Yangtao Li
2023-07-07 7:20 ` [PATCH 16/18] drm/rockchip: vop: Use devm_platform_get_and_ioremap_resource() Yangtao Li
` (3 subsequent siblings)
17 siblings, 0 replies; 26+ messages in thread
From: Yangtao Li @ 2023-07-07 7:20 UTC (permalink / raw)
To: Thierry Reding, Mikko Perttunen, David Airlie, Daniel Vetter,
Jonathan Hunter
Cc: Yangtao Li, dri-devel, linux-tegra, linux-kernel
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/gpu/drm/tegra/sor.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index abd6e3b92293..f23d54626883 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -3708,7 +3708,6 @@ static int tegra_sor_probe(struct platform_device *pdev)
{
struct device_node *np;
struct tegra_sor *sor;
- struct resource *regs;
int err;
sor = devm_kzalloc(&pdev->dev, sizeof(*sor), GFP_KERNEL);
@@ -3781,8 +3780,7 @@ static int tegra_sor_probe(struct platform_device *pdev)
}
}
- regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- sor->regs = devm_ioremap_resource(&pdev->dev, regs);
+ sor->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(sor->regs)) {
err = PTR_ERR(sor->regs);
goto remove;
--
2.39.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 16/18] drm/rockchip: vop: Use devm_platform_get_and_ioremap_resource()
2023-07-07 7:20 [PATCH 01/18] drm/renesas: Convert to devm_platform_ioremap_resource() Yangtao Li
` (13 preceding siblings ...)
2023-07-07 7:20 ` [PATCH 15/18] drm/tegra: sor: " Yangtao Li
@ 2023-07-07 7:20 ` Yangtao Li
2023-07-07 7:20 ` [PATCH 17/18] drm/arcpgu: Convert to devm_platform_ioremap_resource() Yangtao Li
` (2 subsequent siblings)
17 siblings, 0 replies; 26+ messages in thread
From: Yangtao Li @ 2023-07-07 7:20 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, David Airlie, Daniel Vetter
Cc: Yangtao Li, dri-devel, linux-arm-kernel, linux-rockchip,
linux-kernel
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: Yangtao Li <frank.li@vivo.com>
---
drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
index a530ecc4d207..e95d94ce1869 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -2179,8 +2179,7 @@ static int vop_bind(struct device *dev, struct device *master, void *data)
vop_win_init(vop);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- vop->regs = devm_ioremap_resource(dev, res);
+ vop->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(vop->regs))
return PTR_ERR(vop->regs);
vop->len = resource_size(res);
--
2.39.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 17/18] drm/arcpgu: Convert to devm_platform_ioremap_resource()
2023-07-07 7:20 [PATCH 01/18] drm/renesas: Convert to devm_platform_ioremap_resource() Yangtao Li
` (14 preceding siblings ...)
2023-07-07 7:20 ` [PATCH 16/18] drm/rockchip: vop: Use devm_platform_get_and_ioremap_resource() Yangtao Li
@ 2023-07-07 7:20 ` Yangtao Li
2023-07-07 13:24 ` Alexey Brodkin
2023-07-07 7:20 ` [PATCH 18/18] drm/fsl-dcu: " Yangtao Li
2023-07-07 8:33 ` [PATCH 01/18] drm/renesas: " Laurent Pinchart
17 siblings, 1 reply; 26+ messages in thread
From: Yangtao Li @ 2023-07-07 7:20 UTC (permalink / raw)
To: Alexey Brodkin, David Airlie, Daniel Vetter
Cc: Yangtao Li, dri-devel, linux-kernel
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/gpu/drm/tiny/arcpgu.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/tiny/arcpgu.c b/drivers/gpu/drm/tiny/arcpgu.c
index e5b10e41554a..3a5e66d909a4 100644
--- a/drivers/gpu/drm/tiny/arcpgu.c
+++ b/drivers/gpu/drm/tiny/arcpgu.c
@@ -251,7 +251,6 @@ static int arcpgu_load(struct arcpgu_drm_private *arcpgu)
struct device_node *encoder_node = NULL, *endpoint_node = NULL;
struct drm_connector *connector = NULL;
struct drm_device *drm = &arcpgu->drm;
- struct resource *res;
int ret;
arcpgu->clk = devm_clk_get(drm->dev, "pxlclk");
@@ -268,8 +267,7 @@ static int arcpgu_load(struct arcpgu_drm_private *arcpgu)
drm->mode_config.max_height = 1080;
drm->mode_config.funcs = &arcpgu_drm_modecfg_funcs;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- arcpgu->regs = devm_ioremap_resource(&pdev->dev, res);
+ arcpgu->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(arcpgu->regs))
return PTR_ERR(arcpgu->regs);
--
2.39.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 18/18] drm/fsl-dcu: Convert to devm_platform_ioremap_resource()
2023-07-07 7:20 [PATCH 01/18] drm/renesas: Convert to devm_platform_ioremap_resource() Yangtao Li
` (15 preceding siblings ...)
2023-07-07 7:20 ` [PATCH 17/18] drm/arcpgu: Convert to devm_platform_ioremap_resource() Yangtao Li
@ 2023-07-07 7:20 ` Yangtao Li
2023-07-07 8:33 ` [PATCH 01/18] drm/renesas: " Laurent Pinchart
17 siblings, 0 replies; 26+ messages in thread
From: Yangtao Li @ 2023-07-07 7:20 UTC (permalink / raw)
To: Stefan Agner, Alison Wang, David Airlie, Daniel Vetter
Cc: Yangtao Li, dri-devel, linux-kernel
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
index c09ba019ba5e..14661912e60f 100644
--- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
+++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
@@ -246,7 +246,6 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev)
struct fsl_dcu_drm_device *fsl_dev;
struct drm_device *drm;
struct device *dev = &pdev->dev;
- struct resource *res;
void __iomem *base;
struct clk *pix_clk_in;
char pix_clk_name[32];
@@ -264,8 +263,7 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev)
return -ENODEV;
fsl_dev->soc = id->data;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- base = devm_ioremap_resource(dev, res);
+ base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base)) {
ret = PTR_ERR(base);
return ret;
--
2.39.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH 06/18] drm: bridge: dw_hdmi: Use devm_platform_get_and_ioremap_resource()
2023-07-07 7:20 ` [PATCH 06/18] drm: bridge: dw_hdmi: Use devm_platform_get_and_ioremap_resource() Yangtao Li
@ 2023-07-07 7:27 ` Neil Armstrong
0 siblings, 0 replies; 26+ messages in thread
From: Neil Armstrong @ 2023-07-07 7:27 UTC (permalink / raw)
To: Yangtao Li, Andrzej Hajda, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, David Airlie, Daniel Vetter
Cc: dri-devel, linux-kernel
On 07/07/2023 09:20, Yangtao Li wrote:
> 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: Yangtao Li <frank.li@vivo.com>
> ---
> drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index 7b66f362afd8..b2b320ba2196 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -3417,8 +3417,7 @@ struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev,
> return ERR_PTR(-EINVAL);
> }
>
> - iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - hdmi->regs = devm_ioremap_resource(dev, iores);
> + hdmi->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &iores);
> if (IS_ERR(hdmi->regs)) {
> ret = PTR_ERR(hdmi->regs);
> goto err_res;
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 07/18] drm/bridge: analogix_dp: Convert to devm_platform_ioremap_resource()
2023-07-07 7:20 ` [PATCH 07/18] drm/bridge: analogix_dp: Convert to devm_platform_ioremap_resource() Yangtao Li
@ 2023-07-07 7:27 ` Neil Armstrong
0 siblings, 0 replies; 26+ messages in thread
From: Neil Armstrong @ 2023-07-07 7:27 UTC (permalink / raw)
To: Yangtao Li, Andrzej Hajda, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, David Airlie, Daniel Vetter
Cc: dri-devel, linux-kernel
On 07/07/2023 09:20, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
> drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> index df9370e0ff23..c6b228f1ed4c 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> @@ -1686,7 +1686,6 @@ analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data)
> {
> struct platform_device *pdev = to_platform_device(dev);
> struct analogix_dp_device *dp;
> - struct resource *res;
> unsigned int irq_flags;
> int ret;
>
> @@ -1740,9 +1739,7 @@ analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data)
>
> clk_prepare_enable(dp->clock);
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -
> - dp->reg_base = devm_ioremap_resource(&pdev->dev, res);
> + dp->reg_base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(dp->reg_base)) {
> ret = PTR_ERR(dp->reg_base);
> goto err_disable_clk;
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 02/18] gpu: ipu-v3: pre: Convert to devm_platform_ioremap_resource()
2023-07-07 7:20 ` [PATCH 02/18] gpu: ipu-v3: pre: " Yangtao Li
@ 2023-07-07 8:20 ` Philipp Zabel
0 siblings, 0 replies; 26+ messages in thread
From: Philipp Zabel @ 2023-07-07 8:20 UTC (permalink / raw)
To: Yangtao Li, David Airlie, Daniel Vetter; +Cc: dri-devel, linux-kernel
On Fr, 2023-07-07 at 15:20 +0800, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
regards
Philipp
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 08/18] gpu: ipu-v3: prg: Convert to devm_platform_ioremap_resource()
2023-07-07 7:20 ` [PATCH 08/18] gpu: ipu-v3: prg: " Yangtao Li
@ 2023-07-07 8:20 ` Philipp Zabel
0 siblings, 0 replies; 26+ messages in thread
From: Philipp Zabel @ 2023-07-07 8:20 UTC (permalink / raw)
To: Yangtao Li, David Airlie, Daniel Vetter; +Cc: dri-devel, linux-kernel
On Fr, 2023-07-07 at 15:20 +0800, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
regards
Philipp
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 01/18] drm/renesas: Convert to devm_platform_ioremap_resource()
2023-07-07 7:20 [PATCH 01/18] drm/renesas: Convert to devm_platform_ioremap_resource() Yangtao Li
` (16 preceding siblings ...)
2023-07-07 7:20 ` [PATCH 18/18] drm/fsl-dcu: " Yangtao Li
@ 2023-07-07 8:33 ` Laurent Pinchart
17 siblings, 0 replies; 26+ messages in thread
From: Laurent Pinchart @ 2023-07-07 8:33 UTC (permalink / raw)
To: Yangtao Li
Cc: Kieran Bingham, David Airlie, Daniel Vetter, dri-devel,
linux-renesas-soc, linux-kernel
Hi Yangtao,
Thank you for the patch.
On Fri, Jul 07, 2023 at 03:20:17PM +0800, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
> drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
> index e10e4d4b89a2..4bf9f5d15fa8 100644
> --- a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
> +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
> @@ -1002,7 +1002,6 @@ static int rcar_mipi_dsi_get_clocks(struct rcar_mipi_dsi *dsi)
> static int rcar_mipi_dsi_probe(struct platform_device *pdev)
> {
> struct rcar_mipi_dsi *dsi;
> - struct resource *mem;
> int ret;
>
> dsi = devm_kzalloc(&pdev->dev, sizeof(*dsi), GFP_KERNEL);
> @@ -1019,8 +1018,7 @@ static int rcar_mipi_dsi_probe(struct platform_device *pdev)
> return ret;
>
> /* Acquire resources. */
> - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - dsi->mmio = devm_ioremap_resource(dsi->dev, mem);
> + dsi->mmio = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(dsi->mmio))
> return PTR_ERR(dsi->mmio);
>
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 12/18] drm/tegra: dpaux: Convert to devm_platform_ioremap_resource()
2023-07-07 7:20 ` [PATCH 12/18] drm/tegra: dpaux: " Yangtao Li
@ 2023-07-07 12:28 ` Thierry Reding
0 siblings, 0 replies; 26+ messages in thread
From: Thierry Reding @ 2023-07-07 12:28 UTC (permalink / raw)
To: Yangtao Li
Cc: Mikko Perttunen, David Airlie, Daniel Vetter, Jonathan Hunter,
dri-devel, linux-tegra, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1377 bytes --]
On Fri, Jul 07, 2023 at 03:20:28PM +0800, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
> drivers/gpu/drm/tegra/dpaux.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/tegra/dpaux.c b/drivers/gpu/drm/tegra/dpaux.c
> index 4d2677dcd831..f120897ce4b3 100644
> --- a/drivers/gpu/drm/tegra/dpaux.c
> +++ b/drivers/gpu/drm/tegra/dpaux.c
> @@ -447,7 +447,6 @@ static const struct pinmux_ops tegra_dpaux_pinmux_ops = {
> static int tegra_dpaux_probe(struct platform_device *pdev)
> {
> struct tegra_dpaux *dpaux;
> - struct resource *regs;
> u32 value;
> int err;
>
> @@ -461,14 +460,13 @@ static int tegra_dpaux_probe(struct platform_device *pdev)
> INIT_LIST_HEAD(&dpaux->list);
> dpaux->dev = &pdev->dev;
>
> - regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - dpaux->regs = devm_ioremap_resource(&pdev->dev, regs);
> + dpaux->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(dpaux->regs))
> return PTR_ERR(dpaux->regs);
>
> dpaux->irq = platform_get_irq(pdev, 0);
> if (dpaux->irq < 0)
> - return -ENXIO;
> + return dpaux->irq;
This change has nothing to do with what the commit message says. It
looks correct, but it should be a separate patch.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 17/18] drm/arcpgu: Convert to devm_platform_ioremap_resource()
2023-07-07 7:20 ` [PATCH 17/18] drm/arcpgu: Convert to devm_platform_ioremap_resource() Yangtao Li
@ 2023-07-07 13:24 ` Alexey Brodkin
0 siblings, 0 replies; 26+ messages in thread
From: Alexey Brodkin @ 2023-07-07 13:24 UTC (permalink / raw)
To: Yangtao Li
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
David Airlie, Daniel Vetter
Hi Yangtao,
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
Thanks for the improvement.
Acked-by: Alexey Brodkin <abrodkin@synopsys.com>
> ---
> drivers/gpu/drm/tiny/arcpgu.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/tiny/arcpgu.c b/drivers/gpu/drm/tiny/arcpgu.c
> index e5b10e41554a..3a5e66d909a4 100644
> --- a/drivers/gpu/drm/tiny/arcpgu.c
> +++ b/drivers/gpu/drm/tiny/arcpgu.c
> @@ -251,7 +251,6 @@ static int arcpgu_load(struct arcpgu_drm_private *arcpgu)
> struct device_node *encoder_node = NULL, *endpoint_node = NULL;
> struct drm_connector *connector = NULL;
> struct drm_device *drm = &arcpgu->drm;
> - struct resource *res;
> int ret;
>
> arcpgu->clk = devm_clk_get(drm->dev, "pxlclk");
> @@ -268,8 +267,7 @@ static int arcpgu_load(struct arcpgu_drm_private *arcpgu)
> drm->mode_config.max_height = 1080;
> drm->mode_config.funcs = &arcpgu_drm_modecfg_funcs;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - arcpgu->regs = devm_ioremap_resource(&pdev->dev, res);
> + arcpgu->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(arcpgu->regs))
> return PTR_ERR(arcpgu->regs);
>
> --
> 2.39.0
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 13/18] drm/stm: ltdc: Convert to devm_platform_ioremap_resource()
2023-07-07 7:20 ` [PATCH 13/18] drm/stm: ltdc: " Yangtao Li
@ 2023-07-07 13:37 ` Raphael Gallais-Pou
0 siblings, 0 replies; 26+ messages in thread
From: Raphael Gallais-Pou @ 2023-07-07 13:37 UTC (permalink / raw)
To: Yangtao Li, Yannick Fertre, Philippe Cornu, David Airlie,
Daniel Vetter, Maxime Coquelin, Alexandre Torgue
Cc: dri-devel, linux-stm32, linux-arm-kernel, linux-kernel
Hi
On 7/7/23 09:20, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
> drivers/gpu/drm/stm/ltdc.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Acked-by: Raphaël Gallais-Pou <raphael.gallais-pou@foss.st.com>
Thanks for your contribution,
Raphaël
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2023-07-07 13:37 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-07 7:20 [PATCH 01/18] drm/renesas: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-07 7:20 ` [PATCH 02/18] gpu: ipu-v3: pre: " Yangtao Li
2023-07-07 8:20 ` Philipp Zabel
2023-07-07 7:20 ` [PATCH 03/18] drm/rockchip: dsi: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-07 7:20 ` [PATCH 04/18] drm: kirin: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-07 7:20 ` [PATCH 05/18] drm/tegra: hdmi: " Yangtao Li
2023-07-07 7:20 ` [PATCH 06/18] drm: bridge: dw_hdmi: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-07 7:27 ` Neil Armstrong
2023-07-07 7:20 ` [PATCH 07/18] drm/bridge: analogix_dp: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-07 7:27 ` Neil Armstrong
2023-07-07 7:20 ` [PATCH 08/18] gpu: ipu-v3: prg: " Yangtao Li
2023-07-07 8:20 ` Philipp Zabel
2023-07-07 7:20 ` [PATCH 09/18] drm/hisilicon: " Yangtao Li
2023-07-07 7:20 ` [PATCH 10/18] drm: lcdif: " Yangtao Li
2023-07-07 7:20 ` [PATCH 11/18] drm/mxsfb: " Yangtao Li
2023-07-07 7:20 ` [PATCH 12/18] drm/tegra: dpaux: " Yangtao Li
2023-07-07 12:28 ` Thierry Reding
2023-07-07 7:20 ` [PATCH 13/18] drm/stm: ltdc: " Yangtao Li
2023-07-07 13:37 ` Raphael Gallais-Pou
2023-07-07 7:20 ` [PATCH 14/18] drm/aspeed: " Yangtao Li
2023-07-07 7:20 ` [PATCH 15/18] drm/tegra: sor: " Yangtao Li
2023-07-07 7:20 ` [PATCH 16/18] drm/rockchip: vop: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-07 7:20 ` [PATCH 17/18] drm/arcpgu: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-07 13:24 ` Alexey Brodkin
2023-07-07 7:20 ` [PATCH 18/18] drm/fsl-dcu: " Yangtao Li
2023-07-07 8:33 ` [PATCH 01/18] drm/renesas: " Laurent Pinchart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox