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 ec8f2eb041ca..49cd9e145a9b 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) | |||
828 | return status; | 828 | return status; |
829 | } | 829 | } |
830 | 830 | ||
831 | static int | 831 | static long |
832 | printer_ioctl(struct inode *inode, struct file *fd, unsigned int code, | 832 | printer_ioctl(struct file *fd, unsigned int code, unsigned long arg) |
833 | unsigned long arg) | ||
834 | { | 833 | { |
835 | struct printer_dev *dev = fd->private_data; | 834 | struct printer_dev *dev = fd->private_data; |
836 | unsigned long flags; | 835 | unsigned long flags; |
@@ -869,7 +868,7 @@ static struct file_operations printer_io_operations = { | |||
869 | .write = printer_write, | 868 | .write = printer_write, |
870 | .fsync = printer_fsync, | 869 | .fsync = printer_fsync, |
871 | .poll = printer_poll, | 870 | .poll = printer_poll, |
872 | .ioctl = printer_ioctl, | 871 | .unlocked_ioctl = printer_ioctl, |
873 | .release = printer_close | 872 | .release = printer_close |
874 | }; | 873 | }; |
875 | 874 | ||
@@ -1361,8 +1360,8 @@ printer_bind(struct usb_gadget *gadget) | |||
1361 | 1360 | ||
1362 | 1361 | ||
1363 | /* Setup the sysfs files for the printer gadget. */ | 1362 | /* Setup the sysfs files for the printer gadget. */ |
1364 | dev->pdev = device_create(usb_gadget_class, NULL, g_printer_devno, | 1363 | dev->pdev = device_create_drvdata(usb_gadget_class, NULL, |
1365 | "g_printer"); | 1364 | g_printer_devno, NULL, "g_printer"); |
1366 | if (IS_ERR(dev->pdev)) { | 1365 | if (IS_ERR(dev->pdev)) { |
1367 | ERROR(dev, "Failed to create device: g_printer\n"); | 1366 | ERROR(dev, "Failed to create device: g_printer\n"); |
1368 | goto fail; | 1367 | goto fail; |