diff options
author | Andrew Bresticker <abrestic@chromium.org> | 2015-05-04 13:36:35 -0400 |
---|---|---|
committer | Jassi Brar <jaswinder.singh@linaro.org> | 2015-05-11 23:48:16 -0400 |
commit | 05ae797566a66d159cf1e2ee11bf3f6fae40c8eb (patch) | |
tree | 409e6262f89399295e2e1e6d35345ac5fe8c170d | |
parent | 59dd3f02615e52c42207a8e873f7f86bf7d447c4 (diff) |
mailbox: Make mbox_chan_ops const
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: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Cc: Ley Foon Tan <lftan@altera.com>
Acked-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
-rw-r--r-- | drivers/mailbox/arm_mhu.c | 2 | ||||
-rw-r--r-- | drivers/mailbox/mailbox-altera.c | 2 | ||||
-rw-r--r-- | drivers/mailbox/omap-mailbox.c | 2 | ||||
-rw-r--r-- | drivers/mailbox/pcc.c | 2 | ||||
-rw-r--r-- | 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 ac693c635357..d9e99f981aa9 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) | |||
110 | free_irq(mlink->irq, chan); | 110 | free_irq(mlink->irq, chan); |
111 | } | 111 | } |
112 | 112 | ||
113 | static struct mbox_chan_ops mhu_ops = { | 113 | static const struct mbox_chan_ops mhu_ops = { |
114 | .send_data = mhu_send_data, | 114 | .send_data = mhu_send_data, |
115 | .startup = mhu_startup, | 115 | .startup = mhu_startup, |
116 | .shutdown = mhu_shutdown, | 116 | .shutdown = mhu_shutdown, |
diff --git a/drivers/mailbox/mailbox-altera.c b/drivers/mailbox/mailbox-altera.c index a266265677d3..bb682c926b0a 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) | |||
285 | } | 285 | } |
286 | } | 286 | } |
287 | 287 | ||
288 | static struct mbox_chan_ops altera_mbox_ops = { | 288 | static const struct mbox_chan_ops altera_mbox_ops = { |
289 | .send_data = altera_mbox_send_data, | 289 | .send_data = altera_mbox_send_data, |
290 | .startup = altera_mbox_startup, | 290 | .startup = altera_mbox_startup, |
291 | .shutdown = altera_mbox_shutdown, | 291 | .shutdown = altera_mbox_shutdown, |
diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c index 0f332c178b07..03f8545ba037 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) | |||
604 | return ret; | 604 | return ret; |
605 | } | 605 | } |
606 | 606 | ||
607 | static struct mbox_chan_ops omap_mbox_chan_ops = { | 607 | static const struct mbox_chan_ops omap_mbox_chan_ops = { |
608 | .startup = omap_mbox_chan_startup, | 608 | .startup = omap_mbox_chan_startup, |
609 | .send_data = omap_mbox_chan_send_data, | 609 | .send_data = omap_mbox_chan_send_data, |
610 | .shutdown = omap_mbox_chan_shutdown, | 610 | .shutdown = omap_mbox_chan_shutdown, |
diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c index 7e91d68a3ac3..26d121d1d501 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) | |||
198 | return 0; | 198 | return 0; |
199 | } | 199 | } |
200 | 200 | ||
201 | static struct mbox_chan_ops pcc_chan_ops = { | 201 | static const struct mbox_chan_ops pcc_chan_ops = { |
202 | .send_data = pcc_send_data, | 202 | .send_data = pcc_send_data, |
203 | }; | 203 | }; |
204 | 204 | ||
diff --git a/include/linux/mailbox_controller.h b/include/linux/mailbox_controller.h index d4cf96f07cfc..68c42454439b 100644 --- a/include/linux/mailbox_controller.h +++ b/include/linux/mailbox_controller.h | |||
@@ -72,7 +72,7 @@ struct mbox_chan_ops { | |||
72 | */ | 72 | */ |
73 | struct mbox_controller { | 73 | struct mbox_controller { |
74 | struct device *dev; | 74 | struct device *dev; |
75 | struct mbox_chan_ops *ops; | 75 | const struct mbox_chan_ops *ops; |
76 | struct mbox_chan *chans; | 76 | struct mbox_chan *chans; |
77 | int num_chans; | 77 | int num_chans; |
78 | bool txdone_irq; | 78 | bool txdone_irq; |