Merge ../linux-2.6-watchdog-mm
[linux-drm-fsl-dcu.git] / drivers / input / keyboard / lkkbd.c
index 77c4d9669ad04ac44889bf72a185cb81c14c2b9b..979b93e33da7a9e0461594887267d17c8e3891a0 100644 (file)
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * Should you need to contact me, the author, you can do so either by
- * email or by paper mail:
- * Jan-Benedict Glaw, Lilienstraße 16, 33790 Hörste (near Halle/Westf.),
- * Germany.
  */
 
 #include <linux/delay.h>
@@ -384,18 +379,21 @@ lkkbd_detection_done (struct lkkbd *lk)
         */
        switch (lk->id[4]) {
                case 1:
-                       sprintf (lk->name, "DEC LK201 keyboard");
+                       strlcpy (lk->name, "DEC LK201 keyboard",
+                                sizeof (lk->name));
 
                        if (lk201_compose_is_alt)
                                lk->keycode[0xb1] = KEY_LEFTALT;
                        break;
 
                case 2:
-                       sprintf (lk->name, "DEC LK401 keyboard");
+                       strlcpy (lk->name, "DEC LK401 keyboard",
+                                sizeof (lk->name));
                        break;
 
                default:
-                       sprintf (lk->name, "Unknown DEC keyboard");
+                       strlcpy (lk->name, "Unknown DEC keyboard",
+                                sizeof (lk->name));
                        printk (KERN_ERR "lkkbd: keyboard on %s is unknown, "
                                        "please report to Jan-Benedict Glaw "
                                        "<jbglaw@lug-owl.de>\n", lk->phys);
@@ -450,8 +448,7 @@ lkkbd_detection_done (struct lkkbd *lk)
  * is received.
  */
 static irqreturn_t
-lkkbd_interrupt (struct serio *serio, unsigned char data, unsigned int flags,
-               struct pt_regs *regs)
+lkkbd_interrupt (struct serio *serio, unsigned char data, unsigned int flags)
 {
        struct lkkbd *lk = serio_get_drvdata (serio);
        int i;
@@ -470,7 +467,6 @@ lkkbd_interrupt (struct serio *serio, unsigned char data, unsigned int flags,
 
        switch (data) {
                case LK_ALL_KEYS_UP:
-                       input_regs (lk->dev, regs);
                        for (i = 0; i < ARRAY_SIZE (lkkbd_keycode); i++)
                                if (lk->keycode[i] != KEY_RESERVED)
                                        input_report_key (lk->dev, lk->keycode[i], 0);
@@ -498,7 +494,6 @@ lkkbd_interrupt (struct serio *serio, unsigned char data, unsigned int flags,
 
                default:
                        if (lk->keycode[data] != KEY_RESERVED) {
-                               input_regs (lk->dev, regs);
                                if (!test_bit (lk->keycode[data], lk->dev->key))
                                        input_report_key (lk->dev, lk->keycode[data], 1);
                                else