From a556d624fc052f5a7f056ac7f6697611ee1c6a2b Mon Sep 17 00:00:00 2001 From: YusukeKato Date: Thu, 7 Nov 2024 16:51:40 +0900 Subject: [PATCH] =?UTF-8?q?lint=E3=81=AB=E5=AF=BE=E5=BF=9C=E3=81=97?= =?UTF-8?q?=E3=81=A6=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/drivers/rtmouse_main.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/src/drivers/rtmouse_main.c b/src/drivers/rtmouse_main.c index 6392ad5..4f2bf16 100644 --- a/src/drivers/rtmouse_main.c +++ b/src/drivers/rtmouse_main.c @@ -42,29 +42,27 @@ const unsigned int NUM_DEV[ID_DEV_SIZE] = { * --- Device Names --- * used in rtmouse_dev.c */ -const char *NAME_DEV[ID_DEV_SIZE] = { - [ID_DEV_LED] = "rtled", - [ID_DEV_SWITCH] = "rtswitch", - [ID_DEV_SENSOR] = "rtlightsensor", - [ID_DEV_BUZZER] = "rtbuzzer", - [ID_DEV_MOTORRAWR] = "rtmotor_raw_r", - [ID_DEV_MOTORRAWL] = "rtmotor_raw_l", - [ID_DEV_MOTOREN] = "rtmotoren", - [ID_DEV_MOTOR] = "rtmotor"}; +const char *NAME_DEV[ID_DEV_SIZE] = {[ID_DEV_LED] = "rtled", + [ID_DEV_SWITCH] = "rtswitch", + [ID_DEV_SENSOR] = "rtlightsensor", + [ID_DEV_BUZZER] = "rtbuzzer", + [ID_DEV_MOTORRAWR] = "rtmotor_raw_r", + [ID_DEV_MOTORRAWL] = "rtmotor_raw_l", + [ID_DEV_MOTOREN] = "rtmotoren", + [ID_DEV_MOTOR] = "rtmotor"}; /* * --- Device Names(+%u) --- * used in rtmouse_dev.c */ -const char *NAME_DEV_U[ID_DEV_SIZE] = { - [ID_DEV_LED] = "rtled%u", - [ID_DEV_SWITCH] = "rtswitch%u", - [ID_DEV_SENSOR] = "rtlightsensor%u", - [ID_DEV_BUZZER] = "rtbuzzer%u", - [ID_DEV_MOTORRAWR] = "rtmotor_raw_r%u", - [ID_DEV_MOTORRAWL] = "rtmotor_raw_l%u", - [ID_DEV_MOTOREN] = "rtmotoren%u", - [ID_DEV_MOTOR] = "rtmotor%u"}; +const char *NAME_DEV_U[ID_DEV_SIZE] = {[ID_DEV_LED] = "rtled%u", + [ID_DEV_SWITCH] = "rtswitch%u", + [ID_DEV_SENSOR] = "rtlightsensor%u", + [ID_DEV_BUZZER] = "rtbuzzer%u", + [ID_DEV_MOTORRAWR] = "rtmotor_raw_r%u", + [ID_DEV_MOTORRAWL] = "rtmotor_raw_l%u", + [ID_DEV_MOTOREN] = "rtmotoren%u", + [ID_DEV_MOTOR] = "rtmotor%u"}; // used in by rtmouse_dev.c and cleanup_each_dev() int _major_dev[ID_DEV_SIZE] = {