linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Govindraj.R" <govindraj.raja@ti.com>
To: Samuel Ortiz <sameo@linux.intel.com>, linux-usb@vger.kernel.org
Cc: linux-omap@vger.kernel.org, Felipe Balbi <balbi@ti.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	"Govindraj.R" <govindraj.raja@ti.com>
Subject: [PATCH 2/2] mfd: omap-usb-host: Move usbhs init before allocing child dev
Date: Wed, 15 Feb 2012 15:53:34 +0530	[thread overview]
Message-ID: <1329301414-31003-3-git-send-email-govindraj.raja@ti.com> (raw)
In-Reply-To: <1329301414-31003-1-git-send-email-govindraj.raja@ti.com>

From: "Govindraj.R" <govindraj.raja@ti.com>

There could be possible race condition where the host dev's
are alloced and added to platform dev just before usbhs_init.
Just move usbhs_init before adding child dev.

CC: Felipe Balbi <balbi@ti.com>
CC: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
---
 drivers/mfd/omap-usb-host.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
index 3109b0a..c5d48ce 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -799,14 +799,13 @@ static int __devinit usbhs_omap_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, omap);
 
+	omap_usbhs_init(dev);
 	ret = omap_usbhs_alloc_children(pdev);
 	if (ret) {
 		dev_err(dev, "omap_usbhs_alloc_children failed\n");
 		goto err_alloc;
 	}
 
-	omap_usbhs_init(dev);
-
 	goto end_probe;
 
 err_alloc:
-- 
1.7.5.4


  parent reply	other threads:[~2012-02-15 10:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-15 10:23 [PATCH 0/2] mfd: omap-usb-host: Minor omap-usb host fixes Govindraj.R
2012-02-15 10:23 ` [PATCH 1/2] mfd: omap-usb-host: Remove magic numbers for dev dma mask Govindraj.R
2012-02-15 11:17   ` Felipe Balbi
2012-02-15 15:01     ` Govindraj
2012-02-15 15:56       ` Felipe Balbi
2012-02-15 10:23 ` Govindraj.R [this message]
     [not found]   ` <1329301414-31003-3-git-send-email-govindraj.raja-l0cyMroinI0@public.gmane.org>
2012-02-15 11:17     ` [PATCH 2/2] mfd: omap-usb-host: Move usbhs init before allocing child dev Felipe Balbi
     [not found] ` <1329301414-31003-1-git-send-email-govindraj.raja-l0cyMroinI0@public.gmane.org>
2012-02-23 15:45   ` [PATCH 0/2] mfd: omap-usb-host: Minor omap-usb host fixes Samuel Ortiz

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=1329301414-31003-3-git-send-email-govindraj.raja@ti.com \
    --to=govindraj.raja@ti.com \
    --cc=balbi@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=stern@rowland.harvard.edu \
    /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;
as well as URLs for NNTP newsgroup(s).