Skip to content

Commit

Permalink
Merge branch 'mailbox-devel' of git://git.linaro.org/landing-teams/wo…
Browse files Browse the repository at this point in the history
…rking/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()
  • Loading branch information
torvalds committed Feb 7, 2016
2 parents 46df55c + 65d3b04 commit 63fee12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
1 change: 1 addition & 0 deletions drivers/mailbox/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ config STI_MBOX
config MAILBOX_TEST
tristate "Mailbox Test Client"
depends on OF
depends on HAS_IOMEM
help
Test client to help with testing new Controller driver
implementations.
Expand Down
8 changes: 1 addition & 7 deletions drivers/mailbox/pcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,10 @@ static struct mbox_controller pcc_mbox_ctrl = {};
*/
static struct mbox_chan *get_pcc_channel(int id)
{
struct mbox_chan *pcc_chan;

if (id < 0 || id > pcc_mbox_ctrl.num_chans)
return ERR_PTR(-ENOENT);

pcc_chan = (struct mbox_chan *)
(unsigned long) pcc_mbox_channels +
(id * sizeof(*pcc_chan));

return pcc_chan;
return &pcc_mbox_channels[id];
}

/**
Expand Down

0 comments on commit 63fee12

Please sign in to comment.