diff mbox series

[v2,2/3] Docs: usb: update comment and code near increment usage count

Message ID 38c6205d6b5c612902f9c187154c05e9cca51107.1635591623.git.philipp.g.hortmann@gmail.com (mailing list archive)
State Accepted
Commit 925ed163abcfa0e27787a9989c12a5e98b7a12fd
Headers show
Series Docs: usb: Example code updates from usb-skeleton | expand

Commit Message

Philipp Hortmann Oct. 30, 2021, 11:25 a.m. UTC
update comment: increment 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 | 4 ++--
 1 file changed, 2 insertions(+), 2 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 85e106f443e5..24374cdb677b 100644
--- a/Documentation/driver-api/usb/writing_usb_driver.rst
+++ b/Documentation/driver-api/usb/writing_usb_driver.rst
@@ -167,8 +167,8 @@  structure. This is done so that future calls to file operations will
 enable the driver to determine which device the user is addressing. All
 of this is done with the following code::
 
-    /* increment our usage count for the module */
-    ++skel->open_count;
+    /* increment our usage count for the device */
+    kref_get(&dev->kref);
 
     /* save our object in the file's private structure */
     file->private_data = dev;