mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
drm/tegra: hdmi: Convert to devm_platform_ioremap_resource()
[ Upstream commit faae5646c1 ]
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230710032355.72914-5-frank.li@vivo.com
Stable-dep-of: 643ae131b859 ("drm/tegra: hdmi: Fix some error handling paths in tegra_hdmi_probe()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
@@ -1776,7 +1776,6 @@ static irqreturn_t tegra_hdmi_irq(int irq, void *data)
|
|||||||
static int tegra_hdmi_probe(struct platform_device *pdev)
|
static int tegra_hdmi_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct tegra_hdmi *hdmi;
|
struct tegra_hdmi *hdmi;
|
||||||
struct resource *regs;
|
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
hdmi = devm_kzalloc(&pdev->dev, sizeof(*hdmi), GFP_KERNEL);
|
hdmi = devm_kzalloc(&pdev->dev, sizeof(*hdmi), GFP_KERNEL);
|
||||||
@@ -1838,8 +1837,7 @@ static int tegra_hdmi_probe(struct platform_device *pdev)
|
|||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
hdmi->regs = devm_platform_ioremap_resource(pdev, 0);
|
||||||
hdmi->regs = devm_ioremap_resource(&pdev->dev, regs);
|
|
||||||
if (IS_ERR(hdmi->regs))
|
if (IS_ERR(hdmi->regs))
|
||||||
return PTR_ERR(hdmi->regs);
|
return PTR_ERR(hdmi->regs);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user