lkml.org 
[lkml]   [2009]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 5/7] um: Convert hostaudio to unlocked ioctl
    The hostaudio ioctls can be converted to unlocked ioctls for the
    following reasons:

    - get/put_user do not require the BKL
    - os_ioctl_generic() passes the ioctl to the host and does not
    need serialization.

    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: Jeff Dike <jdike@addtoit.com>
    ---
    arch/um/drivers/hostaudio_kern.c | 12 ++++++------
    1 file changed, 6 insertions(+), 6 deletions(-)

    Index: linux-2.6-tip/arch/um/drivers/hostaudio_kern.c
    ===================================================================
    --- linux-2.6-tip.orig/arch/um/drivers/hostaudio_kern.c
    +++ linux-2.6-tip/arch/um/drivers/hostaudio_kern.c
    @@ -136,8 +136,8 @@ static unsigned int hostaudio_poll(struc
    return mask;
    }

    -static int hostaudio_ioctl(struct inode *inode, struct file *file,
    - unsigned int cmd, unsigned long arg)
    +static long hostaudio_ioctl(struct file *file, unsigned int cmd,
    + unsigned long arg)
    {
    struct hostaudio_state *state = file->private_data;
    unsigned long data = 0;
    @@ -223,8 +223,8 @@ static int hostaudio_release(struct inod

    /* /dev/mixer file operations */

    -static int hostmixer_ioctl_mixdev(struct inode *inode, struct file *file,
    - unsigned int cmd, unsigned long arg)
    +static long hostmixer_ioctl_mixdev(struct file *file, unsigned int cmd,
    + unsigned long arg)
    {
    struct hostmixer_state *state = file->private_data;

    @@ -289,7 +289,7 @@ static const struct file_operations host
    .read = hostaudio_read,
    .write = hostaudio_write,
    .poll = hostaudio_poll,
    - .ioctl = hostaudio_ioctl,
    + .unlocked_ioctl = hostaudio_ioctl,
    .mmap = NULL,
    .open = hostaudio_open,
    .release = hostaudio_release,
    @@ -298,7 +298,7 @@ static const struct file_operations host
    static const struct file_operations hostmixer_fops = {
    .owner = THIS_MODULE,
    .llseek = no_llseek,
    - .ioctl = hostmixer_ioctl_mixdev,
    + .unlocked_ioctl = hostmixer_ioctl_mixdev,
    .open = hostmixer_open_mixdev,
    .release = hostmixer_release,
    };



    \
     
     \ /
      Last update: 2009-10-15 10:51    [W:0.035 / U:36.008 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site