Commit 4f37ea5d authored by zhaoxiao's avatar zhaoxiao Committed by Helge Deller
Browse files

video: fbdev: s3c-fb: Use platform_get_irq() to get the interrupt



platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypassed the hierarchical setup and messed up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().

Signed-off-by: default avatarzhaoxiao <zhaoxiao@uniontech.com>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent c5510f53
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -1360,7 +1360,6 @@ static int s3c_fb_probe(struct platform_device *pdev)
	struct device *dev = &pdev->dev;
	struct device *dev = &pdev->dev;
	struct s3c_fb_platdata *pd;
	struct s3c_fb_platdata *pd;
	struct s3c_fb *sfb;
	struct s3c_fb *sfb;
	struct resource *res;
	int win;
	int win;
	int ret = 0;
	int ret = 0;
	u32 reg;
	u32 reg;
@@ -1417,13 +1416,13 @@ static int s3c_fb_probe(struct platform_device *pdev)
		goto err_lcd_clk;
		goto err_lcd_clk;
	}
	}


	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
	sfb->irq_no = platform_get_irq(pdev, 0);
	if (!res) {
	if (sfb->irq_no < 0) {
		dev_err(dev, "failed to acquire irq resource\n");
		dev_err(dev, "failed to acquire irq resource\n");
		ret = -ENOENT;
		ret = -ENOENT;
		goto err_lcd_clk;
		goto err_lcd_clk;
	}
	}
	sfb->irq_no = res->start;

	ret = devm_request_irq(dev, sfb->irq_no, s3c_fb_irq,
	ret = devm_request_irq(dev, sfb->irq_no, s3c_fb_irq,
			  0, "s3c_fb", sfb);
			  0, "s3c_fb", sfb);
	if (ret) {
	if (ret) {