Merge "soc: qcom: smp2p: Add remote_id into smp2p irq devname"

This commit is contained in:
qctecmdr 2022-06-24 09:15:42 -07:00 committed by Gerrit - the friendly Code Review server
commit 17b4c744d0

View File

@ -122,6 +122,7 @@ struct smp2p_entry {
* @in: pointer to the inbound smem item
* @smem_items: ids of the two smem items
* @valid_entries: already scanned inbound entries
* @irq_devname: poniter to the smp2p irq devname
* @local_pid: processor id of the inbound edge
* @remote_pid: processor id of the outbound edge
* @ipc_regmap: regmap for the outbound ipc
@ -146,6 +147,7 @@ struct qcom_smp2p {
bool ssr_ack;
bool open;
char *irq_devname;
unsigned local_pid;
unsigned remote_pid;
@ -670,10 +672,16 @@ static int qcom_smp2p_probe(struct platform_device *pdev)
/* Kick the outgoing edge after allocating entries */
qcom_smp2p_kick(smp2p);
smp2p->irq_devname = kasprintf(GFP_KERNEL, "smp2p_%d", smp2p->remote_pid);
if (!smp2p->irq_devname) {
ret = -ENOMEM;
goto unreg_ws;
}
ret = devm_request_threaded_irq(&pdev->dev, smp2p->irq,
qcom_smp2p_isr, qcom_smp2p_intr,
IRQF_ONESHOT,
"smp2p", (void *)smp2p);
smp2p->irq_devname, (void *)smp2p);
if (ret) {
dev_err(&pdev->dev, "failed to request interrupt\n");
goto unreg_ws;
@ -693,6 +701,8 @@ static int qcom_smp2p_probe(struct platform_device *pdev)
list_for_each_entry(entry, &smp2p->outbound, node)
qcom_smem_state_unregister(entry->state);
kfree(smp2p->irq_devname);
smp2p->out->valid_entries = 0;
release_mbox:
@ -720,6 +730,8 @@ static int qcom_smp2p_remove(struct platform_device *pdev)
mbox_free_channel(smp2p->mbox_chan);
kfree(smp2p->irq_devname);
smp2p->out->valid_entries = 0;
return 0;