aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/f71882fg.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2011-03-26 05:45:01 -0400
committerJean Delvare <khali@endymion.delvare>2011-03-26 05:45:01 -0400
commit2740c60c4ab9a8c6169d7925014f57440361f698 (patch)
treefc89a1db0abc6c4be21c876c761d3fa51aff624a /drivers/hwmon/f71882fg.c
parent16c29dafcc86024048f1dbb8349d31cb22c7c55a (diff)
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: Jean Delvare <khali@linux-fr.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'drivers/hwmon/f71882fg.c')
-rw-r--r--drivers/hwmon/f71882fg.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c
index a4d430ee7e20..0f60b058ff9d 100644
--- a/drivers/hwmon/f71882fg.c
+++ b/drivers/hwmon/f71882fg.c
@@ -119,37 +119,37 @@ static const char *f71882fg_names[] = {
119 "f8000", 119 "f8000",
120}; 120};
121 121
122static const char f71882fg_has_in[8][F71882FG_MAX_INS] = { 122static const char f71882fg_has_in[][F71882FG_MAX_INS] = {
123 { 1, 1, 1, 1, 1, 1, 0, 1, 1 }, /* f71808e */ 123 [f71808e] = { 1, 1, 1, 1, 1, 1, 0, 1, 1 },
124 { 1, 1, 1, 0, 0, 0, 0, 0, 0 }, /* f71858fg */ 124 [f71858fg] = { 1, 1, 1, 0, 0, 0, 0, 0, 0 },
125 { 1, 1, 1, 1, 1, 1, 1, 1, 1 }, /* f71862fg */ 125 [f71862fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 },
126 { 1, 1, 1, 1, 1, 1, 1, 1, 1 }, /* f71869 */ 126 [f71869] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 },
127 { 1, 1, 1, 1, 1, 1, 1, 1, 1 }, /* f71882fg */ 127 [f71882fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 },
128 { 1, 1, 1, 1, 1, 1, 1, 1, 1 }, /* f71889fg */ 128 [f71889fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 },
129 { 1, 1, 1, 1, 1, 1, 1, 1, 1 }, /* f71889ed */ 129 [f71889ed] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 },
130 { 1, 1, 1, 0, 0, 0, 0, 0, 0 }, /* f8000 */ 130 [f8000] = { 1, 1, 1, 0, 0, 0, 0, 0, 0 },
131}; 131};
132 132
133static const char f71882fg_has_in1_alarm[8] = { 133static const char f71882fg_has_in1_alarm[] = {
134 0, /* f71808e */ 134 [f71808e] = 0,
135 0, /* f71858fg */ 135 [f71858fg] = 0,
136 0, /* f71862fg */ 136 [f71862fg] = 0,
137 0, /* f71869 */ 137 [f71869] = 0,
138 1, /* f71882fg */ 138 [f71882fg] = 1,
139 1, /* f71889fg */ 139 [f71889fg] = 1,
140 1, /* f71889ed */ 140 [f71889ed] = 1,
141 0, /* f8000 */ 141 [f8000] = 0,
142}; 142};
143 143
144static const char f71882fg_has_beep[8] = { 144static const char f71882fg_has_beep[] = {
145 0, /* f71808e */ 145 [f71808e] = 0,
146 0, /* f71858fg */ 146 [f71858fg] = 0,
147 1, /* f71862fg */ 147 [f71862fg] = 1,
148 1, /* f71869 */ 148 [f71869] = 1,
149 1, /* f71882fg */ 149 [f71882fg] = 1,
150 1, /* f71889fg */ 150 [f71889fg] = 1,
151 1, /* f71889ed */ 151 [f71889ed] = 1,
152 0, /* f8000 */ 152 [f8000] = 0,
153}; 153};
154 154
155static struct platform_device *f71882fg_pdev; 155static struct platform_device *f71882fg_pdev;