diff mbox series

[4/4] soc: qcom: smp2p: Add remote_id into irq name

Message ID 1657087331-32455-5-git-send-email-quic_clew@quicinc.com (mailing list archive)
State Changes Requested
Headers show
Series Add smp2p retrigger support | expand

Commit Message

Chris Lew July 6, 2022, 6:02 a.m. UTC
From: Tao Zhang <quic_taozhan@quicinc.com>

Changed smp2p irq devname from "smp2p" to "smp2p_<remote_id>", which
makes the wakeup source distinguishable in irq wakeup prints.

Signed-off-by: Tao Zhang <quic_taozhan@quicinc.com>
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
---
 drivers/soc/qcom/smp2p.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/soc/qcom/smp2p.c b/drivers/soc/qcom/smp2p.c
index a1ea5f55c228..21a0e84b16f4 100644
--- a/drivers/soc/qcom/smp2p.c
+++ b/drivers/soc/qcom/smp2p.c
@@ -541,6 +541,7 @@  static int qcom_smp2p_probe(struct platform_device *pdev)
 	struct device_node *node;
 	struct qcom_smp2p *smp2p;
 	const char *key;
+	char *name;
 	int irq;
 	int ret;
 
@@ -632,10 +633,16 @@  static int qcom_smp2p_probe(struct platform_device *pdev)
 	qcom_smp2p_kick(smp2p);
 
 	smp2p->irq = irq;
+	name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "smp2p_%d",
+			      smp2p->remote_pid);
+	if (!name) {
+		ret = -ENOMEM;
+		goto unwind_interfaces;
+	}
 	ret = devm_request_threaded_irq(&pdev->dev, irq,
 					NULL, qcom_smp2p_intr,
 					IRQF_ONESHOT,
-					"smp2p", (void *)smp2p);
+					name, (void *)smp2p);
 	if (ret) {
 		dev_err(&pdev->dev, "failed to request interrupt\n");
 		goto unwind_interfaces;