mirror of
https://github.com/wessel-novacustom/clevo-keyboard.git
synced 2024-11-15 03:34:01 +01:00
set_color_region(): more meaningfull variable names
This commit is contained in:
parent
4c8fb9937f
commit
0a98818376
|
@ -341,28 +341,28 @@ static int set_color(u32 region, u32 color)
|
|||
return tuxedo_evaluate_wmi_method(SET_KB_LED, cmd, NULL);
|
||||
}
|
||||
|
||||
static int set_color_region(const char *buffer, size_t size, u32 region)
|
||||
static int set_color_region(const char *color_string, size_t size, u32 region)
|
||||
{
|
||||
u32 val;
|
||||
int err = kstrtouint(buffer, 0, &val);
|
||||
u32 colorcode;
|
||||
int err = kstrtouint(color_string, 0, &colorcode);
|
||||
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
|
||||
if (!set_color(region, val)) {
|
||||
if (!set_color(region, colorcode)) {
|
||||
switch (region) {
|
||||
case REGION_LEFT:
|
||||
keyboard.color.left = val;
|
||||
keyboard.color.left = colorcode;
|
||||
break;
|
||||
case REGION_CENTER:
|
||||
keyboard.color.center = val;
|
||||
keyboard.color.center = colorcode;
|
||||
break;
|
||||
case REGION_RIGHT:
|
||||
keyboard.color.right = val;
|
||||
keyboard.color.right = colorcode;
|
||||
break;
|
||||
case REGION_EXTRA:
|
||||
keyboard.color.extra = val;
|
||||
keyboard.color.extra = colorcode;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue