public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Len Brown <lenb@kernel.org>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>,
	Greg KH <greg@kroah.com>, Andrew Morton <akpm@osdl.org>,
	Deepak Saxena <dsaxena@plexity.net>
Subject: Re: [PATCH/RFC] Call platform_notify_remove later
Date: Wed, 18 Oct 2006 18:34:52 +1000	[thread overview]
Message-ID: <1161160492.23947.25.camel@localhost.localdomain> (raw)
In-Reply-To: <200610180334.20810.len.brown@intel.com>

On Wed, 2006-10-18 at 03:34 -0400, Len Brown wrote:
> On Tuesday 17 October 2006 22:08, Benjamin Herrenschmidt wrote:
> > (CC'ed Deepak and Len, the two only users of that callback I could find
> > in the tree).
> > 
> > Right now, the driver core calls the platform_notify hook when adding a
> > device, before attaching to the bus and probing drivers. That is all
> > good. However, it calls platform_notify_remove on removal of a device
> > also -before- calling bus_remove_device(), and thus before unhooking
> > drivers from that device. That strikes me as odd, and even incorrect.
> 
> AFAICS, your change is logical and should be fine.

Thanks. However, before I throw it properly at Andrew for 2.6.20, what
do you think of a different approach: removing those 2 function pointers
and replacing them with a notifier ?

I find that with my refactoring of the DMA ops, I actually have various
bits of code (the pci layer, some platform bus code, etc...) that need
to "hook" there to create my auxilliary data structure depending, among
other, on the bus type, and I'd like to keep those functions well
separated in different files without inter-links.

Thus I'd rather have the interested bits be able to just register a
notifier and get called on device add and remove. Does it look like
something you could use too ?

Cheers,
Ben.


      reply	other threads:[~2006-10-18  8:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-18  2:08 [PATCH/RFC] Call platform_notify_remove later Benjamin Herrenschmidt
2006-10-18  7:34 ` Len Brown
2006-10-18  8:34   ` Benjamin Herrenschmidt [this message]

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=1161160492.23947.25.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=akpm@osdl.org \
    --cc=dsaxena@plexity.net \
    --cc=greg@kroah.com \
    --cc=lenb@kernel.org \
    --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