lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d81cd79c560877e1d2dbf3267f23a8f436b04417.1638771720.git.philipp.g.hortmann@gmail.com>
Date:   Mon, 6 Dec 2021 21:58:08 +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, gregkh@...uxfoundation.org
Subject: [PATCH v3 4/5] Docs: usb: update explanation for device_present to
 disconnected

Update text for `device_present` flag to `disconnected` flag

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@...il.com>
---
V1 -> V2: Corrected format of function name to skel_disconnect()
V2 -> V3: Moved correction of the function name to an own patch in this
          patch series
---
 .../driver-api/usb/writing_usb_driver.rst          | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/Documentation/driver-api/usb/writing_usb_driver.rst b/Documentation/driver-api/usb/writing_usb_driver.rst
index 6c487ac5eab2..1968cf5c55f6 100644
--- a/Documentation/driver-api/usb/writing_usb_driver.rst
+++ b/Documentation/driver-api/usb/writing_usb_driver.rst
@@ -278,15 +278,13 @@ this::
     }
 
 
-If a program currently has an open handle to the device, we reset the
-flag ``device_present``. For every read, write, release and other
+If the driver probed the device successfully, the flag ``disconnected``
+is initialized and set to false. For every read, write and other
 functions that expect a device to be present, the driver first checks
-this flag to see if the device is still present. If not, it releases
-that the device has disappeared, and a ``-ENODEV`` error is returned to the
-user-space program. When the release function is eventually called, it
-determines if there is no device and if not, it does the cleanup that
-the ``skel_disconnect`` function normally does if there are no open files
-on the device (see Listing 5).
+this flag to see if the device is still present. If not, a ``-ENODEV``
+error is returned to the user-space program. When the device is
+disconnected, the ``skel_disconnect`` function is called. It sets
+``disconnected`` to true and cleans up.
 
 Isochronous Data
 ================
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ