wacom_w8001.c (9f4813b531a0b8cc502fcfb142937fe4e9104d77) | wacom_w8001.c (a9f08ad7adb3d2f90e11efbb40a1246ef95b0c04) |
---|---|
1/* 2 * Wacom W8001 penabled serial touchscreen driver 3 * 4 * Copyright (c) 2008 Jaya Kumar 5 * Copyright (c) 2010 Red Hat, Inc. 6 * Copyright (c) 2010 - 2011 Ping Cheng, Wacom. <pingc@wacom.com> 7 * 8 * This file is subject to the terms and conditions of the GNU General Public --- 611 unchanged lines hidden (view full) --- 620 621 err = w8001_detect(w8001); 622 if (err) 623 goto fail3; 624 625 /* For backwards-compatibility we compose the basename based on 626 * capabilities and then just append the tool type 627 */ | 1/* 2 * Wacom W8001 penabled serial touchscreen driver 3 * 4 * Copyright (c) 2008 Jaya Kumar 5 * Copyright (c) 2010 Red Hat, Inc. 6 * Copyright (c) 2010 - 2011 Ping Cheng, Wacom. <pingc@wacom.com> 7 * 8 * This file is subject to the terms and conditions of the GNU General Public --- 611 unchanged lines hidden (view full) --- 620 621 err = w8001_detect(w8001); 622 if (err) 623 goto fail3; 624 625 /* For backwards-compatibility we compose the basename based on 626 * capabilities and then just append the tool type 627 */ |
628 strlcpy(basename, "Wacom Serial", sizeof(basename)); | 628 strscpy(basename, "Wacom Serial", sizeof(basename)); |
629 630 err_pen = w8001_setup_pen(w8001, basename, sizeof(basename)); 631 err_touch = w8001_setup_touch(w8001, basename, sizeof(basename)); 632 if (err_pen && err_touch) { 633 err = -ENXIO; 634 goto fail3; 635 } 636 637 if (!err_pen) { | 629 630 err_pen = w8001_setup_pen(w8001, basename, sizeof(basename)); 631 err_touch = w8001_setup_touch(w8001, basename, sizeof(basename)); 632 if (err_pen && err_touch) { 633 err = -ENXIO; 634 goto fail3; 635 } 636 637 if (!err_pen) { |
638 strlcpy(w8001->pen_name, basename, sizeof(w8001->pen_name)); | 638 strscpy(w8001->pen_name, basename, sizeof(w8001->pen_name)); |
639 strlcat(w8001->pen_name, " Pen", sizeof(w8001->pen_name)); 640 input_dev_pen->name = w8001->pen_name; 641 642 w8001_set_devdata(input_dev_pen, w8001, serio); 643 644 err = input_register_device(w8001->pen_dev); 645 if (err) 646 goto fail3; 647 } else { 648 input_free_device(input_dev_pen); 649 input_dev_pen = NULL; 650 w8001->pen_dev = NULL; 651 } 652 653 if (!err_touch) { | 639 strlcat(w8001->pen_name, " Pen", sizeof(w8001->pen_name)); 640 input_dev_pen->name = w8001->pen_name; 641 642 w8001_set_devdata(input_dev_pen, w8001, serio); 643 644 err = input_register_device(w8001->pen_dev); 645 if (err) 646 goto fail3; 647 } else { 648 input_free_device(input_dev_pen); 649 input_dev_pen = NULL; 650 w8001->pen_dev = NULL; 651 } 652 653 if (!err_touch) { |
654 strlcpy(w8001->touch_name, basename, sizeof(w8001->touch_name)); | 654 strscpy(w8001->touch_name, basename, sizeof(w8001->touch_name)); |
655 strlcat(w8001->touch_name, " Finger", 656 sizeof(w8001->touch_name)); 657 input_dev_touch->name = w8001->touch_name; 658 659 w8001_set_devdata(input_dev_touch, w8001, serio); 660 661 err = input_register_device(w8001->touch_dev); 662 if (err) --- 47 unchanged lines hidden --- | 655 strlcat(w8001->touch_name, " Finger", 656 sizeof(w8001->touch_name)); 657 input_dev_touch->name = w8001->touch_name; 658 659 w8001_set_devdata(input_dev_touch, w8001, serio); 660 661 err = input_register_device(w8001->touch_dev); 662 if (err) --- 47 unchanged lines hidden --- |