All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Chen Gang <gang.chen@asianux.com>
Cc: Ming Lei <tom.leiming@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [Consult] Why need we call device_remove_file() firstly before call device_unregister() ?
Date: Sun, 19 May 2013 18:45:06 -0700	[thread overview]
Message-ID: <20130520014506.GA2201@kroah.com> (raw)
In-Reply-To: <5199765F.5000905@asianux.com>

On Mon, May 20, 2013 at 09:03:27AM +0800, Chen Gang wrote:
> On 05/18/2013 07:06 PM, Ming Lei wrote:
> > Hi,
> > 
> > On Fri, May 17, 2013 at 1:43 PM, Chen Gang <gang.chen@asianux.com> wrote:
> >> Hello All:
> >>
> >> I searched 'arch/*' and 'drivers/*' sub-directory, all of them are 'obey
> >> this rule', even in device_unregister() itself, it also firstly calls
> >> device_remove_file(), then call kobject_del().
> >>
> >> But after read the related code (fs/sysfs/*, drivers/base/core.c), it
> >> seems kobject_del() -> sysfs_remove_dir() which will release all related
> >> things (can instead of device_remove_file()).
> >>
> >> So in fact, we need not call device_remove_file() before call
> >> device_unregister(), is it correct ?
> > 
> > Looks it is correct but it is a bit implicit.
> > 
> 
> If really no other members reply within a week, we should treat your
> opinion (or suggestion) as the final result conclusion within
> linux-kernel@vger.kernel.org.  :-)

I have no idea what you mean by this.


  reply	other threads:[~2013-05-20  1:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-17  5:43 [Consult] Why need we call device_remove_file() firstly before call device_unregister() ? Chen Gang
2013-05-18 11:06 ` Ming Lei
2013-05-20  1:03   ` Chen Gang
2013-05-20  1:45     ` Greg Kroah-Hartman [this message]
2013-05-20  2:12       ` Chen Gang
2013-05-20  2:20         ` Greg Kroah-Hartman
2013-05-20  2:42           ` Chen Gang

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=20130520014506.GA2201@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=gang.chen@asianux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tom.leiming@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.