summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/s3c-fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/fbdev/s3c-fb.c')
-rw-r--r--drivers/video/fbdev/s3c-fb.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/video/fbdev/s3c-fb.c b/drivers/video/fbdev/s3c-fb.c
index 3b134e1bbc38..fe3c8b6935cf 100644
--- a/drivers/video/fbdev/s3c-fb.c
+++ b/drivers/video/fbdev/s3c-fb.c
@@ -1360,7 +1360,6 @@ static int s3c_fb_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct s3c_fb_platdata *pd;
struct s3c_fb *sfb;
- struct resource *res;
int win;
int ret = 0;
u32 reg;
@@ -1392,18 +1391,17 @@ static int s3c_fb_probe(struct platform_device *pdev)
spin_lock_init(&sfb->slock);
sfb->bus_clk = devm_clk_get(dev, "lcd");
- if (IS_ERR(sfb->bus_clk)) {
- dev_err(dev, "failed to get bus clock\n");
- return PTR_ERR(sfb->bus_clk);
- }
+ if (IS_ERR(sfb->bus_clk))
+ return dev_err_probe(dev, PTR_ERR(sfb->bus_clk),
+ "failed to get bus clock\n");
clk_prepare_enable(sfb->bus_clk);
if (!sfb->variant.has_clksel) {
sfb->lcd_clk = devm_clk_get(dev, "sclk_fimd");
if (IS_ERR(sfb->lcd_clk)) {
- dev_err(dev, "failed to get lcd clock\n");
- ret = PTR_ERR(sfb->lcd_clk);
+ ret = dev_err_probe(dev, PTR_ERR(sfb->lcd_clk),
+ "failed to get lcd clock\n");
goto err_bus_clk;
}
@@ -1418,13 +1416,12 @@ static int s3c_fb_probe(struct platform_device *pdev)
goto err_lcd_clk;
}
- res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- if (!res) {
- dev_err(dev, "failed to acquire irq resource\n");
+ sfb->irq_no = platform_get_irq(pdev, 0);
+ if (sfb->irq_no < 0) {
ret = -ENOENT;
goto err_lcd_clk;
}
- sfb->irq_no = res->start;
+
ret = devm_request_irq(dev, sfb->irq_no, s3c_fb_irq,
0, "s3c_fb", sfb);
if (ret) {
@@ -1810,4 +1807,3 @@ module_platform_driver(s3c_fb_driver);
MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
MODULE_DESCRIPTION("Samsung S3C SoC Framebuffer driver");
MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:s3c-fb");