Commit 363a1b33 authored by Bastien Nocera's avatar Bastien Nocera

lib: Replace empty fp_dbg() calls

GLib won't like them, so use G_DEBUG_HERE() instead.
parent c376c6fb
...@@ -52,7 +52,7 @@ API_EXPORTED int fp_async_dev_open(struct fp_dscv_dev *ddev, fp_dev_open_cb call ...@@ -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 ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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) ...@@ -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) ...@@ -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, ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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, ...@@ -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, ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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 { ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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, ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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;