-static void in_evdev_get_def_binds(int *binds)
-{
- int i;
-
- for (i = 0; ; i++) {
- if (in_evdev_defbinds[i].bit == 0 && in_evdev_defbinds[i].code == 0)
- break;
- binds[IN_BIND_OFFS(in_evdev_defbinds[i].code, in_evdev_defbinds[i].btype)] =
- 1 << in_evdev_defbinds[i].bit;
- }
-}
-
/* remove binds of missing keys, count remaining ones */
static int in_evdev_clean_binds(void *drv_data, int *binds, int *def_binds)
{
/* remove binds of missing keys, count remaining ones */
static int in_evdev_clean_binds(void *drv_data, int *binds, int *def_binds)
{
.probe = in_evdev_probe,
.free = in_evdev_free,
.get_key_names = in_evdev_get_key_names,
.probe = in_evdev_probe,
.free = in_evdev_free,
.get_key_names = in_evdev_get_key_names,
- .get_def_binds = in_evdev_get_def_binds,
.clean_binds = in_evdev_clean_binds,
.get_config = in_evdev_get_config,
.set_config = in_evdev_set_config,
.clean_binds = in_evdev_clean_binds,
.get_config = in_evdev_get_config,
.set_config = in_evdev_set_config,
.menu_translate = in_evdev_menu_translate,
};
.menu_translate = in_evdev_menu_translate,
};
-void in_evdev_init(void)
+void in_evdev_init(const struct in_default_bind *defbinds)
- in_register_driver(&in_evdev_drv);
+ in_register_driver(&in_evdev_drv, defbinds);
extern int in_evdev_allow_abs_only;
extern int in_evdev_allow_abs_only;
-void in_evdev_init(void);
-
-/* to be set somewhere in platform code */
-extern struct in_default_bind in_evdev_defbinds[];
+void in_evdev_init(const struct in_default_bind *defbinds);
* See the COPYING file in the top-level directory.
*/
* See the COPYING file in the top-level directory.
*/
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>