Skip to content

Commit

Permalink
mailbox: rp1: Don't claim channels in of_xlate
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
pelwell committed Feb 4, 2025
1 parent dae233e commit a725d68
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/mailbox/rp1-mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit a725d68

Please sign in to comment.