aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/hid/wacom_sys.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index 033cc032f45c..7b9bff2fad94 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -1940,6 +1940,19 @@ static void wacom_update_name(struct wacom *wacom, const char *suffix)
1940 /* shift everything including the terminator */ 1940 /* shift everything including the terminator */
1941 memmove(gap, gap+1, strlen(gap)); 1941 memmove(gap, gap+1, strlen(gap));
1942 } 1942 }
1943
1944 /* strip off excessive prefixing */
1945 if (strstr(name, "Wacom Co.,Ltd. Wacom ") == name) {
1946 int n = strlen(name);
1947 int x = strlen("Wacom Co.,Ltd. ");
1948 memmove(name, name+x, n-x+1);
1949 }
1950 if (strstr(name, "Wacom Co., Ltd. Wacom ") == name) {
1951 int n = strlen(name);
1952 int x = strlen("Wacom Co., Ltd. ");
1953 memmove(name, name+x, n-x+1);
1954 }
1955
1943 /* get rid of trailing whitespace */ 1956 /* get rid of trailing whitespace */
1944 if (name[strlen(name)-1] == ' ') 1957 if (name[strlen(name)-1] == ' ')
1945 name[strlen(name)-1] = '\0'; 1958 name[strlen(name)-1] = '\0';