aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYueHaibing <[email protected]>2019-09-04 19:57:54 +0800
committerBartlomiej Zolnierkiewicz <[email protected]>2020-01-03 14:27:46 +0100
commit3149299e105b678bd30df63f07bb4ab54ed0c373 (patch)
tree36806716c8f0162e5935753ae00e95cfbd7e674b
parent8d5598f13fe7e2e1822825548c7dfcc6c0bb07f4 (diff)
fbdev/sa1100fb: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot <[email protected]> Signed-off-by: YueHaibing <[email protected]> Cc: Maarten Lankhorst <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Viresh Kumar <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/video/fbdev/sa1100fb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/video/fbdev/sa1100fb.c b/drivers/video/fbdev/sa1100fb.c
index 4680cc3efb81..5bb653db0cec 100644
--- a/drivers/video/fbdev/sa1100fb.c
+++ b/drivers/video/fbdev/sa1100fb.c
@@ -1143,7 +1143,6 @@ static struct sa1100fb_info *sa1100fb_init_fbinfo(struct device *dev)
static int sa1100fb_probe(struct platform_device *pdev)
{
struct sa1100fb_info *fbi;
- struct resource *res;
int ret, irq;
if (!dev_get_platdata(&pdev->dev)) {
@@ -1159,8 +1158,7 @@ static int sa1100fb_probe(struct platform_device *pdev)
if (!fbi)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- fbi->base = devm_ioremap_resource(&pdev->dev, res);
+ fbi->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(fbi->base))
return PTR_ERR(fbi->base);