Linux IIO development
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Jonathan Cameron <jic23@cam.ac.uk>
Cc: linux-iio@vger.kernel.org, manuel.stahl@iis.fraunhofer.de,
	device-drivers-devel@blackfin.uclinux.org
Subject: Re: [RFC PATCH 0/7] IIO: Reduce to 1 the number of chrdevs per device
Date: Tue, 19 Jul 2011 16:27:19 +0200	[thread overview]
Message-ID: <201107191627.20087.arnd@arndb.de> (raw)
In-Reply-To: <1310997004-22728-1-git-send-email-jic23@cam.ac.uk>

On Monday 18 July 2011, Jonathan Cameron wrote:
> 4 uses Arnd's suggestion of an annon_fd obtained via ioctl on the buffer
> chrdev to get a file for easy use for reading events.  This is a very neat
> solution that lets us keep the actual event system separate from the data
> stream without two chrdevs.

IMHO, the series looks good overall, but you need to fix the iio_ioctl
function to take a proper ioctl command: you check for 'cmd == 0', which is
not allowed by convention.
Please use the _IOR() macro to define a number and document the command
range in Documentation/ioctl/ioctl-number.txt.

Also, you should have a .compat_ioctl file operation that points to
the same function, to make sure that the interface works in 32 bit
processes running on a 64 bit kernel.

	Arnd

  parent reply	other threads:[~2011-07-19 14:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-18 13:49 [RFC PATCH 0/7] IIO: Reduce to 1 the number of chrdevs per device Jonathan Cameron
2011-07-18 13:49 ` [PATCH 1/7] staging:iio:trigger push functions that don't need to be generaly available down into the core Jonathan Cameron
2011-07-18 13:49 ` [PATCH 2/7] staging:iio:kfifo buffer - push structure definition down into implementation Jonathan Cameron
2011-07-18 13:50 ` [PATCH 3/7] staging:iio:chrdev.h rationalization Jonathan Cameron
2011-07-18 13:50 ` [PATCH 4/7] staging:iio: remove specific chrdev for event reading. Get fd from ioctl on buffer Jonathan Cameron
2011-07-21  8:57   ` Jonathan Cameron
2011-07-18 13:50 ` [PATCH 5/7] staging:iio: squash chrdev handler remains into users Jonathan Cameron
2011-07-18 13:50 ` [PATCH 6/7] staging:iio: push the main buffer chrdev down to the top level Jonathan Cameron
2011-07-18 13:50 ` [PATCH 7/7] staging:iio: remove now defunct header definitions and add some statics Jonathan Cameron
2011-07-19  8:53 ` [RFC PATCH 0/7] IIO: Reduce to 1 the number of chrdevs per device Jonathan Cameron
2011-07-19 14:27 ` Arnd Bergmann [this message]
2011-07-19 14:30   ` 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=201107191627.20087.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=device-drivers-devel@blackfin.uclinux.org \
    --cc=jic23@cam.ac.uk \
    --cc=linux-iio@vger.kernel.org \
    --cc=manuel.stahl@iis.fraunhofer.de \
    /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