[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1402692095-23126-2-git-send-email-broonie@kernel.org>
Date: Fri, 13 Jun 2014 21:41:35 +0100
From: Mark Brown <broonie@...nel.org>
To: Jassi Brar <jaswinder.singh@...aro.org>
Cc: linaro-kernel@...ts.linaro.org, linux-kernel@...r.kernel.org,
Mark Brown <broonie@...aro.org>
Subject: [PATCH 2/2] mailbox: Remove const from client argument of mbox_request_channel()
From: Mark Brown <broonie@...aro.org>
The struct mbox_client supplied to mbox_request_channel() is const but
it is stored in the channel in a non-constant member causing compiler
warnings.
While the mailbox API should treat the struct mailbox_client as const
itself the struct is passed back to the channel in callbacks without
a const so we need to either remove the const, change the callbacks to
take const or cast the const away when doing callbacks. Take the simplest
option and just remove the const.
Signed-off-by: Mark Brown <broonie@...aro.org>
---
drivers/mailbox/mailbox.c | 2 +-
include/linux/mailbox_client.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c
index ae4abd9f7513..662f8e550473 100644
--- a/drivers/mailbox/mailbox.c
+++ b/drivers/mailbox/mailbox.c
@@ -294,7 +294,7 @@ EXPORT_SYMBOL_GPL(mbox_send_message);
* Return: Pointer to the channel assigned to the client if successful.
* ERR_PTR for request failure.
*/
-struct mbox_chan *mbox_request_channel(const struct mbox_client *cl)
+struct mbox_chan *mbox_request_channel(struct mbox_client *cl)
{
struct device *dev = cl->dev;
struct mbox_controller *mbox;
diff --git a/include/linux/mailbox_client.h b/include/linux/mailbox_client.h
index cbfcf8478ca9..955f3d7641e8 100644
--- a/include/linux/mailbox_client.h
+++ b/include/linux/mailbox_client.h
@@ -37,7 +37,7 @@ struct mbox_client {
bool knows_txdone;
};
-struct mbox_chan *mbox_request_channel(const struct mbox_client *cl);
+struct mbox_chan *mbox_request_channel(struct mbox_client *cl);
int mbox_send_message(struct mbox_chan *chan, void *mssg);
void mbox_client_txdone(struct mbox_chan *chan, int r);
bool mbox_client_peek_data(struct mbox_chan *chan);
--
2.0.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists