diff options
author | Frank Praznik <frank.praznik@oh.rr.com> | 2014-07-29 22:55:48 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2014-07-30 05:25:22 -0400 |
commit | 5607c89a115563104e1eea8d597282c799e75c99 (patch) | |
tree | d0462485531556084b73c2f976a5d2a061efaff0 /drivers | |
parent | ab030726b64382d3548fd157db0a1c678c792122 (diff) |
HID: sony: Default initialize all elements of the LED max_brightness array to 1
Previously only the first element of the array was initialized to 1
leading to potential incorrect max brightness values for the LEDs
on the Dualshock 3 and buzzer controllers.
Use a designated initializer to initialize the whole array to the
correct value.
Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hid/hid-sony.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index bb1e969527e7..c372368e438c 100644 --- a/drivers/hid/hid-sony.c +++ b/drivers/hid/hid-sony.c | |||
@@ -1349,7 +1349,7 @@ static int sony_leds_init(struct sony_sc *sc) | |||
1349 | static const char * const ds4_name_str[] = { "red", "green", "blue", | 1349 | static const char * const ds4_name_str[] = { "red", "green", "blue", |
1350 | "global" }; | 1350 | "global" }; |
1351 | __u8 initial_values[MAX_LEDS] = { 0 }; | 1351 | __u8 initial_values[MAX_LEDS] = { 0 }; |
1352 | __u8 max_brightness[MAX_LEDS] = { 1 }; | 1352 | __u8 max_brightness[MAX_LEDS] = { [0 ... (MAX_LEDS - 1)] = 1 }; |
1353 | __u8 use_hw_blink[MAX_LEDS] = { 0 }; | 1353 | __u8 use_hw_blink[MAX_LEDS] = { 0 }; |
1354 | 1354 | ||
1355 | BUG_ON(!(sc->quirks & SONY_LED_SUPPORT)); | 1355 | BUG_ON(!(sc->quirks & SONY_LED_SUPPORT)); |