From: abrestic@chromium.org (Andrew Bresticker)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v8 2/9] mailbox: Make mbox_chan_ops const
Date: Mon, 4 May 2015 10:36:35 -0700 [thread overview]
Message-ID: <1430761002-9327-3-git-send-email-abrestic@chromium.org> (raw)
In-Reply-To: <1430761002-9327-1-git-send-email-abrestic@chromium.org>
The mailbox controller's channel ops ought to be read-only. Update
all the mailbox drivers to make their mbox_chan_ops const as well.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Cc: Jassi Brar <jassisinghbrar@gmail.com>
Cc: Suman Anna <s-anna@ti.com>
Cc: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Cc: Ley Foon Tan <lftan@altera.com>
---
Changes from v7:
- Constify all drivers' mbox_chan_ops.
No changes from v5/v6.
New for v5.
---
drivers/mailbox/arm_mhu.c | 2 +-
drivers/mailbox/mailbox-altera.c | 2 +-
drivers/mailbox/omap-mailbox.c | 2 +-
drivers/mailbox/pcc.c | 2 +-
include/linux/mailbox_controller.h | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/mailbox/arm_mhu.c b/drivers/mailbox/arm_mhu.c
index ac693c6..d9e99f9 100644
--- a/drivers/mailbox/arm_mhu.c
+++ b/drivers/mailbox/arm_mhu.c
@@ -110,7 +110,7 @@ static void mhu_shutdown(struct mbox_chan *chan)
free_irq(mlink->irq, chan);
}
-static struct mbox_chan_ops mhu_ops = {
+static const struct mbox_chan_ops mhu_ops = {
.send_data = mhu_send_data,
.startup = mhu_startup,
.shutdown = mhu_shutdown,
diff --git a/drivers/mailbox/mailbox-altera.c b/drivers/mailbox/mailbox-altera.c
index a266265..bb682c9 100644
--- a/drivers/mailbox/mailbox-altera.c
+++ b/drivers/mailbox/mailbox-altera.c
@@ -285,7 +285,7 @@ static void altera_mbox_shutdown(struct mbox_chan *chan)
}
}
-static struct mbox_chan_ops altera_mbox_ops = {
+static const struct mbox_chan_ops altera_mbox_ops = {
.send_data = altera_mbox_send_data,
.startup = altera_mbox_startup,
.shutdown = altera_mbox_shutdown,
diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c
index 0f332c1..03f8545 100644
--- a/drivers/mailbox/omap-mailbox.c
+++ b/drivers/mailbox/omap-mailbox.c
@@ -604,7 +604,7 @@ static int omap_mbox_chan_send_data(struct mbox_chan *chan, void *data)
return ret;
}
-static struct mbox_chan_ops omap_mbox_chan_ops = {
+static const struct mbox_chan_ops omap_mbox_chan_ops = {
.startup = omap_mbox_chan_startup,
.send_data = omap_mbox_chan_send_data,
.shutdown = omap_mbox_chan_shutdown,
diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c
index 7e91d68..26d121d 100644
--- a/drivers/mailbox/pcc.c
+++ b/drivers/mailbox/pcc.c
@@ -198,7 +198,7 @@ static int pcc_send_data(struct mbox_chan *chan, void *data)
return 0;
}
-static struct mbox_chan_ops pcc_chan_ops = {
+static const struct mbox_chan_ops pcc_chan_ops = {
.send_data = pcc_send_data,
};
diff --git a/include/linux/mailbox_controller.h b/include/linux/mailbox_controller.h
index d4cf96f..68c4245 100644
--- a/include/linux/mailbox_controller.h
+++ b/include/linux/mailbox_controller.h
@@ -72,7 +72,7 @@ struct mbox_chan_ops {
*/
struct mbox_controller {
struct device *dev;
- struct mbox_chan_ops *ops;
+ const struct mbox_chan_ops *ops;
struct mbox_chan *chans;
int num_chans;
bool txdone_irq;
--
2.2.0.rc0.207.ga3a616c
next prev parent reply other threads:[~2015-05-04 17:36 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-04 17:36 [PATCH v8 0/9] Tegra xHCI support Andrew Bresticker
2015-05-04 17:36 ` [PATCH v8 1/9] xhci: Set shared HCD's hcd_priv in xhci_gen_setup Andrew Bresticker
2015-05-19 18:39 ` Andrew Bresticker
2015-05-22 12:19 ` Mathias Nyman
2015-05-04 17:36 ` Andrew Bresticker [this message]
2015-05-04 19:22 ` [PATCH v8 2/9] mailbox: Make mbox_chan_ops const Suman Anna
2015-05-04 17:36 ` [PATCH v8 3/9] mailbox: Fix up error handling in mbox_request_channel() Andrew Bresticker
2015-05-04 17:36 ` [PATCH v8 4/9] mfd: Add binding document for NVIDIA Tegra XUSB Andrew Bresticker
2015-05-13 14:39 ` Lee Jones
2015-05-13 16:26 ` Andrew Bresticker
2015-05-13 16:50 ` Lee Jones
2015-05-13 17:03 ` Andrew Bresticker
2015-05-14 7:29 ` Lee Jones
2015-05-14 7:32 ` Jon Hunter
2015-05-14 7:45 ` Lee Jones
2015-05-14 7:20 ` Jon Hunter
2015-05-14 7:40 ` Lee Jones
2015-05-14 9:14 ` Jon Hunter
2015-05-14 9:30 ` Lee Jones
2015-05-14 10:09 ` Jon Hunter
2015-05-14 10:23 ` Lee Jones
2015-05-14 11:21 ` Jon Hunter
2015-05-14 17:38 ` Andrew Bresticker
2015-05-19 18:36 ` Andrew Bresticker
2015-05-20 6:35 ` Lee Jones
2015-05-20 14:52 ` Thierry Reding
2015-05-21 7:19 ` Linus Walleij
2015-05-21 8:40 ` Lee Jones
2015-05-21 10:12 ` Thierry Reding
2015-05-26 15:18 ` Lee Jones
2015-06-30 18:22 ` Grant Likely
2015-05-04 17:36 ` [PATCH v8 5/9] mfd: Add driver " Andrew Bresticker
2015-05-13 14:37 ` Lee Jones
2015-05-13 16:31 ` Andrew Bresticker
2015-05-04 17:36 ` [PATCH v8 6/9] mailbox: Add NVIDIA Tegra XUSB mailbox binding Andrew Bresticker
2015-05-08 20:42 ` Benson Leung
2015-05-08 20:53 ` Andrew Bresticker
2015-05-08 21:03 ` Benson Leung
2015-05-04 17:36 ` [PATCH v8 7/9] mailbox: Add NVIDIA Tegra XUSB mailbox driver Andrew Bresticker
2015-05-04 17:36 ` [PATCH v8 8/9] usb: Add NVIDIA Tegra xHCI controller binding Andrew Bresticker
2015-05-04 17:36 ` [PATCH v8 9/9] usb: xhci: Add NVIDIA Tegra xHCI host-controller driver Andrew Bresticker
2015-05-05 14:28 ` [PATCH v8 0/9] Tegra xHCI support Jon Hunter
2015-05-05 14:42 ` Thierry Reding
2015-05-05 14:57 ` Jon Hunter
2015-05-12 3:56 ` Jassi Brar
2015-05-26 16:27 ` Andrew Bresticker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1430761002-9327-3-git-send-email-abrestic@chromium.org \
--to=abrestic@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).