Skip to content

Commit 9bde3bf

Browse files
Li Zetaopinchartl
authored andcommitted
drm: xlnx: zynqmp_dpsub: Use devm_platform_ioremap_resource_byname()
Convert platform_get_resource_byname() + devm_ioremap_resource() to a single call to devm_platform_ioremap_resource_byname(), as this is exactly what this function does. Signed-off-by: Li Zetao <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]>
1 parent 55354ee commit 9bde3bf

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

drivers/gpu/drm/xlnx/zynqmp_disp.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,6 @@ int zynqmp_disp_probe(struct zynqmp_dpsub *dpsub)
12281228
{
12291229
struct platform_device *pdev = to_platform_device(dpsub->dev);
12301230
struct zynqmp_disp *disp;
1231-
struct resource *res;
12321231
int ret;
12331232

12341233
disp = kzalloc(sizeof(*disp), GFP_KERNEL);
@@ -1238,22 +1237,19 @@ int zynqmp_disp_probe(struct zynqmp_dpsub *dpsub)
12381237
disp->dev = &pdev->dev;
12391238
disp->dpsub = dpsub;
12401239

1241-
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "blend");
1242-
disp->blend.base = devm_ioremap_resource(disp->dev, res);
1240+
disp->blend.base = devm_platform_ioremap_resource_byname(pdev, "blend");
12431241
if (IS_ERR(disp->blend.base)) {
12441242
ret = PTR_ERR(disp->blend.base);
12451243
goto error;
12461244
}
12471245

1248-
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "av_buf");
1249-
disp->avbuf.base = devm_ioremap_resource(disp->dev, res);
1246+
disp->avbuf.base = devm_platform_ioremap_resource_byname(pdev, "av_buf");
12501247
if (IS_ERR(disp->avbuf.base)) {
12511248
ret = PTR_ERR(disp->avbuf.base);
12521249
goto error;
12531250
}
12541251

1255-
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "aud");
1256-
disp->audio.base = devm_ioremap_resource(disp->dev, res);
1252+
disp->audio.base = devm_platform_ioremap_resource_byname(pdev, "aud");
12571253
if (IS_ERR(disp->audio.base)) {
12581254
ret = PTR_ERR(disp->audio.base);
12591255
goto error;

0 commit comments

Comments
 (0)