public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Ian Abbott <abbotti@mev.co.uk>
Cc: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
	"fmhess@users.sourceforge.net" <fmhess@users.sourceforge.net>,
	Ian Abbott <ian.abbott@mev.co.uk>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	H Hartley Sweeten <hartleys@visionengravers.com>
Subject: Re: [PATCH] staging: comedi: register sysfs device attributes with driver core
Date: Fri, 11 May 2012 21:18:48 +0300	[thread overview]
Message-ID: <20120511181848.GA16984@mwanda> (raw)
In-Reply-To: <4FAD109A.9040607@mev.co.uk>

On Fri, May 11, 2012 at 02:14:02PM +0100, Ian Abbott wrote:
> On 2012-05-11 07:16, Dan Carpenter wrote:
> >On Thu, May 10, 2012 at 06:05:28PM -0700, H Hartley Sweeten wrote:
> >>-static const struct attribute_group comedi_sysfs_files = {
> >>-	.attrs	= comedi_attrs,
> >>+static struct device_attribute comedi_dev_attrs[] = {
> >>+	__ATTR(max_read_buffer_kb, S_IRUGO | S_IWUSR,
> >>+		show_max_read_buffer_kb, store_max_read_buffer_kb),
> >>+	__ATTR(read_buffer_kb, S_IRUGO | S_IWUSR | S_IWGRP,
> >>+		show_read_buffer_kb, store_read_buffer_kb),
> >>+	__ATTR(max_write_buffer_kb, S_IRUGO | S_IWUSR,
> >>+		show_max_write_buffer_kb, store_max_write_buffer_kb),
> >>+	__ATTR(write_buffer_kb, S_IRUGO | S_IWUSR | S_IWGRP,
> >>+		show_write_buffer_kb, store_write_buffer_kb),
> >>+	__ATTR_NULL
> >
> >Some of these are group writable and some are only user writable so
> >it's not consistent.  Probably just make them user writeable.
> >
> >I guess this was in the original code too, but it's just more
> >obvious now that they're grouped together.
> 
> Is it possible to change (group) ownership of these attribute files
> using udev rules?  Ideally, users in the group that has group
> ownership on the /dev/comedi* files should be able to modify the
> read_buffer_kb and write_buffer_kb attribute files as well, but only
> super-users should be able to modify the max_read_buffer_kb and
> max_write_buffer_kb files.
> 

Oh.  Ok that's fine then.  I didn't understand what was going on.

regards,
dan carpenter


  reply	other threads:[~2012-05-11 18:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-11  1:05 [PATCH] staging: comedi: register sysfs device attributes with driver core H Hartley Sweeten
2012-05-11  6:16 ` Dan Carpenter
2012-05-11 13:14   ` Ian Abbott
2012-05-11 18:18     ` Dan Carpenter [this message]
2012-05-14 20:00 ` 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=20120511181848.GA16984@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=abbotti@mev.co.uk \
    --cc=devel@driverdev.osuosl.org \
    --cc=fmhess@users.sourceforge.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=hartleys@visionengravers.com \
    --cc=ian.abbott@mev.co.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox