Skip to content

Commit ae4aa00

Browse files
committed
Small cleanups in existing FS67xx code
- The NVME_*_LED macros are identical to DISK_*_LED macros, so use those instead - no need to list all the unused indices from 9-20 in their own lines :)
1 parent 0185911 commit ae4aa00

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

asustor.c

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,6 @@
3434
.name = _name ":red:disk", \
3535
.default_state = LEDS_GPIO_DEFSTATE_OFF \
3636
}
37-
#define NVME_ACT_LED(_name) \
38-
{ \
39-
.name = _name ":green:disk", \
40-
.default_state = LEDS_GPIO_DEFSTATE_OFF \
41-
}
42-
#define NVME_ERR_LED(_name) \
43-
{ \
44-
.name = _name ":red:disk", \
45-
.default_state = LEDS_GPIO_DEFSTATE_OFF \
46-
}
4737

4838
// ASUSTOR Leds.
4939
// If ledtrig-blkdev ever lands, use that instead of disk-activity:
@@ -76,8 +66,8 @@ static struct gpio_led asustor_leds[] = {
7666
DISK_ERR_LED("sata5"), // 18
7767
DISK_ACT_LED("sata6"), // 19
7868
DISK_ERR_LED("sata6"), // 20
79-
NVME_ACT_LED("nvme1"), // 21
80-
NVME_ERR_LED("nvme1"), // 22
69+
DISK_ACT_LED("nvme1"), // 21
70+
DISK_ERR_LED("nvme1"), // 22
8171
};
8272

8373
static const struct gpio_led_platform_data asustor_leds_pdata = {
@@ -102,18 +92,7 @@ static struct gpiod_lookup_table asustor_fs6700_gpio_leds_lookup = {
10292
// 6
10393
// 7
10494
GPIO_LOOKUP_IDX(GPIO_IT87, 55, NULL, 8, GPIO_ACTIVE_HIGH), // blue:lan
105-
// 9
106-
// 10
107-
// 11
108-
// 12
109-
// 13
110-
// 14
111-
// 15
112-
// 16
113-
// 17
114-
// 18
115-
// 19
116-
// 20
95+
// 9 - 20 don't exist
11796
GPIO_LOOKUP_IDX(GPIO_IT87, 12, NULL, 21, GPIO_ACTIVE_LOW), // nvme1:green:disk
11897
GPIO_LOOKUP_IDX(GPIO_IT87, 13, NULL, 22, GPIO_ACTIVE_LOW), // nvme1:red:disk
11998
{}

0 commit comments

Comments
 (0)