lib: Replace empty fp_dbg() calls
GLib won't like them, so use G_DEBUG_HERE() instead.
This commit is contained in:
parent
c376c6fb02
commit
363a1b3371
16 changed files with 72 additions and 72 deletions
|
@ -52,7 +52,7 @@ API_EXPORTED int fp_async_dev_open(struct fp_dscv_dev *ddev, fp_dev_open_cb call
|
||||||
libusb_device_handle *udevh;
|
libusb_device_handle *udevh;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
r = libusb_open(ddev->udev, &udevh);
|
r = libusb_open(ddev->udev, &udevh);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
fp_err("usb_open failed, error %d", r);
|
fp_err("usb_open failed, error %d", r);
|
||||||
|
@ -86,7 +86,7 @@ API_EXPORTED int fp_async_dev_open(struct fp_dscv_dev *ddev, fp_dev_open_cb call
|
||||||
/* Drivers call this when device deinitialisation has completed */
|
/* Drivers call this when device deinitialisation has completed */
|
||||||
void fpi_drvcb_close_complete(struct fp_dev *dev)
|
void fpi_drvcb_close_complete(struct fp_dev *dev)
|
||||||
{
|
{
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
BUG_ON(dev->state != DEV_STATE_DEINITIALIZING);
|
BUG_ON(dev->state != DEV_STATE_DEINITIALIZING);
|
||||||
dev->state = DEV_STATE_DEINITIALIZED;
|
dev->state = DEV_STATE_DEINITIALIZED;
|
||||||
libusb_close(dev->udev);
|
libusb_close(dev->udev);
|
||||||
|
@ -196,7 +196,7 @@ void fpi_drvcb_enroll_stage_completed(struct fp_dev *dev, int result,
|
||||||
/* Drivers call this when enrollment has stopped */
|
/* Drivers call this when enrollment has stopped */
|
||||||
void fpi_drvcb_enroll_stopped(struct fp_dev *dev)
|
void fpi_drvcb_enroll_stopped(struct fp_dev *dev)
|
||||||
{
|
{
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
BUG_ON(dev->state != DEV_STATE_ENROLL_STOPPING);
|
BUG_ON(dev->state != DEV_STATE_ENROLL_STOPPING);
|
||||||
dev->state = DEV_STATE_INITIALIZED;
|
dev->state = DEV_STATE_INITIALIZED;
|
||||||
if (dev->enroll_stop_cb)
|
if (dev->enroll_stop_cb)
|
||||||
|
@ -217,7 +217,7 @@ API_EXPORTED int fp_async_enroll_stop(struct fp_dev *dev,
|
||||||
struct fp_driver *drv = dev->drv;
|
struct fp_driver *drv = dev->drv;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
if (!drv->enroll_start)
|
if (!drv->enroll_start)
|
||||||
return -ENOTSUP;
|
return -ENOTSUP;
|
||||||
|
|
||||||
|
@ -255,7 +255,7 @@ API_EXPORTED int fp_async_verify_start(struct fp_dev *dev,
|
||||||
struct fp_driver *drv = dev->drv;
|
struct fp_driver *drv = dev->drv;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
if (!drv->verify_start)
|
if (!drv->verify_start)
|
||||||
return -ENOTSUP;
|
return -ENOTSUP;
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ API_EXPORTED int fp_async_verify_start(struct fp_dev *dev,
|
||||||
/* Drivers call this when verification has started */
|
/* Drivers call this when verification has started */
|
||||||
void fpi_drvcb_verify_started(struct fp_dev *dev, int status)
|
void fpi_drvcb_verify_started(struct fp_dev *dev, int status)
|
||||||
{
|
{
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
BUG_ON(dev->state != DEV_STATE_VERIFY_STARTING);
|
BUG_ON(dev->state != DEV_STATE_VERIFY_STARTING);
|
||||||
if (status) {
|
if (status) {
|
||||||
if (status > 0) {
|
if (status > 0) {
|
||||||
|
@ -310,7 +310,7 @@ void fpi_drvcb_report_verify_result(struct fp_dev *dev, int result,
|
||||||
/* Drivers call this when verification has stopped */
|
/* Drivers call this when verification has stopped */
|
||||||
void fpi_drvcb_verify_stopped(struct fp_dev *dev)
|
void fpi_drvcb_verify_stopped(struct fp_dev *dev)
|
||||||
{
|
{
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
BUG_ON(dev->state != DEV_STATE_VERIFY_STOPPING);
|
BUG_ON(dev->state != DEV_STATE_VERIFY_STOPPING);
|
||||||
dev->state = DEV_STATE_INITIALIZED;
|
dev->state = DEV_STATE_INITIALIZED;
|
||||||
if (dev->verify_stop_cb)
|
if (dev->verify_stop_cb)
|
||||||
|
@ -332,7 +332,7 @@ API_EXPORTED int fp_async_verify_stop(struct fp_dev *dev,
|
||||||
gboolean iterating = (dev->state == DEV_STATE_VERIFYING);
|
gboolean iterating = (dev->state == DEV_STATE_VERIFYING);
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
BUG_ON(dev->state != DEV_STATE_ERROR
|
BUG_ON(dev->state != DEV_STATE_ERROR
|
||||||
&& dev->state != DEV_STATE_VERIFYING
|
&& dev->state != DEV_STATE_VERIFYING
|
||||||
&& dev->state != DEV_STATE_VERIFY_DONE);
|
&& dev->state != DEV_STATE_VERIFY_DONE);
|
||||||
|
@ -373,7 +373,7 @@ API_EXPORTED int fp_async_identify_start(struct fp_dev *dev,
|
||||||
struct fp_driver *drv = dev->drv;
|
struct fp_driver *drv = dev->drv;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
if (!drv->identify_start)
|
if (!drv->identify_start)
|
||||||
return -ENOTSUP;
|
return -ENOTSUP;
|
||||||
dev->state = DEV_STATE_IDENTIFY_STARTING;
|
dev->state = DEV_STATE_IDENTIFY_STARTING;
|
||||||
|
@ -440,7 +440,7 @@ API_EXPORTED int fp_async_identify_stop(struct fp_dev *dev,
|
||||||
gboolean iterating = (dev->state == DEV_STATE_IDENTIFYING);
|
gboolean iterating = (dev->state == DEV_STATE_IDENTIFYING);
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
BUG_ON(dev->state != DEV_STATE_IDENTIFYING
|
BUG_ON(dev->state != DEV_STATE_IDENTIFYING
|
||||||
&& dev->state != DEV_STATE_IDENTIFY_DONE);
|
&& dev->state != DEV_STATE_IDENTIFY_DONE);
|
||||||
|
|
||||||
|
@ -469,7 +469,7 @@ API_EXPORTED int fp_async_identify_stop(struct fp_dev *dev,
|
||||||
/* Drivers call this when identification has stopped */
|
/* Drivers call this when identification has stopped */
|
||||||
void fpi_drvcb_identify_stopped(struct fp_dev *dev)
|
void fpi_drvcb_identify_stopped(struct fp_dev *dev)
|
||||||
{
|
{
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
BUG_ON(dev->state != DEV_STATE_IDENTIFY_STOPPING);
|
BUG_ON(dev->state != DEV_STATE_IDENTIFY_STOPPING);
|
||||||
dev->state = DEV_STATE_INITIALIZED;
|
dev->state = DEV_STATE_INITIALIZED;
|
||||||
if (dev->identify_stop_cb)
|
if (dev->identify_stop_cb)
|
||||||
|
@ -491,7 +491,7 @@ API_EXPORTED int fp_async_capture_start(struct fp_dev *dev, int unconditional,
|
||||||
struct fp_driver *drv = dev->drv;
|
struct fp_driver *drv = dev->drv;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
if (!drv->capture_start)
|
if (!drv->capture_start)
|
||||||
return -ENOTSUP;
|
return -ENOTSUP;
|
||||||
|
|
||||||
|
@ -512,7 +512,7 @@ API_EXPORTED int fp_async_capture_start(struct fp_dev *dev, int unconditional,
|
||||||
/* Drivers call this when capture has started */
|
/* Drivers call this when capture has started */
|
||||||
void fpi_drvcb_capture_started(struct fp_dev *dev, int status)
|
void fpi_drvcb_capture_started(struct fp_dev *dev, int status)
|
||||||
{
|
{
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
BUG_ON(dev->state != DEV_STATE_CAPTURE_STARTING);
|
BUG_ON(dev->state != DEV_STATE_CAPTURE_STARTING);
|
||||||
if (status) {
|
if (status) {
|
||||||
if (status > 0) {
|
if (status > 0) {
|
||||||
|
@ -545,7 +545,7 @@ void fpi_drvcb_report_capture_result(struct fp_dev *dev, int result,
|
||||||
/* Drivers call this when capture has stopped */
|
/* Drivers call this when capture has stopped */
|
||||||
void fpi_drvcb_capture_stopped(struct fp_dev *dev)
|
void fpi_drvcb_capture_stopped(struct fp_dev *dev)
|
||||||
{
|
{
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
BUG_ON(dev->state != DEV_STATE_CAPTURE_STOPPING);
|
BUG_ON(dev->state != DEV_STATE_CAPTURE_STOPPING);
|
||||||
dev->state = DEV_STATE_INITIALIZED;
|
dev->state = DEV_STATE_INITIALIZED;
|
||||||
if (dev->capture_stop_cb)
|
if (dev->capture_stop_cb)
|
||||||
|
@ -566,7 +566,7 @@ API_EXPORTED int fp_async_capture_stop(struct fp_dev *dev,
|
||||||
struct fp_driver *drv = dev->drv;
|
struct fp_driver *drv = dev->drv;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
BUG_ON(dev->state != DEV_STATE_ERROR
|
BUG_ON(dev->state != DEV_STATE_ERROR
|
||||||
&& dev->state != DEV_STATE_CAPTURING
|
&& dev->state != DEV_STATE_CAPTURING
|
||||||
&& dev->state != DEV_STATE_CAPTURE_DONE);
|
&& dev->state != DEV_STATE_CAPTURE_DONE);
|
||||||
|
|
|
@ -833,7 +833,7 @@ API_EXPORTED int fp_init(void)
|
||||||
{
|
{
|
||||||
char *dbg = getenv("LIBFPRINT_DEBUG");
|
char *dbg = getenv("LIBFPRINT_DEBUG");
|
||||||
int r;
|
int r;
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
r = libusb_init(&fpi_usb_ctx);
|
r = libusb_init(&fpi_usb_ctx);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
|
@ -861,7 +861,7 @@ API_EXPORTED int fp_init(void)
|
||||||
*/
|
*/
|
||||||
API_EXPORTED void fp_exit(void)
|
API_EXPORTED void fp_exit(void)
|
||||||
{
|
{
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
if (opened_devices) {
|
if (opened_devices) {
|
||||||
GSList *copy = g_slist_copy(opened_devices);
|
GSList *copy = g_slist_copy(opened_devices);
|
||||||
|
|
|
@ -147,7 +147,7 @@ API_EXPORTED size_t fp_print_data_get_data(struct fp_print_data *data,
|
||||||
GSList *list_item;
|
GSList *list_item;
|
||||||
unsigned char *buf;
|
unsigned char *buf;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
list_item = data->prints;
|
list_item = data->prints;
|
||||||
while (list_item) {
|
while (list_item) {
|
||||||
|
|
|
@ -701,7 +701,7 @@ static void capture_sm_complete(struct fpi_ssm *ssm)
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
struct aes1610_dev *aesdev = dev->priv;
|
struct aes1610_dev *aesdev = dev->priv;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
if (aesdev->deactivating)
|
if (aesdev->deactivating)
|
||||||
complete_deactivation(dev);
|
complete_deactivation(dev);
|
||||||
else if (ssm->error)
|
else if (ssm->error)
|
||||||
|
@ -722,7 +722,7 @@ static void start_capture(struct fp_img_dev *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
ssm = fpi_ssm_new(dev->dev, capture_run_state, CAPTURE_NUM_STATES);
|
ssm = fpi_ssm_new(dev->dev, capture_run_state, CAPTURE_NUM_STATES);
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
ssm->priv = dev;
|
ssm->priv = dev;
|
||||||
fpi_ssm_start(ssm, capture_sm_complete);
|
fpi_ssm_start(ssm, capture_sm_complete);
|
||||||
}
|
}
|
||||||
|
@ -791,7 +791,7 @@ static void dev_deactivate(struct fp_img_dev *dev)
|
||||||
static void complete_deactivation(struct fp_img_dev *dev)
|
static void complete_deactivation(struct fp_img_dev *dev)
|
||||||
{
|
{
|
||||||
struct aes1610_dev *aesdev = dev->priv;
|
struct aes1610_dev *aesdev = dev->priv;
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
/* FIXME: if we're in the middle of a scan, we should cancel the scan.
|
/* FIXME: if we're in the middle of a scan, we should cancel the scan.
|
||||||
* maybe we can do this with a master reset, unconditionally? */
|
* maybe we can do this with a master reset, unconditionally? */
|
||||||
|
|
|
@ -155,7 +155,7 @@ static void read_regs(struct fp_img_dev *dev, aes2501_read_regs_cb callback,
|
||||||
struct aes_regwrite *regwrite = g_malloc(sizeof(*regwrite));
|
struct aes_regwrite *regwrite = g_malloc(sizeof(*regwrite));
|
||||||
struct aes2501_read_regs *rdata = g_malloc(sizeof(*rdata));
|
struct aes2501_read_regs *rdata = g_malloc(sizeof(*rdata));
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
regwrite->reg = AES2501_REG_CTRL2;
|
regwrite->reg = AES2501_REG_CTRL2;
|
||||||
regwrite->value = AES2501_CTRL2_READ_REGS;
|
regwrite->value = AES2501_CTRL2_READ_REGS;
|
||||||
rdata->dev = dev;
|
rdata->dev = dev;
|
||||||
|
@ -354,7 +354,7 @@ static void finger_det_reqs_cb(struct fp_img_dev *dev, int result,
|
||||||
static void start_finger_detection(struct fp_img_dev *dev)
|
static void start_finger_detection(struct fp_img_dev *dev)
|
||||||
{
|
{
|
||||||
struct aes2501_dev *aesdev = dev->priv;
|
struct aes2501_dev *aesdev = dev->priv;
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
if (aesdev->deactivating) {
|
if (aesdev->deactivating) {
|
||||||
complete_deactivation(dev);
|
complete_deactivation(dev);
|
||||||
|
@ -583,7 +583,7 @@ static void capture_sm_complete(struct fpi_ssm *ssm)
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
struct aes2501_dev *aesdev = dev->priv;
|
struct aes2501_dev *aesdev = dev->priv;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
if (aesdev->deactivating)
|
if (aesdev->deactivating)
|
||||||
complete_deactivation(dev);
|
complete_deactivation(dev);
|
||||||
else if (ssm->error)
|
else if (ssm->error)
|
||||||
|
@ -607,7 +607,7 @@ static void start_capture(struct fp_img_dev *dev)
|
||||||
/* Reset gain */
|
/* Reset gain */
|
||||||
strip_scan_reqs[4].value = AES2501_ADREFHI_MAX_VALUE;
|
strip_scan_reqs[4].value = AES2501_ADREFHI_MAX_VALUE;
|
||||||
ssm = fpi_ssm_new(dev->dev, capture_run_state, CAPTURE_NUM_STATES);
|
ssm = fpi_ssm_new(dev->dev, capture_run_state, CAPTURE_NUM_STATES);
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
ssm->priv = dev;
|
ssm->priv = dev;
|
||||||
fpi_ssm_start(ssm, capture_sm_complete);
|
fpi_ssm_start(ssm, capture_sm_complete);
|
||||||
}
|
}
|
||||||
|
@ -831,7 +831,7 @@ static void dev_deactivate(struct fp_img_dev *dev)
|
||||||
static void complete_deactivation(struct fp_img_dev *dev)
|
static void complete_deactivation(struct fp_img_dev *dev)
|
||||||
{
|
{
|
||||||
struct aes2501_dev *aesdev = dev->priv;
|
struct aes2501_dev *aesdev = dev->priv;
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
/* FIXME: if we're in the middle of a scan, we should cancel the scan.
|
/* FIXME: if we're in the middle of a scan, we should cancel the scan.
|
||||||
* maybe we can do this with a master reset, unconditionally? */
|
* maybe we can do this with a master reset, unconditionally? */
|
||||||
|
|
|
@ -159,7 +159,7 @@ static void start_finger_detection(struct fp_img_dev *dev)
|
||||||
int r;
|
int r;
|
||||||
struct aes2550_dev *aesdev = dev->priv;
|
struct aes2550_dev *aesdev = dev->priv;
|
||||||
struct libusb_transfer *transfer;
|
struct libusb_transfer *transfer;
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
if (aesdev->deactivating) {
|
if (aesdev->deactivating) {
|
||||||
complete_deactivation(dev);
|
complete_deactivation(dev);
|
||||||
|
@ -421,7 +421,7 @@ static void start_capture(struct fp_img_dev *dev)
|
||||||
|
|
||||||
aesdev->heartbeat_cnt = 0;
|
aesdev->heartbeat_cnt = 0;
|
||||||
ssm = fpi_ssm_new(dev->dev, capture_run_state, CAPTURE_NUM_STATES);
|
ssm = fpi_ssm_new(dev->dev, capture_run_state, CAPTURE_NUM_STATES);
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
ssm->priv = dev;
|
ssm->priv = dev;
|
||||||
fpi_ssm_start(ssm, capture_sm_complete);
|
fpi_ssm_start(ssm, capture_sm_complete);
|
||||||
}
|
}
|
||||||
|
@ -606,7 +606,7 @@ static void dev_deactivate(struct fp_img_dev *dev)
|
||||||
static void complete_deactivation(struct fp_img_dev *dev)
|
static void complete_deactivation(struct fp_img_dev *dev)
|
||||||
{
|
{
|
||||||
struct aes2550_dev *aesdev = dev->priv;
|
struct aes2550_dev *aesdev = dev->priv;
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
aesdev->deactivating = FALSE;
|
aesdev->deactivating = FALSE;
|
||||||
g_slist_free(aesdev->strips);
|
g_slist_free(aesdev->strips);
|
||||||
|
|
|
@ -437,7 +437,7 @@ static void start_capture(struct fp_img_dev *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
ssm = fpi_ssm_new(dev->dev, capture_run_state, CAPTURE_NUM_STATES);
|
ssm = fpi_ssm_new(dev->dev, capture_run_state, CAPTURE_NUM_STATES);
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
ssm->priv = dev;
|
ssm->priv = dev;
|
||||||
fpi_ssm_start(ssm, capture_sm_complete);
|
fpi_ssm_start(ssm, capture_sm_complete);
|
||||||
}
|
}
|
||||||
|
@ -623,7 +623,7 @@ void aesX660_dev_deactivate(struct fp_img_dev *dev)
|
||||||
static void complete_deactivation(struct fp_img_dev *dev)
|
static void complete_deactivation(struct fp_img_dev *dev)
|
||||||
{
|
{
|
||||||
struct aesX660_dev *aesdev = dev->priv;
|
struct aesX660_dev *aesdev = dev->priv;
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
aesdev->deactivating = FALSE;
|
aesdev->deactivating = FALSE;
|
||||||
g_slist_free(aesdev->strips);
|
g_slist_free(aesdev->strips);
|
||||||
|
|
|
@ -62,7 +62,7 @@ struct elan_dev {
|
||||||
|
|
||||||
static void elan_dev_reset(struct elan_dev *elandev)
|
static void elan_dev_reset(struct elan_dev *elandev)
|
||||||
{
|
{
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
BUG_ON(elandev->cur_transfer);
|
BUG_ON(elandev->cur_transfer);
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ static void elan_save_frame(struct fp_img_dev *dev)
|
||||||
unsigned short *frame =
|
unsigned short *frame =
|
||||||
g_malloc(elandev->frame_width * elandev->frame_height * 2);
|
g_malloc(elandev->frame_width * elandev->frame_height * 2);
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
/* Raw images are vertical and perpendicular to swipe direction of a
|
/* Raw images are vertical and perpendicular to swipe direction of a
|
||||||
* normalized image, which means we need to make them horizontal before
|
* normalized image, which means we need to make them horizontal before
|
||||||
|
@ -116,7 +116,7 @@ static void elan_process_frame(unsigned short *raw_frame, GSList ** frames)
|
||||||
struct fpi_frame *frame =
|
struct fpi_frame *frame =
|
||||||
g_malloc(frame_size + sizeof(struct fpi_frame));
|
g_malloc(frame_size + sizeof(struct fpi_frame));
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
unsigned short min = 0xffff, max = 0;
|
unsigned short min = 0xffff, max = 0;
|
||||||
for (int i = 0; i < frame_size; i++) {
|
for (int i = 0; i < frame_size; i++) {
|
||||||
|
@ -147,7 +147,7 @@ static void elan_submit_image(struct fp_img_dev *dev)
|
||||||
GSList *frames = NULL;
|
GSList *frames = NULL;
|
||||||
struct fp_img *img;
|
struct fp_img *img;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
for (int i = 0; i < ELAN_SKIP_LAST_FRAMES; i++)
|
for (int i = 0; i < ELAN_SKIP_LAST_FRAMES; i++)
|
||||||
elandev->frames = g_slist_next(elandev->frames);
|
elandev->frames = g_slist_next(elandev->frames);
|
||||||
|
@ -170,7 +170,7 @@ static void elan_cmd_done(struct fpi_ssm *ssm)
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
struct elan_dev *elandev = dev->priv;
|
struct elan_dev *elandev = dev->priv;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
elandev->cmd_idx += 1;
|
elandev->cmd_idx += 1;
|
||||||
if (elandev->cmd_idx < elandev->cmds_len)
|
if (elandev->cmd_idx < elandev->cmds_len)
|
||||||
|
@ -185,7 +185,7 @@ static void elan_cmd_cb(struct libusb_transfer *transfer)
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
struct elan_dev *elandev = dev->priv;
|
struct elan_dev *elandev = dev->priv;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
elandev->cur_transfer = NULL;
|
elandev->cur_transfer = NULL;
|
||||||
|
|
||||||
|
@ -228,7 +228,7 @@ static void elan_cmd_read(struct fpi_ssm *ssm)
|
||||||
struct elan_dev *elandev = dev->priv;
|
struct elan_dev *elandev = dev->priv;
|
||||||
int response_len = elandev->cmds[elandev->cmd_idx].response_len;
|
int response_len = elandev->cmds[elandev->cmd_idx].response_len;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
if (elandev->cmds[elandev->cmd_idx].cmd == read_cmds[0].cmd)
|
if (elandev->cmds[elandev->cmd_idx].cmd == read_cmds[0].cmd)
|
||||||
/* raw data has 2-byte "pixels" and the frame is vertical */
|
/* raw data has 2-byte "pixels" and the frame is vertical */
|
||||||
|
@ -260,7 +260,7 @@ static void elan_run_next_cmd(struct fpi_ssm *ssm)
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
struct elan_dev *elandev = dev->priv;
|
struct elan_dev *elandev = dev->priv;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
struct libusb_transfer *transfer = libusb_alloc_transfer(0);
|
struct libusb_transfer *transfer = libusb_alloc_transfer(0);
|
||||||
if (!transfer) {
|
if (!transfer) {
|
||||||
|
@ -287,7 +287,7 @@ static void elan_run_cmds(struct fpi_ssm *ssm, const struct elan_cmd *cmds,
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
struct elan_dev *elandev = dev->priv;
|
struct elan_dev *elandev = dev->priv;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
elandev->cmds = cmds;
|
elandev->cmds = cmds;
|
||||||
elandev->cmds_len = cmds_len;
|
elandev->cmds_len = cmds_len;
|
||||||
|
@ -323,7 +323,7 @@ static void elan_deactivate(struct fp_img_dev *dev)
|
||||||
{
|
{
|
||||||
struct elan_dev *elandev = dev->priv;
|
struct elan_dev *elandev = dev->priv;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
elan_dev_reset(elandev);
|
elan_dev_reset(elandev);
|
||||||
|
|
||||||
|
@ -386,7 +386,7 @@ static void capture_complete(struct fpi_ssm *ssm)
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
struct elan_dev *elandev = dev->priv;
|
struct elan_dev *elandev = dev->priv;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
if (elandev->deactivating)
|
if (elandev->deactivating)
|
||||||
elan_deactivate(dev);
|
elan_deactivate(dev);
|
||||||
|
@ -423,7 +423,7 @@ static void elan_capture(struct fp_img_dev *dev)
|
||||||
{
|
{
|
||||||
struct elan_dev *elandev = dev->priv;
|
struct elan_dev *elandev = dev->priv;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
elan_dev_reset(elandev);
|
elan_dev_reset(elandev);
|
||||||
struct fpi_ssm *ssm =
|
struct fpi_ssm *ssm =
|
||||||
|
@ -466,7 +466,7 @@ static void calibrate_complete(struct fpi_ssm *ssm)
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
struct elan_dev *elandev = dev->priv;
|
struct elan_dev *elandev = dev->priv;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
if (elandev->deactivating)
|
if (elandev->deactivating)
|
||||||
elan_deactivate(dev);
|
elan_deactivate(dev);
|
||||||
|
@ -483,7 +483,7 @@ static void elan_calibrate(struct fp_img_dev *dev)
|
||||||
{
|
{
|
||||||
struct elan_dev *elandev = dev->priv;
|
struct elan_dev *elandev = dev->priv;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
elan_dev_reset(elandev);
|
elan_dev_reset(elandev);
|
||||||
struct fpi_ssm *ssm = fpi_ssm_new(dev->dev, elan_calibrate_run_state,
|
struct fpi_ssm *ssm = fpi_ssm_new(dev->dev, elan_calibrate_run_state,
|
||||||
|
@ -536,7 +536,7 @@ static void activate_complete(struct fpi_ssm *ssm)
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
struct elan_dev *elandev = dev->priv;
|
struct elan_dev *elandev = dev->priv;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
if (elandev->deactivating)
|
if (elandev->deactivating)
|
||||||
elan_deactivate(dev);
|
elan_deactivate(dev);
|
||||||
|
@ -551,7 +551,7 @@ static int dev_activate(struct fp_img_dev *dev, enum fp_imgdev_state state)
|
||||||
{
|
{
|
||||||
struct elan_dev *elandev = dev->priv;
|
struct elan_dev *elandev = dev->priv;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
elan_dev_reset(elandev);
|
elan_dev_reset(elandev);
|
||||||
struct fpi_ssm *ssm =
|
struct fpi_ssm *ssm =
|
||||||
|
@ -567,7 +567,7 @@ static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
|
||||||
struct elan_dev *elandev;
|
struct elan_dev *elandev;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
r = libusb_claim_interface(dev->udev, 0);
|
r = libusb_claim_interface(dev->udev, 0);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
|
@ -584,7 +584,7 @@ static void dev_deinit(struct fp_img_dev *dev)
|
||||||
{
|
{
|
||||||
struct elan_dev *elandev = dev->priv;
|
struct elan_dev *elandev = dev->priv;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
elan_dev_reset(elandev);
|
elan_dev_reset(elandev);
|
||||||
g_free(elandev);
|
g_free(elandev);
|
||||||
|
@ -596,7 +596,7 @@ static void dev_deactivate(struct fp_img_dev *dev)
|
||||||
{
|
{
|
||||||
struct elan_dev *elandev = dev->priv;
|
struct elan_dev *elandev = dev->priv;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
elandev->deactivating = TRUE;
|
elandev->deactivating = TRUE;
|
||||||
|
|
||||||
|
|
|
@ -730,7 +730,7 @@ static void sm_await_intr(struct fpi_ssm *ssm)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
data = g_malloc(4);
|
data = g_malloc(4);
|
||||||
libusb_fill_interrupt_transfer(transfer, dev->udev, 0x83, data, 4,
|
libusb_fill_interrupt_transfer(transfer, dev->udev, 0x83, data, 4,
|
||||||
sm_await_intr_cb, ssm, 0);
|
sm_await_intr_cb, ssm, 0);
|
||||||
|
@ -1224,7 +1224,7 @@ static void deactivate_done(struct fp_img_dev *dev)
|
||||||
{
|
{
|
||||||
struct sonly_dev *sdev = dev->priv;
|
struct sonly_dev *sdev = dev->priv;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
free_img_transfers(sdev);
|
free_img_transfers(sdev);
|
||||||
g_free(sdev->rowbuf);
|
g_free(sdev->rowbuf);
|
||||||
sdev->rowbuf = NULL;
|
sdev->rowbuf = NULL;
|
||||||
|
|
|
@ -256,7 +256,7 @@ static void start_finger_detection(struct fp_img_dev *dev)
|
||||||
int r;
|
int r;
|
||||||
struct upektc_dev *upekdev = dev->priv;
|
struct upektc_dev *upekdev = dev->priv;
|
||||||
struct libusb_transfer *transfer;
|
struct libusb_transfer *transfer;
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
if (upekdev->deactivating) {
|
if (upekdev->deactivating) {
|
||||||
complete_deactivation(dev);
|
complete_deactivation(dev);
|
||||||
|
@ -401,7 +401,7 @@ static void start_capture(struct fp_img_dev *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
ssm = fpi_ssm_new(dev->dev, capture_run_state, CAPTURE_NUM_STATES);
|
ssm = fpi_ssm_new(dev->dev, capture_run_state, CAPTURE_NUM_STATES);
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
ssm->priv = dev;
|
ssm->priv = dev;
|
||||||
fpi_ssm_start(ssm, capture_sm_complete);
|
fpi_ssm_start(ssm, capture_sm_complete);
|
||||||
}
|
}
|
||||||
|
@ -427,7 +427,7 @@ static void dev_deactivate(struct fp_img_dev *dev)
|
||||||
static void complete_deactivation(struct fp_img_dev *dev)
|
static void complete_deactivation(struct fp_img_dev *dev)
|
||||||
{
|
{
|
||||||
struct upektc_dev *upekdev = dev->priv;
|
struct upektc_dev *upekdev = dev->priv;
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
upekdev->deactivating = FALSE;
|
upekdev->deactivating = FALSE;
|
||||||
fpi_imgdev_deactivate_complete(dev);
|
fpi_imgdev_deactivate_complete(dev);
|
||||||
|
|
|
@ -366,7 +366,7 @@ static void sm_do_challenge_response(struct fpi_ssm *ssm)
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
r = read_regs(dev, REG_CHALLENGE, CR_LENGTH, challenge_cb, ssm);
|
r = read_regs(dev, REG_CHALLENGE, CR_LENGTH, challenge_cb, ssm);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
fpi_ssm_mark_aborted(ssm, r);
|
fpi_ssm_mark_aborted(ssm, r);
|
||||||
|
|
|
@ -256,7 +256,7 @@ static void sm_do_capture(struct fpi_ssm *ssm)
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
struct v5s_dev *vdev = dev->priv;
|
struct v5s_dev *vdev = dev->priv;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
vdev->capture_img = fpi_img_new_for_imgdev(dev);
|
vdev->capture_img = fpi_img_new_for_imgdev(dev);
|
||||||
vdev->capture_iteration = 0;
|
vdev->capture_iteration = 0;
|
||||||
capture_iterate(ssm);
|
capture_iterate(ssm);
|
||||||
|
|
|
@ -589,7 +589,7 @@ static void vfs_abort_print(struct fpi_ssm *ssm)
|
||||||
{
|
{
|
||||||
unsigned char data[0x06] = { 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00 };
|
unsigned char data[0x06] = { 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00 };
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
/* Run swap sequential state machine */
|
/* Run swap sequential state machine */
|
||||||
m_swap (ssm, data, 0x06);
|
m_swap (ssm, data, 0x06);
|
||||||
|
@ -622,7 +622,7 @@ static void vfs_get_finger_state(struct fpi_ssm *ssm)
|
||||||
{
|
{
|
||||||
unsigned char data[0x06] = { 0x00, 0x00, 0x00, 0x00, 0x16, 0x00 };
|
unsigned char data[0x06] = { 0x00, 0x00, 0x00, 0x00, 0x16, 0x00 };
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
/* Run swap sequential state machine */
|
/* Run swap sequential state machine */
|
||||||
m_swap (ssm, data, 0x06);
|
m_swap (ssm, data, 0x06);
|
||||||
|
@ -634,7 +634,7 @@ static void vfs_img_load(struct fpi_ssm *ssm)
|
||||||
struct fp_img_dev *dev = ssm->priv;
|
struct fp_img_dev *dev = ssm->priv;
|
||||||
struct vfs101_dev *vdev = dev->priv;
|
struct vfs101_dev *vdev = dev->priv;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
/* Reset buffer length */
|
/* Reset buffer length */
|
||||||
vdev->length = 0;
|
vdev->length = 0;
|
||||||
|
|
|
@ -231,7 +231,7 @@ void fpi_imgdev_image_captured(struct fp_img_dev *imgdev, struct fp_img *img)
|
||||||
{
|
{
|
||||||
struct fp_print_data *print;
|
struct fp_print_data *print;
|
||||||
int r;
|
int r;
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
if (imgdev->action_state != IMG_ACQUIRE_STATE_AWAIT_IMAGE) {
|
if (imgdev->action_state != IMG_ACQUIRE_STATE_AWAIT_IMAGE) {
|
||||||
fp_dbg("ignoring due to current state %d", imgdev->action_state);
|
fp_dbg("ignoring due to current state %d", imgdev->action_state);
|
||||||
|
@ -360,7 +360,7 @@ void fpi_imgdev_activate_complete(struct fp_img_dev *imgdev, int status)
|
||||||
|
|
||||||
void fpi_imgdev_deactivate_complete(struct fp_img_dev *imgdev)
|
void fpi_imgdev_deactivate_complete(struct fp_img_dev *imgdev)
|
||||||
{
|
{
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
switch (imgdev->action) {
|
switch (imgdev->action) {
|
||||||
case IMG_ACTION_ENROLL:
|
case IMG_ACTION_ENROLL:
|
||||||
|
|
|
@ -126,7 +126,7 @@ struct fpi_timeout *fpi_timeout_add(unsigned int msec, fpi_timeout_fn callback,
|
||||||
|
|
||||||
void fpi_timeout_cancel(struct fpi_timeout *timeout)
|
void fpi_timeout_cancel(struct fpi_timeout *timeout)
|
||||||
{
|
{
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
active_timers = g_slist_remove(active_timers, timeout);
|
active_timers = g_slist_remove(active_timers, timeout);
|
||||||
g_free(timeout);
|
g_free(timeout);
|
||||||
}
|
}
|
||||||
|
@ -172,7 +172,7 @@ static int get_next_timeout_expiry(struct timeval *out,
|
||||||
/* handle a timeout that has expired */
|
/* handle a timeout that has expired */
|
||||||
static void handle_timeout(struct fpi_timeout *timeout)
|
static void handle_timeout(struct fpi_timeout *timeout)
|
||||||
{
|
{
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
timeout->callback(timeout->data);
|
timeout->callback(timeout->data);
|
||||||
active_timers = g_slist_remove(active_timers, timeout);
|
active_timers = g_slist_remove(active_timers, timeout);
|
||||||
g_free(timeout);
|
g_free(timeout);
|
||||||
|
|
|
@ -53,7 +53,7 @@ API_EXPORTED struct fp_dev *fp_dev_open(struct fp_dscv_dev *ddev)
|
||||||
struct sync_open_data *odata = g_malloc0(sizeof(*odata));
|
struct sync_open_data *odata = g_malloc0(sizeof(*odata));
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
r = fp_async_dev_open(ddev, sync_open_cb, odata);
|
r = fp_async_dev_open(ddev, sync_open_cb, odata);
|
||||||
if (r)
|
if (r)
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -74,7 +74,7 @@ out:
|
||||||
|
|
||||||
static void sync_close_cb(struct fp_dev *dev, void *user_data)
|
static void sync_close_cb(struct fp_dev *dev, void *user_data)
|
||||||
{
|
{
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
gboolean *closed = user_data;
|
gboolean *closed = user_data;
|
||||||
*closed = TRUE;
|
*closed = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ API_EXPORTED void fp_dev_close(struct fp_dev *dev)
|
||||||
if (!dev)
|
if (!dev)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
fp_async_dev_close(dev, sync_close_cb, &closed);
|
fp_async_dev_close(dev, sync_close_cb, &closed);
|
||||||
while (!closed)
|
while (!closed)
|
||||||
if (fp_handle_events() < 0)
|
if (fp_handle_events() < 0)
|
||||||
|
@ -121,7 +121,7 @@ static void sync_enroll_cb(struct fp_dev *dev, int result,
|
||||||
static void enroll_stop_cb(struct fp_dev *dev, void *user_data)
|
static void enroll_stop_cb(struct fp_dev *dev, void *user_data)
|
||||||
{
|
{
|
||||||
gboolean *stopped = user_data;
|
gboolean *stopped = user_data;
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
*stopped = TRUE;
|
*stopped = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ API_EXPORTED int fp_enroll_finger_img(struct fp_dev *dev,
|
||||||
gboolean stopped = FALSE;
|
gboolean stopped = FALSE;
|
||||||
struct sync_enroll_data *edata = NULL;
|
struct sync_enroll_data *edata = NULL;
|
||||||
int r;
|
int r;
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
|
|
||||||
/* FIXME __enroll_stage is ugly, can we replace it by some function that
|
/* FIXME __enroll_stage is ugly, can we replace it by some function that
|
||||||
* says whether we're enrolling or not, and then put __enroll_stage into
|
* says whether we're enrolling or not, and then put __enroll_stage into
|
||||||
|
@ -324,7 +324,7 @@ static void sync_verify_cb(struct fp_dev *dev, int result, struct fp_img *img,
|
||||||
static void verify_stop_cb(struct fp_dev *dev, void *user_data)
|
static void verify_stop_cb(struct fp_dev *dev, void *user_data)
|
||||||
{
|
{
|
||||||
gboolean *stopped = user_data;
|
gboolean *stopped = user_data;
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
*stopped = TRUE;
|
*stopped = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -460,7 +460,7 @@ static void sync_identify_cb(struct fp_dev *dev, int result,
|
||||||
static void identify_stop_cb(struct fp_dev *dev, void *user_data)
|
static void identify_stop_cb(struct fp_dev *dev, void *user_data)
|
||||||
{
|
{
|
||||||
gboolean *stopped = user_data;
|
gboolean *stopped = user_data;
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
*stopped = TRUE;
|
*stopped = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -605,7 +605,7 @@ static void sync_capture_cb(struct fp_dev *dev, int result, struct fp_img *img,
|
||||||
static void capture_stop_cb(struct fp_dev *dev, void *user_data)
|
static void capture_stop_cb(struct fp_dev *dev, void *user_data)
|
||||||
{
|
{
|
||||||
gboolean *stopped = user_data;
|
gboolean *stopped = user_data;
|
||||||
fp_dbg("");
|
G_DEBUG_HERE();
|
||||||
*stopped = TRUE;
|
*stopped = TRUE;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue