Skip to content

Commit 1f43e52

Browse files
Huang YiweiJassiBrar
authored andcommitted
mailbox: qcom-ipcc: Support more IPCC instance
Since hardware is supporting multiple IPCC instance, use ipcc_%d instead of ipcc as the irq name to support in driver. Signed-off-by: Huang Yiwei <[email protected]> Signed-off-by: Jassi Brar <[email protected]>
1 parent e9d50e4 commit 1f43e52

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/mailbox/qcom-ipcc.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,8 @@ static int qcom_ipcc_setup_mbox(struct qcom_ipcc *ipcc,
257257
static int qcom_ipcc_probe(struct platform_device *pdev)
258258
{
259259
struct qcom_ipcc *ipcc;
260+
static int id;
261+
char *name;
260262
int ret;
261263

262264
ipcc = devm_kzalloc(&pdev->dev, sizeof(*ipcc), GFP_KERNEL);
@@ -273,6 +275,10 @@ static int qcom_ipcc_probe(struct platform_device *pdev)
273275
if (ipcc->irq < 0)
274276
return ipcc->irq;
275277

278+
name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "ipcc_%d", id++);
279+
if (!name)
280+
return -ENOMEM;
281+
276282
ipcc->irq_domain = irq_domain_add_tree(pdev->dev.of_node,
277283
&qcom_ipcc_irq_ops, ipcc);
278284
if (!ipcc->irq_domain)
@@ -283,7 +289,7 @@ static int qcom_ipcc_probe(struct platform_device *pdev)
283289
goto err_mbox;
284290

285291
ret = devm_request_irq(&pdev->dev, ipcc->irq, qcom_ipcc_irq_fn,
286-
IRQF_TRIGGER_HIGH, "ipcc", ipcc);
292+
IRQF_TRIGGER_HIGH, name, ipcc);
287293
if (ret < 0) {
288294
dev_err(&pdev->dev, "Failed to register the irq: %d\n", ret);
289295
goto err_req_irq;

0 commit comments

Comments
 (0)