* [PATCH -next] drm/tegra: hdmi: Use devm_platform_ioremap_resource()
@ 2023-07-24 14:36 Ruan Jinjie
2023-08-04 1:11 ` Ruan Jinjie
0 siblings, 1 reply; 2+ messages in thread
From: Ruan Jinjie @ 2023-07-24 14:36 UTC (permalink / raw)
To: thierry.reding, mperttunen, airlied, daniel, jonathanh,
dri-devel, linux-tegra, linux-kernel
Cc: ruanjinjie
From: ruanjinjie <ruanjinjie@huawei.com>
Use the devm_platform_ioremap_resource() helper instead of calling
platform_get_resource() and devm_ioremap_resource() separately.
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.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.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] drm/tegra: hdmi: Use devm_platform_ioremap_resource()
2023-07-24 14:36 [PATCH -next] drm/tegra: hdmi: Use devm_platform_ioremap_resource() Ruan Jinjie
@ 2023-08-04 1:11 ` Ruan Jinjie
0 siblings, 0 replies; 2+ messages in thread
From: Ruan Jinjie @ 2023-08-04 1:11 UTC (permalink / raw)
To: thierry.reding, mperttunen, airlied, daniel, jonathanh,
dri-devel, linux-tegra, linux-kernel
Ping.
On 2023/7/24 22:36, Ruan Jinjie wrote:
> From: ruanjinjie <ruanjinjie@huawei.com>
>
> Use the devm_platform_ioremap_resource() helper instead of calling
> platform_get_resource() and devm_ioremap_resource() separately.
>
> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.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);
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-04 1:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-24 14:36 [PATCH -next] drm/tegra: hdmi: Use devm_platform_ioremap_resource() Ruan Jinjie
2023-08-04 1:11 ` Ruan Jinjie
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).