summaryrefslogtreecommitdiffstats
path: root/drivers/slimbus/qcom-ngd-ctrl.c
diff options
context:
space:
mode:
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>2022-04-29 18:50:50 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-05-09 15:42:09 +0200
commit228662b074149e16949ab73205ac93b5ca2c3552 (patch)
tree4cd12345ea52c3936f99160d0b1d628f0a3d0c04 /drivers/slimbus/qcom-ngd-ctrl.c
parentbus: mhi: replace snprintf with sysfs_emit (diff)
downloadlinux-228662b074149e16949ab73205ac93b5ca2c3552.tar.xz
linux-228662b074149e16949ab73205ac93b5ca2c3552.zip
slimbus: qcom-ngd-ctrl: 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(). Tested-By: Steev Klimaszewski <steev@kali.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220429165051.6187-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/slimbus/qcom-ngd-ctrl.c')
-rw-r--r--drivers/slimbus/qcom-ngd-ctrl.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
index 7040293c2ee8..0f29a08b4c09 100644
--- a/drivers/slimbus/qcom-ngd-ctrl.c
+++ b/drivers/slimbus/qcom-ngd-ctrl.c
@@ -1526,13 +1526,11 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
if (IS_ERR(ctrl->base))
return PTR_ERR(ctrl->base);
- res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- if (!res) {
- dev_err(&pdev->dev, "no slimbus IRQ resource\n");
- return -ENODEV;
- }
+ ret = platform_get_irq(pdev, 0);
+ if (ret < 0)
+ return ret;
- ret = devm_request_irq(dev, res->start, qcom_slim_ngd_interrupt,
+ ret = devm_request_irq(dev, ret, qcom_slim_ngd_interrupt,
IRQF_TRIGGER_HIGH, "slim-ngd", ctrl);
if (ret) {
dev_err(&pdev->dev, "request IRQ failed\n");