Re: [patch 04/33] m68k: Atari keyboard and mouse support.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Michael,

On 5/3/07, Michael Schmitz <[email protected]> wrote:
>
> > +
> > +       if (!(atakbd_dev = input_allocate_device()))
> > +               return -ENOMEM;
> > +
> > +       // need to init core driver if not already done so
> > +       if (atari_keyb_init())
>
> Memory leak

How so? If the core has been initialized already this will just return ...


You just allocated atakbd_dev. If atari_keyb_init() fails you leak it.

> > +       for (i = 1; i < 0x72; i++) {
> > +               atakbd_keycode[i] = i;
> > +               set_bit(atakbd_keycode[i], atakbd_dev->keybit);
>
> It looks like this driver is not using standard input event codes. If
> Roman does not want to adjust keymaps on Amiga and Atari that should
> be handled in legacy keyboard driver (drivers/char/keyboard.c). As it
> is programs using /dev/input/eventX have no chance of working.

The translation map should not have been overwritten like above, is that
what you mean?
My original patch didn't have that bit; scancodes were translated to
input keycodes using atakbd_keycode[scancode] instead. I'll have that
reverted...


Does KEY_1 actually  maps to scancode 2 on atari?


Thanks,

--
Dmitry
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux