Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Dec 2007 15:18:59 -0800
From:      "Maksim Yevmenkin" <maksim.yevmenkin@gmail.com>
To:        "Wojciech A. Koszek" <wkoszek@freebsd.org>, freebsd-current@freebsd.org,  emax@freebsd.org
Subject:   Re: [RFC, PATCH] Getting rid of direct calls to keyboard's methods via kbdsw[] array
Message-ID:  <bb4a86c70712221518u4046caa8p4ebfa134fd2c44fd@mail.gmail.com>
In-Reply-To: <20071222040156.GA87017@FreeBSD.czest.pl>
References:  <20071222040156.GA87017@FreeBSD.czest.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello,

> In the FreeBSD kernel we have notion of keyboard represented by
> "keyboard_t" type. We operate on such structures throught another
> keyboard_switch structure. It lets us to use keyboard API without
> distinguishing exactly which hardware we're working with.
>
> My proposal is to unify a way in which we call such specialized
> methods, so that instead of direct array indexing used to call specific
> keyboard method:
>
>         (*kbdsw[(kbd)->kb_index]->enable)((kbd))
>
> We would use unified interface:
>
>         kbdd_enable(kbd)
>
> Proposed patch is here:
>
>         http://people.freebsd.org/~wkoszek/patches/tty/kbdcleanup.patch
>
> Suggestions are welcome.

looks fine to me. it also would be nice to clean up and unify (where
possible) read_char method for all the keyboards.

thanks,
max



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bb4a86c70712221518u4046caa8p4ebfa134fd2c44fd>