| .. | .. |
|---|
| 1 | 1 | // SPDX-License-Identifier: GPL-2.0+ |
|---|
| 2 | | -/** |
|---|
| 2 | +/* |
|---|
| 3 | 3 | * Generic USB driver for report based interrupt in/out devices |
|---|
| 4 | 4 | * like LD Didactic's USB devices. LD Didactic's USB devices are |
|---|
| 5 | 5 | * HID devices which do not use HID report definitons (they use |
|---|
| .. | .. |
|---|
| 184 | 184 | |
|---|
| 185 | 185 | static struct usb_driver ld_usb_driver; |
|---|
| 186 | 186 | |
|---|
| 187 | | -/** |
|---|
| 187 | +/* |
|---|
| 188 | 188 | * ld_usb_abort_transfers |
|---|
| 189 | 189 | * aborts transfers and frees associated data structures |
|---|
| 190 | 190 | */ |
|---|
| .. | .. |
|---|
| 199 | 199 | usb_kill_urb(dev->interrupt_out_urb); |
|---|
| 200 | 200 | } |
|---|
| 201 | 201 | |
|---|
| 202 | | -/** |
|---|
| 202 | +/* |
|---|
| 203 | 203 | * ld_usb_delete |
|---|
| 204 | 204 | */ |
|---|
| 205 | 205 | static void ld_usb_delete(struct ld_usb *dev) |
|---|
| .. | .. |
|---|
| 213 | 213 | kfree(dev); |
|---|
| 214 | 214 | } |
|---|
| 215 | 215 | |
|---|
| 216 | | -/** |
|---|
| 216 | +/* |
|---|
| 217 | 217 | * ld_usb_interrupt_in_callback |
|---|
| 218 | 218 | */ |
|---|
| 219 | 219 | static void ld_usb_interrupt_in_callback(struct urb *urb) |
|---|
| .. | .. |
|---|
| 274 | 274 | wake_up_interruptible(&dev->read_wait); |
|---|
| 275 | 275 | } |
|---|
| 276 | 276 | |
|---|
| 277 | | -/** |
|---|
| 277 | +/* |
|---|
| 278 | 278 | * ld_usb_interrupt_out_callback |
|---|
| 279 | 279 | */ |
|---|
| 280 | 280 | static void ld_usb_interrupt_out_callback(struct urb *urb) |
|---|
| .. | .. |
|---|
| 294 | 294 | wake_up_interruptible(&dev->write_wait); |
|---|
| 295 | 295 | } |
|---|
| 296 | 296 | |
|---|
| 297 | | -/** |
|---|
| 297 | +/* |
|---|
| 298 | 298 | * ld_usb_open |
|---|
| 299 | 299 | */ |
|---|
| 300 | 300 | static int ld_usb_open(struct inode *inode, struct file *file) |
|---|
| .. | .. |
|---|
| 304 | 304 | int retval; |
|---|
| 305 | 305 | struct usb_interface *interface; |
|---|
| 306 | 306 | |
|---|
| 307 | | - nonseekable_open(inode, file); |
|---|
| 307 | + stream_open(inode, file); |
|---|
| 308 | 308 | subminor = iminor(inode); |
|---|
| 309 | 309 | |
|---|
| 310 | 310 | interface = usb_find_interface(&ld_usb_driver, subminor); |
|---|
| .. | .. |
|---|
| 365 | 365 | return retval; |
|---|
| 366 | 366 | } |
|---|
| 367 | 367 | |
|---|
| 368 | | -/** |
|---|
| 368 | +/* |
|---|
| 369 | 369 | * ld_usb_release |
|---|
| 370 | 370 | */ |
|---|
| 371 | 371 | static int ld_usb_release(struct inode *inode, struct file *file) |
|---|
| .. | .. |
|---|
| 407 | 407 | return retval; |
|---|
| 408 | 408 | } |
|---|
| 409 | 409 | |
|---|
| 410 | | -/** |
|---|
| 410 | +/* |
|---|
| 411 | 411 | * ld_usb_poll |
|---|
| 412 | 412 | */ |
|---|
| 413 | 413 | static __poll_t ld_usb_poll(struct file *file, poll_table *wait) |
|---|
| .. | .. |
|---|
| 431 | 431 | return mask; |
|---|
| 432 | 432 | } |
|---|
| 433 | 433 | |
|---|
| 434 | | -/** |
|---|
| 434 | +/* |
|---|
| 435 | 435 | * ld_usb_read |
|---|
| 436 | 436 | */ |
|---|
| 437 | 437 | static ssize_t ld_usb_read(struct file *file, char __user *buffer, size_t count, |
|---|
| .. | .. |
|---|
| 518 | 518 | return retval; |
|---|
| 519 | 519 | } |
|---|
| 520 | 520 | |
|---|
| 521 | | -/** |
|---|
| 521 | +/* |
|---|
| 522 | 522 | * ld_usb_write |
|---|
| 523 | 523 | */ |
|---|
| 524 | 524 | static ssize_t ld_usb_write(struct file *file, const char __user *buffer, |
|---|
| .. | .. |
|---|
| 641 | 641 | .minor_base = USB_LD_MINOR_BASE, |
|---|
| 642 | 642 | }; |
|---|
| 643 | 643 | |
|---|
| 644 | | -/** |
|---|
| 644 | +/* |
|---|
| 645 | 645 | * ld_usb_probe |
|---|
| 646 | 646 | * |
|---|
| 647 | 647 | * Called by the usb core when a new device is connected that it thinks |
|---|
| .. | .. |
|---|
| 745 | 745 | return retval; |
|---|
| 746 | 746 | } |
|---|
| 747 | 747 | |
|---|
| 748 | | -/** |
|---|
| 748 | +/* |
|---|
| 749 | 749 | * ld_usb_disconnect |
|---|
| 750 | 750 | * |
|---|
| 751 | 751 | * Called by the usb core when the device is removed from the system. |
|---|