[PATCH v2] HID: sensor-hub: Fix typo and improve documentation for sensor_hub_remove_callback()

Chelsy Ratnawat posted 1 patch 9 months, 1 week ago
There is a newer version of this series
include/linux/hid-sensor-hub.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
[PATCH v2] HID: sensor-hub: Fix typo and improve documentation for sensor_hub_remove_callback()
Posted by Chelsy Ratnawat 9 months, 1 week ago
Changes in v2:
 - Improved the kernel-doc comment for sensor_hub_remove_callback().
 - Changed "Gyro" to "gyro".
 - Changed "usage ID" to "usage_id" for consistency with kernel-doc
   style.
 - Updated the comment to state that only one callback can be removed
   per (usage_id, hsdev) pair.

Signed-off-by: Chelsy Ratnawat <chelsyratnawat2001@gmail.com>
---
 include/linux/hid-sensor-hub.h | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/include/linux/hid-sensor-hub.h b/include/linux/hid-sensor-hub.h
index c27329e2a5ad..0f9f7df865db 100644
--- a/include/linux/hid-sensor-hub.h
+++ b/include/linux/hid-sensor-hub.h
@@ -128,12 +128,13 @@ int sensor_hub_register_callback(struct hid_sensor_hub_device *hsdev,
 			struct hid_sensor_hub_callbacks *usage_callback);
 
 /**
-* sensor_hub_remove_callback() - Remove client callbacks
+* sensor_hub_remove_callback() - Remove client callback
 * @hsdev:	Hub device instance.
-* @usage_id:	Usage id of the client (E.g. 0x200076 for Gyro).
+* @usage_id:	Usage id of the client (e.g. 0x200076 for gyro).
 *
-* If there is a callback registred, this call will remove that
-* callbacks, so that it will stop data and event notifications.
+* Removes a previously registered callback for the given usage_id
+* and hsdev. Once removed, the client will no longer receive data or
+* event notifications.
 */
 int sensor_hub_remove_callback(struct hid_sensor_hub_device *hsdev,
 			u32 usage_id);
-- 
2.43.5
Re: [PATCH v2] HID: sensor-hub: Fix typo and improve documentation for sensor_hub_remove_callback()
Posted by David Lechner 9 months, 1 week ago
On 5/1/25 6:19 PM, Chelsy Ratnawat wrote:
> Changes in v2:
>  - Improved the kernel-doc comment for sensor_hub_remove_callback().
>  - Changed "Gyro" to "gyro".
>  - Changed "usage ID" to "usage_id" for consistency with kernel-doc
>    style.
>  - Updated the comment to state that only one callback can be removed
>    per (usage_id, hsdev) pair.
> 
> Signed-off-by: Chelsy Ratnawat <chelsyratnawat2001@gmail.com>
> ---

Normally people put the changes here below the --- rather than putting it in
the commit message.

Patch part looks good though.

Reviewed-by: David Lechner <dlechner@baylibre.com>