Commit 2740c60c authored by Jean Delvare's avatar Jean Delvare Committed by Jean Delvare

hwmon: (f71882fg) Secure chip property definition arrays

Using C99-style array initialization will ensure definitions won't
drift if the chips enum gets new values added.
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
Acked-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
parent 16c29daf
...@@ -119,37 +119,37 @@ static const char *f71882fg_names[] = { ...@@ -119,37 +119,37 @@ static const char *f71882fg_names[] = {
"f8000", "f8000",
}; };
static const char f71882fg_has_in[8][F71882FG_MAX_INS] = { static const char f71882fg_has_in[][F71882FG_MAX_INS] = {
{ 1, 1, 1, 1, 1, 1, 0, 1, 1 }, /* f71808e */ [f71808e] = { 1, 1, 1, 1, 1, 1, 0, 1, 1 },
{ 1, 1, 1, 0, 0, 0, 0, 0, 0 }, /* f71858fg */ [f71858fg] = { 1, 1, 1, 0, 0, 0, 0, 0, 0 },
{ 1, 1, 1, 1, 1, 1, 1, 1, 1 }, /* f71862fg */ [f71862fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 },
{ 1, 1, 1, 1, 1, 1, 1, 1, 1 }, /* f71869 */ [f71869] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 },
{ 1, 1, 1, 1, 1, 1, 1, 1, 1 }, /* f71882fg */ [f71882fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 },
{ 1, 1, 1, 1, 1, 1, 1, 1, 1 }, /* f71889fg */ [f71889fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 },
{ 1, 1, 1, 1, 1, 1, 1, 1, 1 }, /* f71889ed */ [f71889ed] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 },
{ 1, 1, 1, 0, 0, 0, 0, 0, 0 }, /* f8000 */ [f8000] = { 1, 1, 1, 0, 0, 0, 0, 0, 0 },
}; };
static const char f71882fg_has_in1_alarm[8] = { static const char f71882fg_has_in1_alarm[] = {
0, /* f71808e */ [f71808e] = 0,
0, /* f71858fg */ [f71858fg] = 0,
0, /* f71862fg */ [f71862fg] = 0,
0, /* f71869 */ [f71869] = 0,
1, /* f71882fg */ [f71882fg] = 1,
1, /* f71889fg */ [f71889fg] = 1,
1, /* f71889ed */ [f71889ed] = 1,
0, /* f8000 */ [f8000] = 0,
}; };
static const char f71882fg_has_beep[8] = { static const char f71882fg_has_beep[] = {
0, /* f71808e */ [f71808e] = 0,
0, /* f71858fg */ [f71858fg] = 0,
1, /* f71862fg */ [f71862fg] = 1,
1, /* f71869 */ [f71869] = 1,
1, /* f71882fg */ [f71882fg] = 1,
1, /* f71889fg */ [f71889fg] = 1,
1, /* f71889ed */ [f71889ed] = 1,
0, /* f8000 */ [f8000] = 0,
}; };
static struct platform_device *f71882fg_pdev; static struct platform_device *f71882fg_pdev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment