linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] omap mailbox: extend API to take a callback param
@ 2010-06-23  0:11 Ohad Ben-Cohen
  2010-06-23  0:11 ` [PATCH 2/4] omap mailbox: prevent multiple concurrent receivers race Ohad Ben-Cohen
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Ohad Ben-Cohen @ 2010-06-23  0:11 UTC (permalink / raw)
  To: linux-omap; +Cc: Hiroshi Doyu, Omar Ramirez Luna, Ohad Ben-Cohen

Let mailbox users set the callback pointer via the
omap_mbox_get API, instead of having users directly
manipulating the mailbox structures.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
---
I can also be contacted at < ohadb at ti dot com >

 arch/arm/plat-omap/include/plat/mailbox.h |    2 +-
 arch/arm/plat-omap/mailbox.c              |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/mailbox.h b/arch/arm/plat-omap/include/plat/mailbox.h
index 9976565..0b45664 100644
--- a/arch/arm/plat-omap/include/plat/mailbox.h
+++ b/arch/arm/plat-omap/include/plat/mailbox.h
@@ -62,7 +62,7 @@ struct omap_mbox {
 int omap_mbox_msg_send(struct omap_mbox *, mbox_msg_t msg);
 void omap_mbox_init_seq(struct omap_mbox *);
 
-struct omap_mbox *omap_mbox_get(const char *);
+struct omap_mbox *omap_mbox_get(const char *name, int (*callback)(void *));
 void omap_mbox_put(struct omap_mbox *);
 
 int omap_mbox_register(struct device *parent, struct omap_mbox **);
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index d2fafb8..14b716d 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -305,7 +305,7 @@ static void omap_mbox_fini(struct omap_mbox *mbox)
 	}
 }
 
-struct omap_mbox *omap_mbox_get(const char *name)
+struct omap_mbox *omap_mbox_get(const char *name, int (*callback)(void *))
 {
 	struct omap_mbox *mbox;
 	int ret;
@@ -324,6 +324,8 @@ struct omap_mbox *omap_mbox_get(const char *name)
 	if (ret)
 		return ERR_PTR(-ENODEV);
 
+	mbox->rxq->callback = callback;
+
 	return mbox;
 }
 EXPORT_SYMBOL(omap_mbox_get);
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-06-25 13:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-23  0:11 [PATCH 1/4] omap mailbox: extend API to take a callback param Ohad Ben-Cohen
2010-06-23  0:11 ` [PATCH 2/4] omap mailbox: prevent multiple concurrent receivers race Ohad Ben-Cohen
2010-06-23  0:11 ` [PATCH 3/4] omap mailbox: remove mbox_configured scheme Ohad Ben-Cohen
2010-06-24 15:10   ` Kanigeri, Hari
2010-06-24 20:22     ` Ohad Ben-Cohen
2010-06-24 21:35       ` C.A, Subramaniam
2010-06-24 22:24         ` C.A, Subramaniam
2010-06-24 22:31           ` Gupta, Ramesh
2010-06-23  0:11 ` [PATCH 4/4] dspbridge: use mailbox API to set rx callback Ohad Ben-Cohen
2010-06-24 15:02 ` [PATCH 1/4] omap mailbox: extend API to take a callback param Kanigeri, Hari
2010-06-24 20:34   ` Ohad Ben-Cohen
2010-06-25  0:52     ` Kanigeri, Hari
2010-06-25 13:20       ` Ohad Ben-Cohen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).