summaryrefslogtreecommitdiff
path: root/Documentation/driver-api
diff options
context:
space:
mode:
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>2021-10-30 13:25:04 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-17 14:54:58 +0100
commit925ed163abcfa0e27787a9989c12a5e98b7a12fd (patch)
treefd42810e6a68c56d2e9c74fd07aa013b1c7de834 /Documentation/driver-api
parent7ef0d85c87d15f62e0e8ae675ac3c027221bb72e (diff)
Docs: usb: update comment and code near increment usage count
update comment: increment our usage count .. and code according to usb-skeleton.c Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/38c6205d6b5c612902f9c187154c05e9cca51107.1635591623.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/driver-api')
-rw-r--r--Documentation/driver-api/usb/writing_usb_driver.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/driver-api/usb/writing_usb_driver.rst b/Documentation/driver-api/usb/writing_usb_driver.rst
index 0093dea4e55a..a6b11bf107c6 100644
--- a/Documentation/driver-api/usb/writing_usb_driver.rst
+++ b/Documentation/driver-api/usb/writing_usb_driver.rst
@@ -170,8 +170,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;