Input: elo: fix coding style issues in elo_setup_10()
Subsystems (2)
PATCH 1/1 Input: elo: fix coding style issues in elo_setup_10()
Fix two checkpatch warnings in elo_setup_10():
- Add missing space around '-' operator in array index expression
- Add missing 'const' qualifier to elo_types pointer array, since the array is never modified after initialization
Signed-off-by Bivash Kumar Singh <[email protected]>
--- drivers/input/touchscreen/elo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/input/touchscreen/elo.c +2 -2
@@ -257,7 +257,7 @@ static int elo_command_10(struct elo *elo, unsigned char *packet)static int elo_setup_10 (struct elo *elo) { -static const char *elo_types[] = {"Accu" ,"Dura" ,"Intelli" ,"Carroll" }; +static const char *const elo_types[] = {"Accu" ,"Dura" ,"Intelli" ,"Carroll" };struct input_dev *dev = elo->dev;unsigned char packet[ELO10_PACKET_LEN ] = {ELO10_ID_CMD };
@@ -273,7 +273,7 @@ static int elo_setup_10(struct elo *elo)dev_info (&elo->serio->dev,"%sTouch touchscreen, fw: %02x.%02x, features: 0x%02x, controller: 0x%02x\n" , - elo_types[(packet[1 ] -'0' ) &0x03 ], + elo_types[(packet[1 ] -'0' ) &0x03 ], packet[5 ], packet[4 ], packet[3 ], packet[7 ]);return 0 ;
Signature · 1 line
2.53.0
Quoted 6 lines · Bivash Kumar Singh
Fix two checkpatch warnings in
elo_setup_10():
- Add missing space around '-' operator in array index expression
- Add missing 'const' qualifier toelo_typespointer array, since the array is never modified after initializationSigned-off-by Bivash Kumar Singh <[email protected]>
Applied, thank you.
Signature · 1 line
Dmitry