public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
To: LKML <linux-kernel@vger.kernel.org>, Greg KH <greg@kroah.com>
Subject: Sysfs - export sysfs_create_subdir?
Date: Fri, 22 Jul 2011 18:43:13 +0100	[thread overview]
Message-ID: <4E29B6B1.2090107@cam.ac.uk> (raw)

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.

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.

Anyone have any strong feelings on whether this is worthwhile or not?

It'll save me about 16 lines of code, so not exactly a big point,
but nice to get it right none the less!

If there is a way of doing this cleanly that I'm missing, then sorry
for the noise and please tell me what it is!

Jonathan

             reply	other threads:[~2011-07-22 17:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-22 17:43 Jonathan Cameron [this message]
2011-07-24  3:18 ` Sysfs - export sysfs_create_subdir? Greg KH
2011-07-25  9:17   ` 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=4E29B6B1.2090107@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=greg@kroah.com \
    --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