mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Omar Ramirez Luna <omar.ramirez@ti.com>
To: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Felipe Contreras <felipe.contreras@nokia.com>,
	Omar Ramirez Luna <omar.ramirez@ti.com>,
	Fernando Guzman Lugo <fernando.lugo@ti.com>,
	Rene Sapiens <rene.sapiens@ti.com>,
	devel <devel@driverdev.osuosl.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/2] staging: tidspbridge: replace mbox callback with notifier_call
Date: Thu, 13 Jan 2011 23:34:53 -0600	[thread overview]
Message-ID: <1294983293-10177-3-git-send-email-omar.ramirez@ti.com> (raw)
In-Reply-To: <1294983293-10177-1-git-send-email-omar.ramirez@ti.com>

Lately, mailbox callbacks have been replaced by notifier block
call chains, this needs to be changed in the users of mailbox,
otherwise compilation will break due to missing parameters.

Reported-by: Hari Kanigeri <h-kanigeri2@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 drivers/staging/tidspbridge/core/tiomap3430.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c
index d6f333e..7652c06 100644
--- a/drivers/staging/tidspbridge/core/tiomap3430.c
+++ b/drivers/staging/tidspbridge/core/tiomap3430.c
@@ -223,6 +223,10 @@ static struct bridge_drv_interface drv_interface_fxns = {
 	bridge_msg_set_queue_id,
 };
 
+static struct notifier_block dsp_mbox_notifier = {
+	.notifier_call = io_mbox_msg,
+};
+
 static inline void flush_all(struct bridge_dev_context *dev_context)
 {
 	if (dev_context->dw_brd_state == BRD_DSP_HIBERNATION ||
@@ -553,7 +557,7 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,
 		 * Enable Mailbox events and also drain any pending
 		 * stale messages.
 		 */
-		dev_context->mbox = omap_mbox_get("dsp");
+		dev_context->mbox = omap_mbox_get("dsp", &dsp_mbox_notifier);
 		if (IS_ERR(dev_context->mbox)) {
 			dev_context->mbox = NULL;
 			pr_err("%s: Failed to get dsp mailbox handle\n",
@@ -563,8 +567,6 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,
 
 	}
 	if (!status) {
-		dev_context->mbox->rxq->callback = (int (*)(void *))io_mbox_msg;
-
 /*PM_IVA2GRPSEL_PER = 0xC0;*/
 		temp = readl(resources->dw_per_pm_base + 0xA8);
 		temp = (temp & 0xFFFFFF30) | 0xC0;
@@ -685,7 +687,7 @@ static int bridge_brd_stop(struct bridge_dev_context *dev_ctxt)
 	/* Disable the mailbox interrupts */
 	if (dev_context->mbox) {
 		omap_mbox_disable_irq(dev_context->mbox, IRQ_RX);
-		omap_mbox_put(dev_context->mbox);
+		omap_mbox_put(dev_context->mbox, &dsp_mbox_notifier);
 		dev_context->mbox = NULL;
 	}
 	/* Reset IVA2 clocks*/
-- 
1.7.1


  parent reply	other threads:[~2011-01-14  5:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-14  5:34 [PATCH 0/2] staging: tidspbridge for 2.6.38 Omar Ramirez Luna
2011-01-14  5:34 ` [PATCH 1/2] staging: tidspbridge: configure full L1 MMU range Omar Ramirez Luna
2011-01-14  5:34 ` Omar Ramirez Luna [this message]
2011-01-14 22:53   ` [PATCH 2/2] staging: tidspbridge: replace mbox callback with notifier_call Ramirez Luna, Omar
2011-01-20 19:52     ` Greg KH
2011-01-19 17:01 ` [PATCH 0/2] staging: tidspbridge for 2.6.38 Ramirez Luna, Omar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1294983293-10177-3-git-send-email-omar.ramirez@ti.com \
    --to=omar.ramirez@ti.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=felipe.contreras@nokia.com \
    --cc=fernando.lugo@ti.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rene.sapiens@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome