From: Greg KH <greg@kroah.com>
To: Ben Collins <bcollins@debian.org>
Cc: Patrick Mochel <mochel@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [RFC] [PATCH] Device removal callback
Date: Sun, 9 Mar 2003 16:11:02 -0800 [thread overview]
Message-ID: <20030310001102.GE6082@kroah.com> (raw)
In-Reply-To: <20030309181413.GA492@phunnypharm.org>
On Sun, Mar 09, 2003 at 01:14:13PM -0500, Ben Collins wrote:
>
> So I added a new callback to the device stucture called remove. This
> callback is done when device_del is about to remove a device from the
> tree. I've used this internally to make sure I can walk the list of
> children myself, and also do some other cleanups.
But don't you really want to remove the children before you remove the
parent? If you do this patch, then the remove() function will have to
clean up the children first, right? Can we handle the core recursion
with the current locks properly?
Yes, for USB we still have a list of a device's children, as we need
them for various things, and the current driver model only has a parent
pointer, not a child pointer (which is good, as for USB we can have
multiple children). So in the function where we know a USB device is
disconnected, we walk our list of children and disconnect them in a
depth-first order. With this patch I don't see how it helps me push
code into the driver core.
Confused,
greg k-h
next prev parent reply other threads:[~2003-03-10 0:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-09 18:14 [RFC] [PATCH] Device removal callback Ben Collins
2003-03-10 0:11 ` Greg KH [this message]
2003-03-10 1:02 ` Ben Collins
2003-03-10 15:59 ` Patrick Mochel
2003-03-10 16:55 ` Ben Collins
2003-03-10 17:21 ` Greg KH
2003-03-10 18:12 ` Ben Collins
2003-03-10 15:45 ` Patrick Mochel
2003-03-10 16:30 ` Ben Collins
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=20030310001102.GE6082@kroah.com \
--to=greg@kroah.com \
--cc=bcollins@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@osdl.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