All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Krasnyanskiy <maxk@qualcomm.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org, Marcel Holtmann <marcel@holtmann.org>
Subject: Re: [PATCH] hci_vhci: Elimiate BKL from ioctl handling
Date: Thu, 22 May 2008 13:52:45 -0700	[thread overview]
Message-ID: <4835DD1D.1040102@qualcomm.com> (raw)
In-Reply-To: <20080522213020.498327ed@core>

Alan Cox wrote:
> Switch to unlocked_ioctl and fix the return value to be -ENOTTY as it
> should be.
> 
> Signed-off-by: Alan Cox <alan@redhat.com>
> 
> diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c
> index 0638730..41002ef 100644
> --- a/drivers/bluetooth/hci_vhci.c
> +++ b/drivers/bluetooth/hci_vhci.c
> @@ -245,10 +245,9 @@ static unsigned int vhci_poll(struct file *file, poll_table *wait)
>  	return POLLOUT | POLLWRNORM;
>  }
>  
> -static int vhci_ioctl(struct inode *inode, struct file *file,
> -					unsigned int cmd, unsigned long arg)
> +static long vhci_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
>  {
> -	return -EINVAL;
> +	return -ENOTTY;
>  }
>  
>  static int vhci_open(struct inode *inode, struct file *file)
> @@ -332,7 +331,7 @@ static const struct file_operations vhci_fops = {
>  	.read		= vhci_read,
>  	.write		= vhci_write,
>  	.poll		= vhci_poll,
> -	.ioctl		= vhci_ioctl,
> +	.unlocked_ioctl	= vhci_ioctl,
>  	.open		= vhci_open,
>  	.release	= vhci_release,
>  	.fasync		= vhci_fasync,
> 

Ack.

CC'ing Marcel.

Max

  reply	other threads:[~2008-05-22 20:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-22 20:30 [PATCH] hci_vhci: Elimiate BKL from ioctl handling Alan Cox
2008-05-22 20:52 ` Max Krasnyanskiy [this message]
2008-05-22 23:57 ` Marcel Holtmann

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=4835DD1D.1040102@qualcomm.com \
    --to=maxk@qualcomm.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.