Input: magellan: make static read-only array nibbles const
Subsystems (3)
PATCH 1/1 Input: magellan: make static read-only array nibbles const
The static array nibbles is read-only so it make sense to make it const.
Signed-off-by Colin Ian King <[email protected]>
--- drivers/input/joystick/magellan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/joystick/magellan.c +1 -1
@@ -51,7 +51,7 @@ struct magellan {static int magellan_crunch_nibbles (unsigned char *data,int count) { -static unsigned char nibbles[16 ] ="0AB3D56GH9:K<MN?" ; +static const unsigned char nibbles[16 ] ="0AB3D56GH9:K<MN?" ; do { if (data[count] == nibbles[data[count] & 0xf])
Signature · 1 line
2.33.1