[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53328d28190d987dc0ac5b455014bfe32cf39a64.1635533924.git.philipp.g.hortmann@gmail.com>
Date: Fri, 29 Oct 2021 21:39:58 +0200
From: Philipp Hortmann <philipp.g.hortmann@...il.com>
To: corbet@....net, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: linux-usb@...r.kernel.org
Subject: [PATCH 2/3] 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@...il.com>
---
Documentation/driver-api/usb/writing_usb_driver.rst | 4 ++--
1 file 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 5c29e5bdbe88..14eda0342649 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;
--
2.25.1
Powered by blists - more mailing lists