mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-02 15:43:35 -04:00
media: exynos4-is: 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 bypasses the hierarchical setup and messes 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: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
f6762994ec
commit
35112f5322
@@ -926,6 +926,7 @@ static int fimc_probe(struct platform_device *pdev)
|
||||
struct fimc_dev *fimc;
|
||||
struct resource *res;
|
||||
int ret = 0;
|
||||
int irq;
|
||||
|
||||
fimc = devm_kzalloc(dev, sizeof(*fimc), GFP_KERNEL);
|
||||
if (!fimc)
|
||||
@@ -965,11 +966,9 @@ static int fimc_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(fimc->regs))
|
||||
return PTR_ERR(fimc->regs);
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
|
||||
if (res == NULL) {
|
||||
dev_err(dev, "Failed to get IRQ resource\n");
|
||||
return -ENXIO;
|
||||
}
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0)
|
||||
return irq;
|
||||
|
||||
ret = fimc_clk_get(fimc);
|
||||
if (ret)
|
||||
@@ -986,7 +985,7 @@ static int fimc_probe(struct platform_device *pdev)
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = devm_request_irq(dev, res->start, fimc_irq_handler,
|
||||
ret = devm_request_irq(dev, irq, fimc_irq_handler,
|
||||
0, dev_name(dev), fimc);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "failed to install irq (%d)\n", ret);
|
||||
|
||||
@@ -1454,6 +1454,7 @@ static int fimc_lite_probe(struct platform_device *pdev)
|
||||
struct fimc_lite *fimc;
|
||||
struct resource *res;
|
||||
int ret;
|
||||
int irq;
|
||||
|
||||
if (!dev->of_node)
|
||||
return -ENODEV;
|
||||
@@ -1485,17 +1486,15 @@ static int fimc_lite_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(fimc->regs))
|
||||
return PTR_ERR(fimc->regs);
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
|
||||
if (res == NULL) {
|
||||
dev_err(dev, "Failed to get IRQ resource\n");
|
||||
return -ENXIO;
|
||||
}
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0)
|
||||
return irq;
|
||||
|
||||
ret = fimc_lite_clk_get(fimc);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = devm_request_irq(dev, res->start, flite_irq_handler,
|
||||
ret = devm_request_irq(dev, irq, flite_irq_handler,
|
||||
0, dev_name(dev), fimc);
|
||||
if (ret) {
|
||||
dev_err(dev, "Failed to install irq (%d)\n", ret);
|
||||
|
||||
Reference in New Issue
Block a user