All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Jonathan Cameron <jic23@cam.ac.uk>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: Sysfs - export sysfs_create_subdir?
Date: Sat, 23 Jul 2011 20:18:04 -0700	[thread overview]
Message-ID: <20110724031804.GA16601@kroah.com> (raw)
In-Reply-To: <4E29B6B1.2090107@cam.ac.uk>

On Fri, Jul 22, 2011 at 06:43:13PM +0100, Jonathan Cameron wrote:
> Hi All,
> 
> I have a couple of cases in IIO where under some conditions
> we end up using dummy attr_groups (no elements) to initialize
> a sub directory before dynamically creating all of its attributes.

Ick, you really shouldn't do that.

> Now having dummy groups in the IIO core is fine, but it does seem
> a little messy.
> 
> The obvious choice would be to put together a small wrapper function
> for sysfs_create_subdir that also does sysfs_get on the result.

That's why that function is not exported.  Creating subdirectories in
sysfs is not a good idea, udev doesn't like it, and you don't get
userspace notification for it very well either.

What specifically are you trying to do in sysfs that you are needing
this?

thanks,

greg k-h

  reply	other threads:[~2011-07-24  3:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-22 17:43 Sysfs - export sysfs_create_subdir? Jonathan Cameron
2011-07-24  3:18 ` Greg KH [this message]
2011-07-25  9:17   ` Jonathan Cameron
2011-08-02 17:18     ` Jonathan Cameron

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=20110724031804.GA16601@kroah.com \
    --to=greg@kroah.com \
    --cc=jic23@cam.ac.uk \
    --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 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.