Skip to content

Commit

Permalink
nvme: host: hwmon: constify pointers to hwmon_channel_info
Browse files Browse the repository at this point in the history
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Christoph Hellwig <hch@lst.de>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Keith Busch <kbusch@kernel.org>
  • Loading branch information
Krzysztof Kozlowski authored and Keith Busch committed Aug 21, 2023
1 parent 1f0bbf2 commit 71be868
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nvme/host/hwmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ static umode_t nvme_hwmon_is_visible(const void *_data,
return 0;
}

static const struct hwmon_channel_info *nvme_hwmon_info[] = {
static const struct hwmon_channel_info *const nvme_hwmon_info[] = {
HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ),
HWMON_CHANNEL_INFO(temp,
HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_MIN |
Expand Down

0 comments on commit 71be868

Please sign in to comment.