LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] drm/shmobile: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-08-31 13:57 Cai Huoqing
2021-09-01 11:11 ` Kieran Bingham
2021-09-22 23:15 ` Laurent Pinchart
0 siblings, 2 replies; 3+ messages in thread
From: Cai Huoqing @ 2021-08-31 13:57 UTC (permalink / raw)
To: caihuoqing
Cc: Laurent Pinchart, Kieran Bingham, David Airlie, Daniel Vetter,
dri-devel, linux-renesas-soc, linux-kernel
Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
drivers/gpu/drm/shmobile/shmob_drm_drv.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
index 7db01904d18d..80078a9fd7f6 100644
--- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c
+++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
@@ -192,7 +192,6 @@ static int shmob_drm_probe(struct platform_device *pdev)
struct shmob_drm_platform_data *pdata = pdev->dev.platform_data;
struct shmob_drm_device *sdev;
struct drm_device *ddev;
- struct resource *res;
unsigned int i;
int ret;
@@ -215,8 +214,7 @@ static int shmob_drm_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, sdev);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- sdev->mmio = devm_ioremap_resource(&pdev->dev, res);
+ sdev->mmio = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(sdev->mmio))
return PTR_ERR(sdev->mmio);
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/shmobile: Make use of the helper function devm_platform_ioremap_resource()
2021-08-31 13:57 [PATCH] drm/shmobile: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
@ 2021-09-01 11:11 ` Kieran Bingham
2021-09-22 23:15 ` Laurent Pinchart
1 sibling, 0 replies; 3+ messages in thread
From: Kieran Bingham @ 2021-09-01 11:11 UTC (permalink / raw)
To: Cai Huoqing
Cc: Laurent Pinchart, Kieran Bingham, David Airlie, Daniel Vetter,
dri-devel, linux-renesas-soc, linux-kernel
On 31/08/2021 14:57, Cai Huoqing wrote:
> Use the devm_platform_ioremap_resource() helper instead of
> calling platform_get_resource() and devm_ioremap_resource()
> separately
>
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> ---
> drivers/gpu/drm/shmobile/shmob_drm_drv.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> index 7db01904d18d..80078a9fd7f6 100644
> --- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> +++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> @@ -192,7 +192,6 @@ static int shmob_drm_probe(struct platform_device *pdev)
> struct shmob_drm_platform_data *pdata = pdev->dev.platform_data;
> struct shmob_drm_device *sdev;
> struct drm_device *ddev;
> - struct resource *res;
> unsigned int i;
> int ret;
>
> @@ -215,8 +214,7 @@ static int shmob_drm_probe(struct platform_device *pdev)
>
> platform_set_drvdata(pdev, sdev);
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - sdev->mmio = devm_ioremap_resource(&pdev->dev, res);
> + sdev->mmio = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(sdev->mmio))
> return PTR_ERR(sdev->mmio);
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/shmobile: Make use of the helper function devm_platform_ioremap_resource()
2021-08-31 13:57 [PATCH] drm/shmobile: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
2021-09-01 11:11 ` Kieran Bingham
@ 2021-09-22 23:15 ` Laurent Pinchart
1 sibling, 0 replies; 3+ messages in thread
From: Laurent Pinchart @ 2021-09-22 23:15 UTC (permalink / raw)
To: Cai Huoqing
Cc: Kieran Bingham, David Airlie, Daniel Vetter, dri-devel,
linux-renesas-soc, linux-kernel
Hi Cai,
Thank you for the patch.
On Tue, Aug 31, 2021 at 09:57:30PM +0800, Cai Huoqing wrote:
> Use the devm_platform_ioremap_resource() helper instead of
> calling platform_get_resource() and devm_ioremap_resource()
> separately
>
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/gpu/drm/shmobile/shmob_drm_drv.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> index 7db01904d18d..80078a9fd7f6 100644
> --- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> +++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> @@ -192,7 +192,6 @@ static int shmob_drm_probe(struct platform_device *pdev)
> struct shmob_drm_platform_data *pdata = pdev->dev.platform_data;
> struct shmob_drm_device *sdev;
> struct drm_device *ddev;
> - struct resource *res;
> unsigned int i;
> int ret;
>
> @@ -215,8 +214,7 @@ static int shmob_drm_probe(struct platform_device *pdev)
>
> platform_set_drvdata(pdev, sdev);
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - sdev->mmio = devm_ioremap_resource(&pdev->dev, res);
> + sdev->mmio = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(sdev->mmio))
> return PTR_ERR(sdev->mmio);
>
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-22 23:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 13:57 [PATCH] drm/shmobile: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
2021-09-01 11:11 ` Kieran Bingham
2021-09-22 23:15 ` Laurent Pinchart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).