]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
hwmon: (core) Clarify when read and write callbacks are mandatory
authorGuenter Roeck <linux@roeck-us.net>
Sun, 20 Nov 2016 10:55:45 +0000 (02:55 -0800)
committerGuenter Roeck <linux@roeck-us.net>
Sat, 10 Dec 2016 05:54:15 +0000 (21:54 -0800)
The callback descrption in hwmon.h was misleading and stated that read and
write callbacks would be optional. More accurate is is that the callbacks
are mandatory if readable / writeable attributes are present.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
include/linux/hwmon.h

index 9d2f8bde7d124d9ecc87a94102abd8a463bc8819..b6a86aa4a9e2881db80adfb2a26cc3a11a26d624 100644 (file)
@@ -298,8 +298,7 @@ enum hwmon_pwm_attributes {
  *                     Channel number
  *             The function returns the file permissions.
  *             If the return value is 0, no attribute will be created.
- * @read:       Read callback. Optional. If not provided, attributes
- *             will not be readable.
+ * @read:      Read callback. Mandatory if readable attributes are present.
  *             Parameters are:
  *             @dev:   Pointer to hardware monitoring device
  *             @type:  Sensor type
@@ -308,8 +307,7 @@ enum hwmon_pwm_attributes {
  *                     Channel number
  *             @val:   Pointer to returned value
  *             The function returns 0 on success or a negative error number.
- * @write:     Write callback. Optional. If not provided, attributes
- *             will not be writable.
+ * @write:     Write callback. Mandatory if writeable attributes are present.
  *             Parameters are:
  *             @dev:   Pointer to hardware monitoring device
  *             @type:  Sensor type