mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
Initial driver registration mechanism
Also added the basis of the upekts driver, which is the first I'll implement.
This commit is contained in:
@@ -19,7 +19,31 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include "fp_internal.h"
|
||||
|
||||
static GList *registered_drivers = NULL;
|
||||
|
||||
static void register_driver(const struct fp_driver *drv)
|
||||
{
|
||||
registered_drivers = g_list_prepend(registered_drivers, (gpointer) drv);
|
||||
}
|
||||
|
||||
static const struct fp_driver * const drivers[] = {
|
||||
&upekts_driver,
|
||||
};
|
||||
|
||||
static void register_drivers(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(drivers); i++)
|
||||
register_driver(drivers[i]);
|
||||
}
|
||||
|
||||
API_EXPORTED int fp_init(void)
|
||||
{
|
||||
register_drivers();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user