Skip to content

Commit 8aa4a34

Browse files
glneoJassi Brar
authored andcommitted
mailbox: omap: Remove unneeded header omap-mailbox.h
The type of message sent using omap-mailbox is always u32. The definition of mbox_msg_t is uintptr_t which is wrong as that type changes based on the architecture (32bit vs 64bit). This type should have been defined as u32. Instead of making that change here, simply remove the header usage and fix the last couple users of the same in this driver. Signed-off-by: Andrew Davis <[email protected]> Signed-off-by: Jassi Brar <[email protected]>
1 parent e9eceec commit 8aa4a34

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/mailbox/omap-mailbox.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include <linux/of.h>
2020
#include <linux/platform_device.h>
2121
#include <linux/pm_runtime.h>
22-
#include <linux/omap-mailbox.h>
2322
#include <linux/mailbox_controller.h>
2423
#include <linux/mailbox_client.h>
2524

@@ -239,16 +238,14 @@ static void mbox_rx_work(struct work_struct *work)
239238
{
240239
struct omap_mbox_queue *mq =
241240
container_of(work, struct omap_mbox_queue, work);
242-
mbox_msg_t data;
243241
u32 msg;
244242
int len;
245243

246244
while (kfifo_len(&mq->fifo) >= sizeof(msg)) {
247245
len = kfifo_out(&mq->fifo, (unsigned char *)&msg, sizeof(msg));
248246
WARN_ON(len != sizeof(msg));
249-
data = msg;
250247

251-
mbox_chan_received_data(mq->mbox->chan, (void *)data);
248+
mbox_chan_received_data(mq->mbox->chan, (void *)(uintptr_t)msg);
252249
spin_lock_irq(&mq->lock);
253250
if (mq->full) {
254251
mq->full = false;
@@ -515,7 +512,7 @@ static int omap_mbox_chan_send_data(struct mbox_chan *chan, void *data)
515512
{
516513
struct omap_mbox *mbox = mbox_chan_to_omap_mbox(chan);
517514
int ret;
518-
u32 msg = omap_mbox_message(data);
515+
u32 msg = (u32)(uintptr_t)(data);
519516

520517
if (!mbox)
521518
return -EINVAL;

0 commit comments

Comments
 (0)