Skip to content

Commit

Permalink
hwmon: (nzxt-smart2) make array detect_fans_report static const
Browse files Browse the repository at this point in the history
Don't populate the read-only array detect_fans_report on the stack but
instead it static const. Also makes the object code a little smaller.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20220109194558.45811-1-colin.i.king@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Colin Ian King authored and Guenter Roeck committed Jan 10, 2022
1 parent 660d187 commit 00f5117
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hwmon/nzxt-smart2.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ static int set_update_interval(struct drvdata *drvdata, long val)
static int init_device(struct drvdata *drvdata, long update_interval)
{
int ret;
u8 detect_fans_report[] = {
static const u8 detect_fans_report[] = {
OUTPUT_REPORT_ID_INIT_COMMAND,
INIT_COMMAND_DETECT_FANS,
};
Expand Down

0 comments on commit 00f5117

Please sign in to comment.