Skip to content

Commit be66c2c

Browse files
Yang Lihdeller
authored andcommitted
fbdev: wm8505fb: Use devm_platform_ioremap_resource()
According to commit 7945f92 ("drivers: provide devm_platform_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to Use devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li <[email protected]> Signed-off-by: Helge Deller <[email protected]>
1 parent 0db0a1e commit be66c2c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/video/fbdev/wm8505fb.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ static const struct fb_ops wm8505fb_ops = {
261261
static int wm8505fb_probe(struct platform_device *pdev)
262262
{
263263
struct wm8505fb_info *fbi;
264-
struct resource *res;
265264
struct display_timings *disp_timing;
266265
void *addr;
267266
int ret;
@@ -299,8 +298,7 @@ static int wm8505fb_probe(struct platform_device *pdev)
299298
addr = addr + sizeof(struct wm8505fb_info);
300299
fbi->fb.pseudo_palette = addr;
301300

302-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
303-
fbi->regbase = devm_ioremap_resource(&pdev->dev, res);
301+
fbi->regbase = devm_platform_ioremap_resource(pdev, 0);
304302
if (IS_ERR(fbi->regbase))
305303
return PTR_ERR(fbi->regbase);
306304

0 commit comments

Comments
 (0)