summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2017-10-17 16:01:12 +0200
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2017-10-17 16:01:12 +0200
commitf6fc8c9dbdc976e4933c5edc13764eafe9897313 (patch)
tree51e09a3704d67d85e4b0699b30add4146ec86df8 /drivers
parentvideo: sa1100fb: use devm_ioremap_resource() (diff)
downloadlinux-f6fc8c9dbdc976e4933c5edc13764eafe9897313.tar.xz
linux-f6fc8c9dbdc976e4933c5edc13764eafe9897313.zip
video: sa1100fb: use devm_request_irq()
Use devm_request_irq() to request the interrupt (a little earlier too) so we can avoid having to manually clean this up. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/fbdev/sa1100fb.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/video/fbdev/sa1100fb.c b/drivers/video/fbdev/sa1100fb.c
index ab83970dbfd9..a48fdb676f3e 100644
--- a/drivers/video/fbdev/sa1100fb.c
+++ b/drivers/video/fbdev/sa1100fb.c
@@ -1239,22 +1239,23 @@ static int sa1100fb_probe(struct platform_device *pdev)
goto failed;
}
- /* Initialize video memory */
- ret = sa1100fb_map_video_memory(fbi);
- if (ret)
- goto failed;
-
- ret = request_irq(irq, sa1100fb_handle_irq, 0, "LCD", fbi);
+ ret = devm_request_irq(&pdev->dev, irq, sa1100fb_handle_irq, 0,
+ "LCD", fbi);
if (ret) {
dev_err(&pdev->dev, "request_irq failed: %d\n", ret);
goto failed;
}
+ /* Initialize video memory */
+ ret = sa1100fb_map_video_memory(fbi);
+ if (ret)
+ goto failed;
+
if (machine_is_shannon()) {
ret = gpio_request_one(SHANNON_GPIO_DISP_EN,
GPIOF_OUT_INIT_LOW, "display enable");
if (ret)
- goto err_free_irq;
+ goto failed;
}
/*
@@ -1282,8 +1283,6 @@ static int sa1100fb_probe(struct platform_device *pdev)
err_reg_fb:
if (machine_is_shannon())
gpio_free(SHANNON_GPIO_DISP_EN);
- err_free_irq:
- free_irq(irq, fbi);
failed:
return ret;
}