public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
To: Jonathan Cameron <jic23@cam.ac.uk>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, greg@kroah.com
Subject: Re: [RFC PATCH 0/2] Sysfs group create for empty groups.
Date: Wed, 17 Aug 2011 17:27:41 +0100	[thread overview]
Message-ID: <4E4BEBFD.3040004@cam.ac.uk> (raw)
In-Reply-To: <1313576222-27743-1-git-send-email-jic23@cam.ac.uk>

On 08/17/11 11:17, Jonathan Cameron wrote:
> The following is a quick stab at avoiding a hideous work around
> we are currently using in IIO.  In some cases we have entire
> attribute groups that are created from descriptions an array
> of struct iio_chan_spec.  To keep the reference counts sane
> and cause subdirectories to be created we are currently using
> dummy groups and dummy attribute arrays (provided once in the
> core).  This series is an initial probably stupid approach
> to avoiding this.
> 
> Greg has expressed some doubts about whether subdirectories are
> ever a good idea, but the problem occurs for the top level
> directory as well (handled by patch 1).
> 
> Note, all attributes are created at probe time.  Ultimately we
> are just respinning the create_group code to allow us to create
> the attributes from a device description rather than statically
> allocating them in each driver (results in a massive reduction
> in repeated code).
> 
> All opinions welcomed.
> 
> (this is definitely an rfc, the code isn't even tested yet)
Now tested and looks fine, so I've pushed it to our iio dev tree
(which is re based a few times a day currently so I can always
drop it again ;)
> 
> Jonathan
> 
> p.s. Greg, sorry for pestering about this!
> 
> Jonathan Cameron (2):
>   sysfs: Allow for null group pointer in create_group
>   sysfs: Allow for groups with no attributes - grp->attrs = NULL.
> 
>  fs/sysfs/group.c |   28 +++++++++++++++++-----------
>  1 files changed, 17 insertions(+), 11 deletions(-)
> 


  parent reply	other threads:[~2011-08-17 16:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-17 10:17 [RFC PATCH 0/2] Sysfs group create for empty groups Jonathan Cameron
2011-08-17 10:17 ` [PATCH 1/2] sysfs: Allow for null group pointer in create_group Jonathan Cameron
2011-08-17 10:17 ` [PATCH 2/2] sysfs: Allow for groups with no attributes - grp->attrs = NULL Jonathan Cameron
2011-08-17 16:27 ` Jonathan Cameron [this message]
2011-08-23  0:33   ` [RFC PATCH 0/2] Sysfs group create for empty groups Greg KH
2011-08-23 11:01     ` Jonathan Cameron
2011-08-23 19:25       ` Jonathan Cameron
2011-08-23 22:03         ` Greg KH

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=4E4BEBFD.3040004@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=greg@kroah.com \
    --cc=linux-iio@vger.kernel.org \
    --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