diff options
Diffstat (limited to 'drivers/usb/gadget/printer.c')
-rw-r--r-- | drivers/usb/gadget/printer.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c index ec8f2eb041c..49cd9e145a9 100644 --- a/drivers/usb/gadget/printer.c +++ b/drivers/usb/gadget/printer.c @@ -828,9 +828,8 @@ printer_poll(struct file *fd, poll_table *wait) return status; } -static int -printer_ioctl(struct inode *inode, struct file *fd, unsigned int code, - unsigned long arg) +static long +printer_ioctl(struct file *fd, unsigned int code, unsigned long arg) { struct printer_dev *dev = fd->private_data; unsigned long flags; @@ -869,7 +868,7 @@ static struct file_operations printer_io_operations = { .write = printer_write, .fsync = printer_fsync, .poll = printer_poll, - .ioctl = printer_ioctl, + .unlocked_ioctl = printer_ioctl, .release = printer_close }; @@ -1361,8 +1360,8 @@ printer_bind(struct usb_gadget *gadget) /* Setup the sysfs files for the printer gadget. */ - dev->pdev = device_create(usb_gadget_class, NULL, g_printer_devno, - "g_printer"); + dev->pdev = device_create_drvdata(usb_gadget_class, NULL, + g_printer_devno, NULL, "g_printer"); if (IS_ERR(dev->pdev)) { ERROR(dev, "Failed to create device: g_printer\n"); goto fail; |