diff mbox series

[2/4] Docs: usb: update comment and code near decrement our usage count for the device

Message ID 75317b591c0da0d32be77b819680733a44f6f70b.1638152984.git.philipp.g.hortmann@gmail.com (mailing list archive)
State Superseded
Headers show
Series Docs: usb: Code and text updates from usb-skeleton | expand

Commit Message

Philipp Hortmann Nov. 29, 2021, 8:21 p.m. UTC
Put release function in the document typical form
Update comment: decrement our usage count ..
and code according to usb-skeleton.c

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
 Documentation/driver-api/usb/writing_usb_driver.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/Documentation/driver-api/usb/writing_usb_driver.rst b/Documentation/driver-api/usb/writing_usb_driver.rst
index a9608ad18d77..b16e4e76d472 100644
--- a/Documentation/driver-api/usb/writing_usb_driver.rst
+++ b/Documentation/driver-api/usb/writing_usb_driver.rst
@@ -250,12 +250,12 @@  a device, it is recommended to set up your own urbs and submit them to
 the USB subsystem. The template uses urbs for read and write.
 
 When the user program releases the file handle that it has been using to
-talk to the device, the release function in the driver is called. In
+talk to the device, the `skel_release` function in the driver is called. In
 this function we decrement our private usage count and wait for possible
 pending writes::
 
-    /* decrement our usage count for the device */
-    --skel->open_count;
+    /* decrement the count on our device */
+    kref_put(&dev->kref, skel_delete);
 
 
 One of the more difficult problems that USB drivers must be able to