提交 318e479e 编写于 作者: P Pete Zaitcev 提交者: Greg Kroah-Hartman

[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: NPete Zaitcev <zaitcev@redhat.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>

--
上级 a083dec0
......@@ -438,7 +438,7 @@ static unsigned int usblp_poll(struct file *file, struct poll_table_struct *wait
| (!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,
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册