public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jamey Hicks <jamey.hicks@hp.com>
To: linux-kernel@vger.kernel.org
Subject: recursive call to platform_device_register deadlocks
Date: Sat, 18 Jun 2005 10:39:34 -0400	[thread overview]
Message-ID: <42B43226.20703@hp.com> (raw)


We wrote soc_device to handle ASICs that were structured as a number of 
subcomponents, some of which are reused from ASIC to ASIC.  This enables 
the drivers for the subcomponents to be in separate files, loaded as 
modules, and enhances code reuse.  We submitted soc_device, but it was 
pointed out that platform_device probably does what we want.

We've started working on replacing uses of soc_device in handhelds 
drivers by platform_device.   One of the things we ran into is that the 
platform_device driver for an ASIC was calling soc_device_register 
inside its probe function.  If this is converted to 
platform_device_register, then the process deadlocks because 
bus_add_device locks platform_bus_type.

We could restructure the toplevel driver so that it does not call 
platform_device inside its probe function.  An alternative would be to 
add a pointer to a vector of subdevices to platform_device and have it 
register the subdevices after it has probed the toplevel device.  Do you 
have any recommendations?

Thanks,
Jamey Hicks


             reply	other threads:[~2005-06-18 14:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-18 14:39 Jamey Hicks [this message]
2005-06-19  5:59 ` recursive call to platform_device_register deadlocks Greg KH
2005-06-20 13:26   ` Jamey Hicks
2005-06-21 13:55   ` Jamey Hicks
2005-06-21  7:43 ` Russell King
  -- strict thread matches above, loose matches on Subject: below --
2005-06-18 16:06 David Brownell

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=42B43226.20703@hp.com \
    --to=jamey.hicks@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    /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