diff options
-rw-r--r-- | drivers/hid/wacom.h | 1 | ||||
-rw-r--r-- | drivers/hid/wacom_sys.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/hid/wacom.h b/drivers/hid/wacom.h index dd67b7d..a678f82 100644 --- a/drivers/hid/wacom.h +++ b/drivers/hid/wacom.h @@ -118,6 +118,7 @@ struct wacom { u8 hlv; /* status led brightness button pressed (1..127) */ u8 img_lum; /* OLED matrix display brightness */ } led; + bool led_initialized; struct power_supply battery; }; diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index 06e304b..f1c6d3d 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c @@ -729,12 +729,18 @@ static int wacom_initialize_leds(struct wacom *wacom) return error; } wacom_led_control(wacom); + wacom->led_initialized = true; return 0; } static void wacom_destroy_leds(struct wacom *wacom) { + if (!wacom->led_initialized) + return; + + wacom->led_initialized = false; + switch (wacom->wacom_wac.features.type) { case INTUOS4S: case INTUOS4: |