All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: linux-kernel@vger.kernel.org,
	Grant Likely <grant.likely@linaro.org>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: Re: Missing removal of sysfs attributes in gpiolib
Date: Wed, 28 Aug 2013 11:31:39 -0700	[thread overview]
Message-ID: <20130828183139.GA14627@kroah.com> (raw)
In-Reply-To: <20130828175717.GA7493@roeck-us.net>

On Wed, Aug 28, 2013 at 10:57:17AM -0700, Guenter Roeck wrote:
> Hi,
> 
> I noticed that gpiolib does not explicitly remove the sysfs attributes it
> created when exporting a gpio pin when the pin is unexported, ie when the
> associated device is removed.
> 
> Are those attributes auto-removed when device_unregister() is called ?

Yes they are.

> Sorry if this is a dumb question - I have not noticed this anywhere else,
> and I don't seem to be able to find the code actually performing auto-removal
> of manually created attributes, so I wonder if this is a bug or intentional.

Hm, I thought this was listed in the kobject.txt documentation file, but
I don't seem to find it there.

But, ideally you aren't creating individual attributes directly, you are
using attribute groups for the device, right?

thanks,

greg k-h

  reply	other threads:[~2013-08-28 18:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-28 17:57 Missing removal of sysfs attributes in gpiolib Guenter Roeck
2013-08-28 18:31 ` Greg Kroah-Hartman [this message]
2013-08-28 18:44   ` Guenter Roeck
2013-08-28 18:53     ` Greg Kroah-Hartman
2013-08-28 19:33       ` Guenter Roeck

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=20130828183139.GA14627@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=grant.likely@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /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.