Commit 63fee123 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration

Pull mailbox fixes from Jassi Brar:

 - fix getting element from the pcc-channels array by simply indexing
   into it

 - prevent building mailbox-test driver for archs that don't have IOMEM

* 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
  mailbox: Fix dependencies for !HAS_IOMEM archs
  mailbox: pcc: fix channel calculation in get_pcc_channel()
parents 46df55ce 65d3b04a
...@@ -81,6 +81,7 @@ config STI_MBOX ...@@ -81,6 +81,7 @@ config STI_MBOX
config MAILBOX_TEST config MAILBOX_TEST
tristate "Mailbox Test Client" tristate "Mailbox Test Client"
depends on OF depends on OF
depends on HAS_IOMEM
help help
Test client to help with testing new Controller driver Test client to help with testing new Controller driver
implementations. implementations.
......
...@@ -81,16 +81,10 @@ static struct mbox_controller pcc_mbox_ctrl = {}; ...@@ -81,16 +81,10 @@ static struct mbox_controller pcc_mbox_ctrl = {};
*/ */
static struct mbox_chan *get_pcc_channel(int id) static struct mbox_chan *get_pcc_channel(int id)
{ {
struct mbox_chan *pcc_chan;
if (id < 0 || id > pcc_mbox_ctrl.num_chans) if (id < 0 || id > pcc_mbox_ctrl.num_chans)
return ERR_PTR(-ENOENT); return ERR_PTR(-ENOENT);
pcc_chan = (struct mbox_chan *) return &pcc_mbox_channels[id];
(unsigned long) pcc_mbox_channels +
(id * sizeof(*pcc_chan));
return pcc_chan;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment