Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import wacom_w8001 upstream patch #425

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions 4.5/wacom_w8001.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ static int w8001_connect(struct serio *serio, struct serio_driver *drv)
struct w8001 *w8001;
struct input_dev *input_dev_pen;
struct input_dev *input_dev_touch;
char basename[64];
char basename[64] = "Wacom Serial";
int err, err_pen, err_touch;

w8001 = kzalloc(sizeof(struct w8001), GFP_KERNEL);
Expand Down Expand Up @@ -625,8 +625,6 @@ static int w8001_connect(struct serio *serio, struct serio_driver *drv)
/* For backwards-compatibility we compose the basename based on
* capabilities and then just append the tool type
*/
strscpy(basename, "Wacom Serial", sizeof(basename));

err_pen = w8001_setup_pen(w8001, basename, sizeof(basename));
err_touch = w8001_setup_touch(w8001, basename, sizeof(basename));
if (err_pen && err_touch) {
Expand All @@ -635,8 +633,8 @@ static int w8001_connect(struct serio *serio, struct serio_driver *drv)
}

if (!err_pen) {
strscpy(w8001->pen_name, basename, sizeof(w8001->pen_name));
strlcat(w8001->pen_name, " Pen", sizeof(w8001->pen_name));
snprintf(w8001->pen_name, sizeof(w8001->pen_name),
"%s Pen", basename);
input_dev_pen->name = w8001->pen_name;

w8001_set_devdata(input_dev_pen, w8001, serio);
Expand All @@ -651,9 +649,8 @@ static int w8001_connect(struct serio *serio, struct serio_driver *drv)
}

if (!err_touch) {
strscpy(w8001->touch_name, basename, sizeof(w8001->touch_name));
strlcat(w8001->touch_name, " Finger",
sizeof(w8001->touch_name));
snprintf(w8001->pen_name, sizeof(w8001->pen_name),
"%s Finger", basename);
input_dev_touch->name = w8001->touch_name;

w8001_set_devdata(input_dev_touch, w8001, serio);
Expand Down