mailbox: Make mbox_chan_ops const
authorAndrew Bresticker <abrestic@chromium.org>
Mon, 4 May 2015 17:36:35 +0000 (10:36 -0700)
committerJassi Brar <jaswinder.singh@linaro.org>
Tue, 12 May 2015 03:48:16 +0000 (09:18 +0530)
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>
drivers/mailbox/arm_mhu.c
drivers/mailbox/mailbox-altera.c
drivers/mailbox/omap-mailbox.c
drivers/mailbox/pcc.c
include/linux/mailbox_controller.h

index ac693c63535769442aba9a452947850f88c8016f..d9e99f981aa98ee229a40517d7fa86a14533d886 100644 (file)
@@ -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,
index a266265677d3ebf533290a01a1a0af6212f2e292..bb682c926b0a048ab1918ba13a89c140dff19d96 100644 (file)
@@ -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,
index 0f332c178b07a049d3153887b57643659ed2487b..03f8545ba0371488abbc33b5252dab29def02828 100644 (file)
@@ -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,
index 7e91d68a3ac3d02b2622315b2745f605c5961300..26d121d1d501b7617857a364a63c9dd4b97c1438 100644 (file)
@@ -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,
 };
 
index d4cf96f07cfc42452f7bafb1d546cf64b984319e..68c42454439be372caba99424ef6a57bac5f5c2d 100644 (file)
@@ -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;