[PATCH] USB: ioctl compat for usblp.c

From: David Woodhouse <dwmw2>

David has a G5 with a printer. I am quite surprised that nobody else noticed
this before. Linus has a G5. Hackers hate printing in general, maybe.

We do not use BKL anymore, because one of code paths had a sleeping call,
so we had to use a semaphore. I am sure it's safe to use unlocked_ioctl.

The new ioctls return long and retval is int. It looks completely fine to me.
We never want these extra bits, and the sign extension ought to work right.

Signed-off-by: Pete Zaitcev <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>

--

---
commit 318e479eb7ad9a948c6da381976d258464413816
tree d73ef1b9d684ec47d9d963190b85e62df26c2fcc
parent a083dec0ed537a75fbe8f2f83d198e9e672240d8
author Pete Zaitcev <[EMAIL PROTECTED]> Wed, 21 Dec 2005 17:03:24 -0800
committer Greg Kroah-Hartman <[EMAIL PROTECTED]> Wed, 04 Jan 2006 13:51:44 -0800

 drivers/usb/class/usblp.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
index 6918037..708a292 100644
--- a/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -438,7 +438,7 @@ static unsigned int usblp_poll(struct fi
                               | (!usblp->wcomplete ? 0 : POLLOUT | POLLWRNORM);
 }
 
-static int usblp_ioctl(struct inode *inode, struct file *file, unsigned int 
cmd, unsigned long arg)
+static long usblp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
        struct usblp *usblp = file->private_data;
        int length, err, i;
@@ -838,7 +838,8 @@ static struct file_operations usblp_fops
        .read =         usblp_read,
        .write =        usblp_write,
        .poll =         usblp_poll,
-       .ioctl =        usblp_ioctl,
+       .unlocked_ioctl =       usblp_ioctl,
+       .compat_ioctl =         usblp_ioctl,
        .open =         usblp_open,
        .release =      usblp_release,
 };



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to