diff options
-rw-r--r-- | drivers/input/tablet/wacom_sys.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index f8b30d0cb210..e21197be6a5a 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c | |||
@@ -978,14 +978,17 @@ static int wacom_initialize_leds(struct wacom *wacom) | |||
978 | case INTUOS5S: | 978 | case INTUOS5S: |
979 | case INTUOS5: | 979 | case INTUOS5: |
980 | case INTUOS5L: | 980 | case INTUOS5L: |
981 | wacom->led.select[0] = 0; | 981 | if (wacom->wacom_wac.features.device_type == BTN_TOOL_PEN) { |
982 | wacom->led.select[1] = 0; | 982 | wacom->led.select[0] = 0; |
983 | wacom->led.llv = 32; | 983 | wacom->led.select[1] = 0; |
984 | wacom->led.hlv = 0; | 984 | wacom->led.llv = 32; |
985 | wacom->led.img_lum = 0; | 985 | wacom->led.hlv = 0; |
986 | 986 | wacom->led.img_lum = 0; | |
987 | error = sysfs_create_group(&wacom->intf->dev.kobj, | 987 | |
988 | &intuos5_led_attr_group); | 988 | error = sysfs_create_group(&wacom->intf->dev.kobj, |
989 | &intuos5_led_attr_group); | ||
990 | } else | ||
991 | return 0; | ||
989 | break; | 992 | break; |
990 | 993 | ||
991 | default: | 994 | default: |
@@ -1021,8 +1024,9 @@ static void wacom_destroy_leds(struct wacom *wacom) | |||
1021 | case INTUOS5S: | 1024 | case INTUOS5S: |
1022 | case INTUOS5: | 1025 | case INTUOS5: |
1023 | case INTUOS5L: | 1026 | case INTUOS5L: |
1024 | sysfs_remove_group(&wacom->intf->dev.kobj, | 1027 | if (wacom->wacom_wac.features.device_type == BTN_TOOL_PEN) |
1025 | &intuos5_led_attr_group); | 1028 | sysfs_remove_group(&wacom->intf->dev.kobj, |
1029 | &intuos5_led_attr_group); | ||
1026 | break; | 1030 | break; |
1027 | } | 1031 | } |
1028 | } | 1032 | } |