From bdab3dc13ee9b8d3dc82b6cce4fb7c8c87e9ee46 Mon Sep 17 00:00:00 2001 From: Richard Sailer Date: Mon, 19 Aug 2019 06:24:32 +0200 Subject: [PATCH] refactor: set_state() --> set_enabled() --- src/tuxedo_keyboard.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tuxedo_keyboard.c b/src/tuxedo_keyboard.c index f2c8b9b..a231fff 100644 --- a/src/tuxedo_keyboard.c +++ b/src/tuxedo_keyboard.c @@ -328,10 +328,10 @@ static ssize_t set_brightness_fs(struct device *child, return size; } -static void set_state(u8 state) +static void set_enabled(u8 state) { u32 cmd = 0xE0000000; - TUXEDO_INFO("Set keyboard state on: %d\n", state); + TUXEDO_INFO("Set keyboard enabled to: %d\n", state); if (state == 0) { cmd |= 0x003001; @@ -356,7 +356,7 @@ static ssize_t set_state_fs(struct device *child, struct device_attribute *attr, state = clamp_t(u8, state, 0, 1); - set_state(state); + set_enabled(state); return size; } @@ -590,7 +590,7 @@ static void tuxedo_wmi_notify(u32 value, void *context) break; case WMI_CODE_TOGGLE_STATE: - set_state(kbd_led_state.enabled == 0 ? 1 : 0); + set_enabled(kbd_led_state.enabled == 0 ? 1 : 0); break; default: @@ -787,7 +787,7 @@ static int __init tuxdeo_keyboard_init(void) set_blinking_pattern(param_blinking_pattern); set_brightness(param_brightness); - set_state(param_state); + set_enabled(param_state); return 0; }