[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <40aa115e18d1139a7642bf4034835cdfb9f5b066.1638630342.git.philipp.g.hortmann@gmail.com>
Date: Sat, 4 Dec 2021 17:35:18 +0100
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 v2 2/4] Docs: usb: update comment and code near decrement our
usage count for the device
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@...il.com>
---
V1 -> V2: Corrected format of function name to skel_release()
---
Documentation/driver-api/usb/writing_usb_driver.rst | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/driver-api/usb/writing_usb_driver.rst b/Documentation/driver-api/usb/writing_usb_driver.rst
index ed11398837e5..297b622f5438 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, skel_release() 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
--
2.25.1
Powered by blists - more mailing lists