summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-04-09 18:59:13 -0700
committerJakub Kicinski <kuba@kernel.org>2023-04-09 18:59:13 -0700
commitc9f28c570068f7d4cd0b32cec55566954d3e32bb (patch)
tree197a20ec4b82067237b95c33ce52e05eae041442 /Documentation
parent5a17818682cf43ad0fdd6035945f3b7a8c9dc5e9 (diff)
parentd8cc9415a40f479b666fc03e7b1f4601868e6dc8 (diff)
downloadlwn-c9f28c570068f7d4cd0b32cec55566954d3e32bb.tar.gz
lwn-c9f28c570068f7d4cd0b32cec55566954d3e32bb.zip
Merge branch 'hwmon-const' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull in pre-requisite patches from Guenter Roeck to constify pointers to hwmon_channel_info. * 'hwmon-const' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: constify pointers to hwmon_channel_info Link: https://lore.kernel.org/all/3a0391e7-21f6-432a-9872-329e298e1582@roeck-us.net/ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/hwmon/hwmon-kernel-api.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Documentation/hwmon/hwmon-kernel-api.rst b/Documentation/hwmon/hwmon-kernel-api.rst
index 5451a6d4c874..f00e4a01c240 100644
--- a/Documentation/hwmon/hwmon-kernel-api.rst
+++ b/Documentation/hwmon/hwmon-kernel-api.rst
@@ -133,7 +133,7 @@ The hwmon_chip_info structure looks as follows::
struct hwmon_chip_info {
const struct hwmon_ops *ops;
- const struct hwmon_channel_info **info;
+ const struct hwmon_channel_info * const *info;
};
It contains the following fields:
@@ -229,7 +229,7 @@ register (HWMON_T_MAX) as well as a maximum temperature hysteresis register
.config = lm75_temp_config,
};
- static const struct hwmon_channel_info *lm75_info[] = {
+ static const struct hwmon_channel_info * const lm75_info[] = {
&lm75_chip,
&lm75_temp,
NULL
@@ -238,7 +238,7 @@ register (HWMON_T_MAX) as well as a maximum temperature hysteresis register
The HWMON_CHANNEL_INFO() macro can and should be used when possible.
With this macro, the above example can be simplified to
- static const struct hwmon_channel_info *lm75_info[] = {
+ static const struct hwmon_channel_info * const lm75_info[] = {
HWMON_CHANNEL_INFO(chip,
HWMON_C_REGISTER_TZ | HWMON_C_UPDATE_INTERVAL),
HWMON_CHANNEL_INFO(temp,