diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-02-07 18:17:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-02-07 18:17:47 -0500 |
commit | 63fee123da6a05b48695599c4349ab5de97da5e2 (patch) | |
tree | 1048c2de1f2674a0a5b7e9f8cf2b815c83b77225 | |
parent | 46df55ceeaf3d28689242de2dd722857b7ea341f (diff) | |
parent | 65d3b04a814679a31fe4d5edd19d89dd5b94fd40 (diff) |
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()
-rw-r--r-- | drivers/mailbox/Kconfig | 1 | ||||
-rw-r--r-- | drivers/mailbox/pcc.c | 8 |
2 files changed, 2 insertions, 7 deletions
diff --git a/drivers/mailbox/Kconfig b/drivers/mailbox/Kconfig index 546d05f4358a..b2bbe8659bed 100644 --- a/drivers/mailbox/Kconfig +++ b/drivers/mailbox/Kconfig | |||
@@ -81,6 +81,7 @@ config STI_MBOX | |||
81 | config MAILBOX_TEST | 81 | config MAILBOX_TEST |
82 | tristate "Mailbox Test Client" | 82 | tristate "Mailbox Test Client" |
83 | depends on OF | 83 | depends on OF |
84 | depends on HAS_IOMEM | ||
84 | help | 85 | help |
85 | Test client to help with testing new Controller driver | 86 | Test client to help with testing new Controller driver |
86 | implementations. | 87 | implementations. |
diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c index 45d85aea9955..8f779a1ec99c 100644 --- a/drivers/mailbox/pcc.c +++ b/drivers/mailbox/pcc.c | |||
@@ -81,16 +81,10 @@ static struct mbox_controller pcc_mbox_ctrl = {}; | |||
81 | */ | 81 | */ |
82 | static struct mbox_chan *get_pcc_channel(int id) | 82 | static struct mbox_chan *get_pcc_channel(int id) |
83 | { | 83 | { |
84 | struct mbox_chan *pcc_chan; | ||
85 | |||
86 | if (id < 0 || id > pcc_mbox_ctrl.num_chans) | 84 | if (id < 0 || id > pcc_mbox_ctrl.num_chans) |
87 | return ERR_PTR(-ENOENT); | 85 | return ERR_PTR(-ENOENT); |
88 | 86 | ||
89 | pcc_chan = (struct mbox_chan *) | 87 | return &pcc_mbox_channels[id]; |
90 | (unsigned long) pcc_mbox_channels + | ||
91 | (id * sizeof(*pcc_chan)); | ||
92 | |||
93 | return pcc_chan; | ||
94 | } | 88 | } |
95 | 89 | ||
96 | /** | 90 | /** |