Commit 05ae7975 authored by Andrew Bresticker's avatar Andrew Bresticker Committed by Jassi Brar

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: default avatarAndrew Bresticker <abrestic@chromium.org>
Cc: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Cc: Ley Foon Tan <lftan@altera.com>
Acked-by: default avatarSuman Anna <s-anna@ti.com>
Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
parent 59dd3f02
...@@ -110,7 +110,7 @@ static void mhu_shutdown(struct mbox_chan *chan) ...@@ -110,7 +110,7 @@ static void mhu_shutdown(struct mbox_chan *chan)
free_irq(mlink->irq, 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, .send_data = mhu_send_data,
.startup = mhu_startup, .startup = mhu_startup,
.shutdown = mhu_shutdown, .shutdown = mhu_shutdown,
......
...@@ -285,7 +285,7 @@ static void altera_mbox_shutdown(struct mbox_chan *chan) ...@@ -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, .send_data = altera_mbox_send_data,
.startup = altera_mbox_startup, .startup = altera_mbox_startup,
.shutdown = altera_mbox_shutdown, .shutdown = altera_mbox_shutdown,
......
...@@ -604,7 +604,7 @@ static int omap_mbox_chan_send_data(struct mbox_chan *chan, void *data) ...@@ -604,7 +604,7 @@ static int omap_mbox_chan_send_data(struct mbox_chan *chan, void *data)
return ret; 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, .startup = omap_mbox_chan_startup,
.send_data = omap_mbox_chan_send_data, .send_data = omap_mbox_chan_send_data,
.shutdown = omap_mbox_chan_shutdown, .shutdown = omap_mbox_chan_shutdown,
......
...@@ -198,7 +198,7 @@ static int pcc_send_data(struct mbox_chan *chan, void *data) ...@@ -198,7 +198,7 @@ static int pcc_send_data(struct mbox_chan *chan, void *data)
return 0; return 0;
} }
static struct mbox_chan_ops pcc_chan_ops = { static const struct mbox_chan_ops pcc_chan_ops = {
.send_data = pcc_send_data, .send_data = pcc_send_data,
}; };
......
...@@ -72,7 +72,7 @@ struct mbox_chan_ops { ...@@ -72,7 +72,7 @@ struct mbox_chan_ops {
*/ */
struct mbox_controller { struct mbox_controller {
struct device *dev; struct device *dev;
struct mbox_chan_ops *ops; const struct mbox_chan_ops *ops;
struct mbox_chan *chans; struct mbox_chan *chans;
int num_chans; int num_chans;
bool txdone_irq; bool txdone_irq;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment