diff options
author | Mikko Perttunen <mperttunen@nvidia.com> | 2018-11-28 12:54:11 +0300 |
---|---|---|
committer | Jassi Brar <jaswinder.singh@linaro.org> | 2018-12-22 07:31:26 +0300 |
commit | 8ed82e23875e6014d9aa8e03bf4301b27d614050 (patch) | |
tree | ae6158c64bafc3dd1ec8b0ade1dfbb6ca848b4d6 /drivers | |
parent | a8803d7421cc2be2ac12a8155e5d824f04259eff (diff) | |
download | linux-8ed82e23875e6014d9aa8e03bf4301b27d614050.tar.xz |
mailbox: Allow multiple controllers per device
Look through the whole controller list when mapping device tree
phandles to controllers instead of stopping at the first one.
Each controller is intended to only contain one kind of mailbox,
but some devices (like Tegra HSP) implement multiple kinds and use
the same device tree node for all of them. As such, we need to allow
multiple mbox_controllers per device tree node.
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mailbox/mailbox.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c index 6abb35ff49fa..c6a7d4582dc6 100644 --- a/drivers/mailbox/mailbox.c +++ b/drivers/mailbox/mailbox.c @@ -355,7 +355,8 @@ struct mbox_chan *mbox_request_channel(struct mbox_client *cl, int index) list_for_each_entry(mbox, &mbox_cons, node) if (mbox->dev->of_node == spec.np) { chan = mbox->of_xlate(mbox, &spec); - break; + if (!IS_ERR(chan)) + break; } of_node_put(spec.np); |