media: exynos-gsc: 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:
parent
2b9b06a769
commit
8e12c61cb1
|
@ -1106,9 +1106,9 @@ MODULE_DEVICE_TABLE(of, exynos_gsc_match);
|
||||||
static int gsc_probe(struct platform_device *pdev)
|
static int gsc_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct gsc_dev *gsc;
|
struct gsc_dev *gsc;
|
||||||
struct resource *res;
|
|
||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
const struct gsc_driverdata *drv_data = of_device_get_match_data(dev);
|
const struct gsc_driverdata *drv_data = of_device_get_match_data(dev);
|
||||||
|
int irq;
|
||||||
int ret;
|
int ret;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -1141,11 +1141,9 @@ static int gsc_probe(struct platform_device *pdev)
|
||||||
if (IS_ERR(gsc->regs))
|
if (IS_ERR(gsc->regs))
|
||||||
return PTR_ERR(gsc->regs);
|
return PTR_ERR(gsc->regs);
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
if (!res) {
|
if (irq < 0)
|
||||||
dev_err(dev, "failed to get IRQ resource\n");
|
return irq;
|
||||||
return -ENXIO;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < gsc->num_clocks; i++) {
|
for (i = 0; i < gsc->num_clocks; i++) {
|
||||||
gsc->clock[i] = devm_clk_get(dev, drv_data->clk_names[i]);
|
gsc->clock[i] = devm_clk_get(dev, drv_data->clk_names[i]);
|
||||||
|
@ -1167,7 +1165,7 @@ static int gsc_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = devm_request_irq(dev, res->start, gsc_irq_handler,
|
ret = devm_request_irq(dev, irq, gsc_irq_handler,
|
||||||
0, pdev->name, gsc);
|
0, pdev->name, gsc);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "failed to install irq (%d)\n", ret);
|
dev_err(dev, "failed to install irq (%d)\n", ret);
|
||||||
|
|
Loading…
Reference in New Issue