From 8aca598dce9b608c5f2be15755e60f96783dd37b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 4 Feb 2025 13:18:45 +0000 Subject: [PATCH] mailbox: rp1: Don't claim channels in of_xlate The of_xlate method saves the calculated event mask in the con_priv field. It also rejects subsequent attempt to use that channel because the mask is non-zero, which causes a repeated instantiation of a client driver to fail. The of_xlate method is not meant to be a point of resource acquisition. Leave the con_priv initialisation, but drop the test that it was previously zero. Signed-off-by: Phil Elwell --- drivers/mailbox/rp1-mailbox.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/mailbox/rp1-mailbox.c b/drivers/mailbox/rp1-mailbox.c index bf71db1dd9fae5..0e8af098b62b22 100644 --- a/drivers/mailbox/rp1-mailbox.c +++ b/drivers/mailbox/rp1-mailbox.c @@ -133,8 +133,6 @@ static struct mbox_chan *rp1_mbox_xlate(struct mbox_controller *mbox, return ERR_PTR(-EINVAL); chan = &mbox->chans[doorbell]; - if (chan->con_priv) - return ERR_PTR(-EBUSY); chan->con_priv = (void *)(uintptr_t)(1 << doorbell);