[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220326165909.506926-12-benni@stuerz.xyz>
Date: Sat, 26 Mar 2022 17:58:59 +0100
From: Benjamin Stürz <benni@...erz.xyz>
To: andrew@...n.ch
Cc: sebastian.hesselbarth@...il.com, gregory.clement@...tlin.com,
linux@...linux.org.uk, linux@...tec.co.uk, krzk@...nel.org,
alim.akhtar@...sung.com, tglx@...utronix.de, mingo@...hat.com,
bp@...en8.de, dave.hansen@...ux.intel.com, hpa@...or.com,
robert.moore@...el.com, rafael.j.wysocki@...el.com,
lenb@...nel.org, 3chas3@...il.com, laforge@...monks.org,
arnd@...db.de, gregkh@...uxfoundation.org, mchehab@...nel.org,
tony.luck@...el.com, james.morse@....com, rric@...nel.org,
linus.walleij@...aro.org, brgl@...ev.pl,
mike.marciniszyn@...nelisnetworks.com,
dennis.dalessandro@...nelisnetworks.com, jgg@...pe.ca,
pali@...nel.org, dmitry.torokhov@...il.com, isdn@...ux-pingi.de,
benh@...nel.crashing.org, fbarrat@...ux.ibm.com, ajd@...ux.ibm.com,
davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
nico@...xnic.net, loic.poulain@...aro.org, kvalo@...nel.org,
pkshih@...ltek.com, bhelgaas@...gle.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-samsung-soc@...r.kernel.org, linux-ia64@...r.kernel.org,
linux-acpi@...r.kernel.org, devel@...ica.org,
linux-atm-general@...ts.sourceforge.net, netdev@...r.kernel.org,
linux-edac@...r.kernel.org, linux-gpio@...r.kernel.org,
linux-rdma@...r.kernel.org, linux-input@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, linux-media@...r.kernel.org,
wcn36xx@...ts.infradead.org, linux-wireless@...r.kernel.org,
linux-pci@...r.kernel.org,
Benjamin Stürz <benni@...erz.xyz>
Subject: [PATCH 12/22] alps: Replace comments with C99 initializers
This replaces comments with C99's designated
initializers because the kernel supports them now.
Signed-off-by: Benjamin Stürz <benni@...erz.xyz>
---
drivers/input/mouse/alps.c | 96 +++++++++++++++++++-------------------
1 file changed, 48 insertions(+), 48 deletions(-)
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 4a6b33bbe7ea..333f18b198eb 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -33,60 +33,60 @@
#define ALPS_REG_BASE_PINNACLE 0x0000
static const struct alps_nibble_commands alps_v3_nibble_commands[] = {
- { PSMOUSE_CMD_SETPOLL, 0x00 }, /* 0 */
- { PSMOUSE_CMD_RESET_DIS, 0x00 }, /* 1 */
- { PSMOUSE_CMD_SETSCALE21, 0x00 }, /* 2 */
- { PSMOUSE_CMD_SETRATE, 0x0a }, /* 3 */
- { PSMOUSE_CMD_SETRATE, 0x14 }, /* 4 */
- { PSMOUSE_CMD_SETRATE, 0x28 }, /* 5 */
- { PSMOUSE_CMD_SETRATE, 0x3c }, /* 6 */
- { PSMOUSE_CMD_SETRATE, 0x50 }, /* 7 */
- { PSMOUSE_CMD_SETRATE, 0x64 }, /* 8 */
- { PSMOUSE_CMD_SETRATE, 0xc8 }, /* 9 */
- { ALPS_CMD_NIBBLE_10, 0x00 }, /* a */
- { PSMOUSE_CMD_SETRES, 0x00 }, /* b */
- { PSMOUSE_CMD_SETRES, 0x01 }, /* c */
- { PSMOUSE_CMD_SETRES, 0x02 }, /* d */
- { PSMOUSE_CMD_SETRES, 0x03 }, /* e */
- { PSMOUSE_CMD_SETSCALE11, 0x00 }, /* f */
+ [0x0] = { PSMOUSE_CMD_SETPOLL, 0x00 },
+ [0x1] = { PSMOUSE_CMD_RESET_DIS, 0x00 },
+ [0x2] = { PSMOUSE_CMD_SETSCALE21, 0x00 },
+ [0x3] = { PSMOUSE_CMD_SETRATE, 0x0a },
+ [0x4] = { PSMOUSE_CMD_SETRATE, 0x14 },
+ [0x5] = { PSMOUSE_CMD_SETRATE, 0x28 },
+ [0x6] = { PSMOUSE_CMD_SETRATE, 0x3c },
+ [0x7] = { PSMOUSE_CMD_SETRATE, 0x50 },
+ [0x8] = { PSMOUSE_CMD_SETRATE, 0x64 },
+ [0x9] = { PSMOUSE_CMD_SETRATE, 0xc8 },
+ [0xa] = { ALPS_CMD_NIBBLE_10, 0x00 },
+ [0xb] = { PSMOUSE_CMD_SETRES, 0x00 },
+ [0xc] = { PSMOUSE_CMD_SETRES, 0x01 },
+ [0xd] = { PSMOUSE_CMD_SETRES, 0x02 },
+ [0xe] = { PSMOUSE_CMD_SETRES, 0x03 },
+ [0xf] = { PSMOUSE_CMD_SETSCALE11, 0x00 },
};
static const struct alps_nibble_commands alps_v4_nibble_commands[] = {
- { PSMOUSE_CMD_ENABLE, 0x00 }, /* 0 */
- { PSMOUSE_CMD_RESET_DIS, 0x00 }, /* 1 */
- { PSMOUSE_CMD_SETSCALE21, 0x00 }, /* 2 */
- { PSMOUSE_CMD_SETRATE, 0x0a }, /* 3 */
- { PSMOUSE_CMD_SETRATE, 0x14 }, /* 4 */
- { PSMOUSE_CMD_SETRATE, 0x28 }, /* 5 */
- { PSMOUSE_CMD_SETRATE, 0x3c }, /* 6 */
- { PSMOUSE_CMD_SETRATE, 0x50 }, /* 7 */
- { PSMOUSE_CMD_SETRATE, 0x64 }, /* 8 */
- { PSMOUSE_CMD_SETRATE, 0xc8 }, /* 9 */
- { ALPS_CMD_NIBBLE_10, 0x00 }, /* a */
- { PSMOUSE_CMD_SETRES, 0x00 }, /* b */
- { PSMOUSE_CMD_SETRES, 0x01 }, /* c */
- { PSMOUSE_CMD_SETRES, 0x02 }, /* d */
- { PSMOUSE_CMD_SETRES, 0x03 }, /* e */
- { PSMOUSE_CMD_SETSCALE11, 0x00 }, /* f */
+ [0x0] = { PSMOUSE_CMD_ENABLE, 0x00 },
+ [0x1] = { PSMOUSE_CMD_RESET_DIS, 0x00 },
+ [0x2] = { PSMOUSE_CMD_SETSCALE21, 0x00 },
+ [0x3] = { PSMOUSE_CMD_SETRATE, 0x0a },
+ [0x4] = { PSMOUSE_CMD_SETRATE, 0x14 },
+ [0x5] = { PSMOUSE_CMD_SETRATE, 0x28 },
+ [0x6] = { PSMOUSE_CMD_SETRATE, 0x3c },
+ [0x7] = { PSMOUSE_CMD_SETRATE, 0x50 },
+ [0x8] = { PSMOUSE_CMD_SETRATE, 0x64 },
+ [0x9] = { PSMOUSE_CMD_SETRATE, 0xc8 },
+ [0xa] = { ALPS_CMD_NIBBLE_10, 0x00 },
+ [0xb] = { PSMOUSE_CMD_SETRES, 0x00 },
+ [0xc] = { PSMOUSE_CMD_SETRES, 0x01 },
+ [0xd] = { PSMOUSE_CMD_SETRES, 0x02 },
+ [0xe] = { PSMOUSE_CMD_SETRES, 0x03 },
+ [0xf] = { PSMOUSE_CMD_SETSCALE11, 0x00 },
};
static const struct alps_nibble_commands alps_v6_nibble_commands[] = {
- { PSMOUSE_CMD_ENABLE, 0x00 }, /* 0 */
- { PSMOUSE_CMD_SETRATE, 0x0a }, /* 1 */
- { PSMOUSE_CMD_SETRATE, 0x14 }, /* 2 */
- { PSMOUSE_CMD_SETRATE, 0x28 }, /* 3 */
- { PSMOUSE_CMD_SETRATE, 0x3c }, /* 4 */
- { PSMOUSE_CMD_SETRATE, 0x50 }, /* 5 */
- { PSMOUSE_CMD_SETRATE, 0x64 }, /* 6 */
- { PSMOUSE_CMD_SETRATE, 0xc8 }, /* 7 */
- { PSMOUSE_CMD_GETID, 0x00 }, /* 8 */
- { PSMOUSE_CMD_GETINFO, 0x00 }, /* 9 */
- { PSMOUSE_CMD_SETRES, 0x00 }, /* a */
- { PSMOUSE_CMD_SETRES, 0x01 }, /* b */
- { PSMOUSE_CMD_SETRES, 0x02 }, /* c */
- { PSMOUSE_CMD_SETRES, 0x03 }, /* d */
- { PSMOUSE_CMD_SETSCALE21, 0x00 }, /* e */
- { PSMOUSE_CMD_SETSCALE11, 0x00 }, /* f */
+ [0x0] = { PSMOUSE_CMD_ENABLE, 0x00 },
+ [0x1] = { PSMOUSE_CMD_SETRATE, 0x0a },
+ [0x2] = { PSMOUSE_CMD_SETRATE, 0x14 },
+ [0x3] = { PSMOUSE_CMD_SETRATE, 0x28 },
+ [0x4] = { PSMOUSE_CMD_SETRATE, 0x3c },
+ [0x5] = { PSMOUSE_CMD_SETRATE, 0x50 },
+ [0x6] = { PSMOUSE_CMD_SETRATE, 0x64 },
+ [0x7] = { PSMOUSE_CMD_SETRATE, 0xc8 },
+ [0x8] = { PSMOUSE_CMD_GETID, 0x00 },
+ [0x9] = { PSMOUSE_CMD_GETINFO, 0x00 },
+ [0xa] = { PSMOUSE_CMD_SETRES, 0x00 },
+ [0xb] = { PSMOUSE_CMD_SETRES, 0x01 },
+ [0xc] = { PSMOUSE_CMD_SETRES, 0x02 },
+ [0xd] = { PSMOUSE_CMD_SETRES, 0x03 },
+ [0xe] = { PSMOUSE_CMD_SETSCALE21, 0x00 },
+ [0xf] = { PSMOUSE_CMD_SETSCALE11, 0x00 },
};
--
2.35.1
Powered by blists - more mailing lists