Skip to content

Commit 63fee12

Browse files
committed
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()
2 parents 46df55c + 65d3b04 commit 63fee12

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

drivers/mailbox/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ config STI_MBOX
8181
config MAILBOX_TEST
8282
tristate "Mailbox Test Client"
8383
depends on OF
84+
depends on HAS_IOMEM
8485
help
8586
Test client to help with testing new Controller driver
8687
implementations.

drivers/mailbox/pcc.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,10 @@ static struct mbox_controller pcc_mbox_ctrl = {};
8181
*/
8282
static struct mbox_chan *get_pcc_channel(int id)
8383
{
84-
struct mbox_chan *pcc_chan;
85-
8684
if (id < 0 || id > pcc_mbox_ctrl.num_chans)
8785
return ERR_PTR(-ENOENT);
8886

89-
pcc_chan = (struct mbox_chan *)
90-
(unsigned long) pcc_mbox_channels +
91-
(id * sizeof(*pcc_chan));
92-
93-
return pcc_chan;
87+
return &pcc_mbox_channels[id];
9488
}
9589

9690
/**

0 commit comments

Comments
 (0)