lkml.org 
[lkml]   [2014]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH]: UIO read(2)/write(2) overrides
On Fri, Mar 21, 2014 at 02:20:11PM +0000, Matt Sickler wrote:
> Tiny patch to let uio-based drivers override the read(2), write(2), and poll(2) syscalls.
> The rationale is that some uio-based drivers might want the mmap(2) functionality
> of UIO, but have no need for the IRQ semantics of read(2) and write(2).

Can you submit a driver that uses these new interfaces as well? I don't
want to add something that isn't used in the kernel.

>
> Signed-Off-by: Matt Sickler <Matt.Sickler@daktronics.com>
> ---
> diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
> index a673e5b..da1bfc8 100644
> --- a/drivers/uio/uio.c
> +++ b/drivers/uio/uio.c
> @@ -505,6 +505,9 @@ static unsigned int uio_poll(struct file *filep, poll_table *wait)
> struct uio_listener *listener = filep->private_data;
> struct uio_device *idev = listener->dev;
>
> + if (idev->info->poll)
> + return idev->info->poll(filep, wait);
> +

Your email client ate all the tabs and created a patch that can't be
applied :(



\
 
 \ /
  Last update: 2014-03-21 16:01    [W:0.033 / U:1.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site