lkkbd.c (75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37) | lkkbd.c (a9f08ad7adb3d2f90e11efbb40a1246ef95b0c04) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Copyright (C) 2004 by Jan-Benedict Glaw <jbglaw@lug-owl.de> 4 */ 5 6/* 7 * LK keyboard driver for Linux, based on sunkbd.c (C) by Vojtech Pavlik 8 */ --- 345 unchanged lines hidden (view full) --- 354 */ 355 lk->keycode[0xb1] = KEY_COMPOSE; 356 357 /* 358 * Print keyboard name and modify Compose=Alt on user's request. 359 */ 360 switch (lk->id[4]) { 361 case 1: | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Copyright (C) 2004 by Jan-Benedict Glaw <jbglaw@lug-owl.de> 4 */ 5 6/* 7 * LK keyboard driver for Linux, based on sunkbd.c (C) by Vojtech Pavlik 8 */ --- 345 unchanged lines hidden (view full) --- 354 */ 355 lk->keycode[0xb1] = KEY_COMPOSE; 356 357 /* 358 * Print keyboard name and modify Compose=Alt on user's request. 359 */ 360 switch (lk->id[4]) { 361 case 1: |
362 strlcpy(lk->name, "DEC LK201 keyboard", sizeof(lk->name)); | 362 strscpy(lk->name, "DEC LK201 keyboard", sizeof(lk->name)); |
363 364 if (lk201_compose_is_alt) 365 lk->keycode[0xb1] = KEY_LEFTALT; 366 break; 367 368 case 2: | 363 364 if (lk201_compose_is_alt) 365 lk->keycode[0xb1] = KEY_LEFTALT; 366 break; 367 368 case 2: |
369 strlcpy(lk->name, "DEC LK401 keyboard", sizeof(lk->name)); | 369 strscpy(lk->name, "DEC LK401 keyboard", sizeof(lk->name)); |
370 break; 371 372 default: | 370 break; 371 372 default: |
373 strlcpy(lk->name, "Unknown DEC keyboard", sizeof(lk->name)); | 373 strscpy(lk->name, "Unknown DEC keyboard", sizeof(lk->name)); |
374 printk(KERN_ERR 375 "lkkbd: keyboard on %s is unknown, please report to " 376 "Jan-Benedict Glaw <jbglaw@lug-owl.de>\n", lk->phys); 377 printk(KERN_ERR "lkkbd: keyboard ID'ed as:"); 378 for (i = 0; i < LK_NUM_IGNORE_BYTES; i++) 379 printk(" 0x%02x", lk->id[i]); 380 printk("\n"); 381 break; --- 239 unchanged lines hidden (view full) --- 621 lk->serio = serio; 622 lk->dev = input_dev; 623 INIT_WORK(&lk->tq, lkkbd_reinit); 624 lk->bell_volume = bell_volume; 625 lk->keyclick_volume = keyclick_volume; 626 lk->ctrlclick_volume = ctrlclick_volume; 627 memcpy(lk->keycode, lkkbd_keycode, sizeof(lk->keycode)); 628 | 374 printk(KERN_ERR 375 "lkkbd: keyboard on %s is unknown, please report to " 376 "Jan-Benedict Glaw <jbglaw@lug-owl.de>\n", lk->phys); 377 printk(KERN_ERR "lkkbd: keyboard ID'ed as:"); 378 for (i = 0; i < LK_NUM_IGNORE_BYTES; i++) 379 printk(" 0x%02x", lk->id[i]); 380 printk("\n"); 381 break; --- 239 unchanged lines hidden (view full) --- 621 lk->serio = serio; 622 lk->dev = input_dev; 623 INIT_WORK(&lk->tq, lkkbd_reinit); 624 lk->bell_volume = bell_volume; 625 lk->keyclick_volume = keyclick_volume; 626 lk->ctrlclick_volume = ctrlclick_volume; 627 memcpy(lk->keycode, lkkbd_keycode, sizeof(lk->keycode)); 628 |
629 strlcpy(lk->name, "DEC LK keyboard", sizeof(lk->name)); | 629 strscpy(lk->name, "DEC LK keyboard", sizeof(lk->name)); |
630 snprintf(lk->phys, sizeof(lk->phys), "%s/input0", serio->phys); 631 632 input_dev->name = lk->name; 633 input_dev->phys = lk->phys; 634 input_dev->id.bustype = BUS_RS232; 635 input_dev->id.vendor = SERIO_LKKBD; 636 input_dev->id.product = 0; 637 input_dev->id.version = 0x0100; --- 84 unchanged lines hidden --- | 630 snprintf(lk->phys, sizeof(lk->phys), "%s/input0", serio->phys); 631 632 input_dev->name = lk->name; 633 input_dev->phys = lk->phys; 634 input_dev->id.bustype = BUS_RS232; 635 input_dev->id.vendor = SERIO_LKKBD; 636 input_dev->id.product = 0; 637 input_dev->id.version = 0x0100; --- 84 unchanged lines hidden --- |