Commit 48b9e6c5 authored by Bastien Nocera's avatar Bastien Nocera

lib: Typedef fpi_ssm

parent 5ae2ef54
......@@ -101,7 +101,7 @@ static void stub_capture_stop_cb(struct fp_img_dev *dev, int result, void *user_
/* check that read succeeded but ignore all data */
static void generic_ignore_data_cb(struct libusb_transfer *transfer)
{
struct fpi_ssm *ssm = transfer->user_data;
fpi_ssm *ssm = transfer->user_data;
if (transfer->status != LIBUSB_TRANSFER_COMPLETED)
fpi_ssm_mark_aborted(ssm, -EIO);
......@@ -117,7 +117,7 @@ static void generic_ignore_data_cb(struct libusb_transfer *transfer)
static void generic_write_regv_cb(struct fp_img_dev *dev, int result,
void *user_data)
{
struct fpi_ssm *ssm = user_data;
fpi_ssm *ssm = user_data;
if (result == 0)
fpi_ssm_next_state(ssm);
else
......@@ -126,7 +126,7 @@ static void generic_write_regv_cb(struct fp_img_dev *dev, int result,
/* read the specified number of bytes from the IN endpoint but throw them
* away, then increment the SSM */
static void generic_read_ignore_data(struct fpi_ssm *ssm, size_t bytes)
static void generic_read_ignore_data(fpi_ssm *ssm, size_t bytes)
{
struct libusb_transfer *transfer = libusb_alloc_transfer(0);
unsigned char *data;
......@@ -557,7 +557,7 @@ enum capture_states {
static void capture_read_strip_cb(struct libusb_transfer *transfer)
{
unsigned char *stripdata;
struct fpi_ssm *ssm = transfer->user_data;
fpi_ssm *ssm = transfer->user_data;
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aes1610_dev *aesdev = fpi_imgdev_get_user_data(dev);
unsigned char *data = transfer->buffer;
......@@ -643,7 +643,7 @@ out:
libusb_free_transfer(transfer);
}
static void capture_run_state(struct fpi_ssm *ssm)
static void capture_run_state(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aes1610_dev *aesdev = fpi_imgdev_get_user_data(dev);
......@@ -690,7 +690,7 @@ static void capture_run_state(struct fpi_ssm *ssm)
};
}
static void capture_sm_complete(struct fpi_ssm *ssm)
static void capture_sm_complete(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aes1610_dev *aesdev = fpi_imgdev_get_user_data(dev);
......@@ -708,7 +708,7 @@ static void capture_sm_complete(struct fpi_ssm *ssm)
static void start_capture(struct fp_img_dev *dev)
{
struct aes1610_dev *aesdev = fpi_imgdev_get_user_data(dev);
struct fpi_ssm *ssm;
fpi_ssm *ssm;
if (aesdev->deactivating) {
complete_deactivation(dev);
......@@ -738,7 +738,7 @@ enum activate_states {
ACTIVATE_NUM_STATES,
};
static void activate_run_state(struct fpi_ssm *ssm)
static void activate_run_state(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
......@@ -753,7 +753,7 @@ static void activate_run_state(struct fpi_ssm *ssm)
}
/* jump to finger detection */
static void activate_sm_complete(struct fpi_ssm *ssm)
static void activate_sm_complete(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
fp_dbg("status %d", fpi_ssm_get_error(ssm));
......@@ -767,7 +767,7 @@ static void activate_sm_complete(struct fpi_ssm *ssm)
static int dev_activate(struct fp_img_dev *dev, enum fp_imgdev_state state)
{
struct aes1610_dev *aesdev = fpi_imgdev_get_user_data(dev);
struct fpi_ssm *ssm = fpi_ssm_new(fpi_imgdev_get_dev(dev), activate_run_state,
fpi_ssm *ssm = fpi_ssm_new(fpi_imgdev_get_dev(dev), activate_run_state,
ACTIVATE_NUM_STATES);
fpi_ssm_set_user_data(ssm, dev);
aesdev->read_regs_retry_count = 0;
......
......@@ -180,7 +180,7 @@ static int regval_from_dump(unsigned char *data, uint8_t target)
static void generic_write_regv_cb(struct fp_img_dev *dev, int result,
void *user_data)
{
struct fpi_ssm *ssm = user_data;
fpi_ssm *ssm = user_data;
if (result == 0)
fpi_ssm_next_state(ssm);
else
......@@ -190,7 +190,7 @@ static void generic_write_regv_cb(struct fp_img_dev *dev, int result,
/* check that read succeeded but ignore all data */
static void generic_ignore_data_cb(struct libusb_transfer *transfer)
{
struct fpi_ssm *ssm = transfer->user_data;
fpi_ssm *ssm = transfer->user_data;
if (transfer->status != LIBUSB_TRANSFER_COMPLETED)
fpi_ssm_mark_aborted(ssm, -EIO);
......@@ -205,7 +205,7 @@ static void generic_ignore_data_cb(struct libusb_transfer *transfer)
/* read the specified number of bytes from the IN endpoint but throw them
* away, then increment the SSM */
static void generic_read_ignore_data(struct fpi_ssm *ssm, size_t bytes)
static void generic_read_ignore_data(fpi_ssm *ssm, size_t bytes)
{
struct libusb_transfer *transfer = libusb_alloc_transfer(0);
unsigned char *data;
......@@ -436,7 +436,7 @@ enum capture_states {
static void capture_read_strip_cb(struct libusb_transfer *transfer)
{
unsigned char *stripdata;
struct fpi_ssm *ssm = transfer->user_data;
fpi_ssm *ssm = transfer->user_data;
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aes2501_dev *aesdev = fpi_imgdev_get_user_data(dev);
unsigned char *data = transfer->buffer;
......@@ -520,7 +520,7 @@ out:
libusb_free_transfer(transfer);
}
static void capture_run_state(struct fpi_ssm *ssm)
static void capture_run_state(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aes2501_dev *aesdev = fpi_imgdev_get_user_data(dev);
......@@ -571,7 +571,7 @@ static void capture_run_state(struct fpi_ssm *ssm)
};
}
static void capture_sm_complete(struct fpi_ssm *ssm)
static void capture_sm_complete(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aes2501_dev *aesdev = fpi_imgdev_get_user_data(dev);
......@@ -589,7 +589,7 @@ static void capture_sm_complete(struct fpi_ssm *ssm)
static void start_capture(struct fp_img_dev *dev)
{
struct aes2501_dev *aesdev = fpi_imgdev_get_user_data(dev);
struct fpi_ssm *ssm;
fpi_ssm *ssm;
if (aesdev->deactivating) {
complete_deactivation(dev);
......@@ -713,7 +713,7 @@ enum activate_states {
void activate_read_regs_cb(struct fp_img_dev *dev, int status,
unsigned char *regs, void *user_data)
{
struct fpi_ssm *ssm = user_data;
fpi_ssm *ssm = user_data;
struct aes2501_dev *aesdev = fpi_imgdev_get_user_data(dev);
if (status != 0) {
......@@ -730,14 +730,14 @@ void activate_read_regs_cb(struct fp_img_dev *dev, int status,
static void activate_init3_cb(struct fp_img_dev *dev, int result,
void *user_data)
{
struct fpi_ssm *ssm = user_data;
fpi_ssm *ssm = user_data;
if (result == 0)
fpi_ssm_jump_to_state(ssm, READ_REGS);
else
fpi_ssm_mark_aborted(ssm, result);
}
static void activate_run_state(struct fpi_ssm *ssm)
static void activate_run_state(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
......@@ -791,7 +791,7 @@ static void activate_run_state(struct fpi_ssm *ssm)
}
}
static void activate_sm_complete(struct fpi_ssm *ssm)
static void activate_sm_complete(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
fp_dbg("status %d", fpi_ssm_get_error(ssm));
......@@ -805,7 +805,7 @@ static void activate_sm_complete(struct fpi_ssm *ssm)
static int dev_activate(struct fp_img_dev *dev, enum fp_imgdev_state state)
{
struct aes2501_dev *aesdev = fpi_imgdev_get_user_data(dev);
struct fpi_ssm *ssm = fpi_ssm_new(fpi_imgdev_get_dev(dev), activate_run_state,
fpi_ssm *ssm = fpi_ssm_new(fpi_imgdev_get_dev(dev), activate_run_state,
ACTIVATE_NUM_STATES);
fpi_ssm_set_user_data(ssm, dev);
aesdev->read_regs_retry_count = 0;
......
......@@ -200,7 +200,7 @@ enum capture_states {
};
/* Returns number of processed bytes */
static int process_strip_data(struct fpi_ssm *ssm, unsigned char *data)
static int process_strip_data(fpi_ssm *ssm, unsigned char *data)
{
unsigned char *stripdata;
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
......@@ -231,7 +231,7 @@ static int process_strip_data(struct fpi_ssm *ssm, unsigned char *data)
static void capture_reqs_cb(struct libusb_transfer *transfer)
{
struct fpi_ssm *ssm = transfer->user_data;
fpi_ssm *ssm = transfer->user_data;
if ((transfer->status == LIBUSB_TRANSFER_COMPLETED) &&
(transfer->length == transfer->actual_length)) {
......@@ -244,7 +244,7 @@ static void capture_reqs_cb(struct libusb_transfer *transfer)
static void capture_set_idle_reqs_cb(struct libusb_transfer *transfer)
{
struct fpi_ssm *ssm = transfer->user_data;
fpi_ssm *ssm = transfer->user_data;
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aes2550_dev *aesdev = fpi_imgdev_get_user_data(dev);
......@@ -272,7 +272,7 @@ static void capture_set_idle_reqs_cb(struct libusb_transfer *transfer)
static void capture_read_data_cb(struct libusb_transfer *transfer)
{
struct fpi_ssm *ssm = transfer->user_data;
fpi_ssm *ssm = transfer->user_data;
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aes2550_dev *aesdev = fpi_imgdev_get_user_data(dev);
unsigned char *data = transfer->buffer;
......@@ -323,7 +323,7 @@ out:
libusb_free_transfer(transfer);
}
static void capture_run_state(struct fpi_ssm *ssm)
static void capture_run_state(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
int r;
......@@ -386,7 +386,7 @@ static void capture_run_state(struct fpi_ssm *ssm)
};
}
static void capture_sm_complete(struct fpi_ssm *ssm)
static void capture_sm_complete(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aes2550_dev *aesdev = fpi_imgdev_get_user_data(dev);
......@@ -404,7 +404,7 @@ static void capture_sm_complete(struct fpi_ssm *ssm)
static void start_capture(struct fp_img_dev *dev)
{
struct aes2550_dev *aesdev = fpi_imgdev_get_user_data(dev);
struct fpi_ssm *ssm;
fpi_ssm *ssm;
if (aesdev->deactivating) {
complete_deactivation(dev);
......@@ -444,7 +444,7 @@ enum activate_states {
static void init_reqs_cb(struct libusb_transfer *transfer)
{
struct fpi_ssm *ssm = transfer->user_data;
fpi_ssm *ssm = transfer->user_data;
if ((transfer->status == LIBUSB_TRANSFER_COMPLETED) &&
(transfer->length == transfer->actual_length)) {
......@@ -457,7 +457,7 @@ static void init_reqs_cb(struct libusb_transfer *transfer)
static void init_read_data_cb(struct libusb_transfer *transfer)
{
struct fpi_ssm *ssm = transfer->user_data;
fpi_ssm *ssm = transfer->user_data;
if (transfer->status == LIBUSB_TRANSFER_COMPLETED) {
fpi_ssm_next_state(ssm);
......@@ -472,7 +472,7 @@ static void init_read_data_cb(struct libusb_transfer *transfer)
* need more info for implementaion */
static void calibrate_read_data_cb(struct libusb_transfer *transfer)
{
struct fpi_ssm *ssm = transfer->user_data;
fpi_ssm *ssm = transfer->user_data;
if (transfer->status == LIBUSB_TRANSFER_COMPLETED) {
fpi_ssm_next_state(ssm);
......@@ -483,7 +483,7 @@ static void calibrate_read_data_cb(struct libusb_transfer *transfer)
libusb_free_transfer(transfer);
}
static void activate_run_state(struct fpi_ssm *ssm)
static void activate_run_state(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
int r;
......@@ -568,7 +568,7 @@ static void activate_run_state(struct fpi_ssm *ssm)
}
}
static void activate_sm_complete(struct fpi_ssm *ssm)
static void activate_sm_complete(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
fp_dbg("status %d", fpi_ssm_get_error(ssm));
......@@ -581,7 +581,7 @@ static void activate_sm_complete(struct fpi_ssm *ssm)
static int dev_activate(struct fp_img_dev *dev, enum fp_imgdev_state state)
{
struct fpi_ssm *ssm = fpi_ssm_new(fpi_imgdev_get_dev(dev), activate_run_state,
fpi_ssm *ssm = fpi_ssm_new(fpi_imgdev_get_dev(dev), activate_run_state,
ACTIVATE_NUM_STATES);
fpi_ssm_set_user_data(ssm, dev);
fpi_ssm_start(ssm, activate_sm_complete);
......
......@@ -37,7 +37,7 @@ static void complete_deactivation(struct fp_img_dev *dev);
#define min(a, b) (((a) < (b)) ? (a) : (b))
static void aesX660_send_cmd_timeout(struct fpi_ssm *ssm, const unsigned char *cmd,
static void aesX660_send_cmd_timeout(fpi_ssm *ssm, const unsigned char *cmd,
size_t cmd_len, libusb_transfer_cb_fn callback, int timeout)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
......@@ -60,13 +60,13 @@ static void aesX660_send_cmd_timeout(struct fpi_ssm *ssm, const unsigned char *c
}
}
static void aesX660_send_cmd(struct fpi_ssm *ssm, const unsigned char *cmd,
static void aesX660_send_cmd(fpi_ssm *ssm, const unsigned char *cmd,
size_t cmd_len, libusb_transfer_cb_fn callback)
{
return aesX660_send_cmd_timeout(ssm, cmd, cmd_len, callback, BULK_TIMEOUT);
}
static void aesX660_read_response(struct fpi_ssm *ssm, size_t buf_len,
static void aesX660_read_response(fpi_ssm *ssm, size_t buf_len,
libusb_transfer_cb_fn callback)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
......@@ -95,7 +95,7 @@ static void aesX660_read_response(struct fpi_ssm *ssm, size_t buf_len,
static void aesX660_send_cmd_cb(struct libusb_transfer *transfer)
{
struct fpi_ssm *ssm = transfer->user_data;
fpi_ssm *ssm = transfer->user_data;
if ((transfer->status == LIBUSB_TRANSFER_COMPLETED) &&
(transfer->length == transfer->actual_length)) {
......@@ -110,7 +110,7 @@ static void aesX660_send_cmd_cb(struct libusb_transfer *transfer)
static void aesX660_read_calibrate_data_cb(struct libusb_transfer *transfer)
{
struct fpi_ssm *ssm = transfer->user_data;
fpi_ssm *ssm = transfer->user_data;
unsigned char *data = transfer->buffer;
if ((transfer->status != LIBUSB_TRANSFER_COMPLETED) ||
......@@ -143,7 +143,7 @@ enum finger_det_states {
static void finger_det_read_fd_data_cb(struct libusb_transfer *transfer)
{
struct fpi_ssm *ssm = transfer->user_data;
fpi_ssm *ssm = transfer->user_data;
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aesX660_dev *aesdev = fpi_imgdev_get_user_data(dev);
unsigned char *data = transfer->buffer;
......@@ -184,7 +184,7 @@ out:
static void finger_det_set_idle_cmd_cb(struct libusb_transfer *transfer)
{
struct fpi_ssm *ssm = transfer->user_data;
fpi_ssm *ssm = transfer->user_data;
if ((transfer->status == LIBUSB_TRANSFER_COMPLETED) &&
(transfer->length == transfer->actual_length)) {
......@@ -195,7 +195,7 @@ static void finger_det_set_idle_cmd_cb(struct libusb_transfer *transfer)
libusb_free_transfer(transfer);
}
static void finger_det_sm_complete(struct fpi_ssm *ssm)
static void finger_det_sm_complete(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aesX660_dev *aesdev = fpi_imgdev_get_user_data(dev);
......@@ -215,7 +215,7 @@ static void finger_det_sm_complete(struct fpi_ssm *ssm)
}
}
static void finger_det_run_state(struct fpi_ssm *ssm)
static void finger_det_run_state(fpi_ssm *ssm)
{
switch (fpi_ssm_get_cur_state(ssm)) {
case FINGER_DET_SEND_LED_CMD:
......@@ -239,7 +239,7 @@ static void finger_det_run_state(struct fpi_ssm *ssm)
static void start_finger_detection(struct fp_img_dev *dev)
{
struct fpi_ssm *ssm;
fpi_ssm *ssm;
struct aesX660_dev *aesdev = fpi_imgdev_get_user_data(dev);
if (aesdev->deactivating) {
......@@ -263,7 +263,7 @@ enum capture_states {
};
/* Returns number of processed bytes */
static int process_stripe_data(struct fpi_ssm *ssm, unsigned char *data)
static int process_stripe_data(fpi_ssm *ssm, unsigned char *data)
{
struct fpi_frame *stripe;
unsigned char *stripdata;
......@@ -294,7 +294,7 @@ static int process_stripe_data(struct fpi_ssm *ssm, unsigned char *data)
static void capture_set_idle_cmd_cb(struct libusb_transfer *transfer)
{
struct fpi_ssm *ssm = transfer->user_data;
fpi_ssm *ssm = transfer->user_data;
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aesX660_dev *aesdev = fpi_imgdev_get_user_data(dev);
......@@ -320,7 +320,7 @@ static void capture_set_idle_cmd_cb(struct libusb_transfer *transfer)
static void capture_read_stripe_data_cb(struct libusb_transfer *transfer)
{
struct fpi_ssm *ssm = transfer->user_data;
fpi_ssm *ssm = transfer->user_data;
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aesX660_dev *aesdev = fpi_imgdev_get_user_data(dev);
unsigned char *data = transfer->buffer;
......@@ -371,7 +371,7 @@ out:
libusb_free_transfer(transfer);
}
static void capture_run_state(struct fpi_ssm *ssm)
static void capture_run_state(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aesX660_dev *aesdev = fpi_imgdev_get_user_data(dev);
......@@ -400,7 +400,7 @@ static void capture_run_state(struct fpi_ssm *ssm)
}
}
static void capture_sm_complete(struct fpi_ssm *ssm)
static void capture_sm_complete(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aesX660_dev *aesdev = fpi_imgdev_get_user_data(dev);
......@@ -420,7 +420,7 @@ static void capture_sm_complete(struct fpi_ssm *ssm)
static void start_capture(struct fp_img_dev *dev)
{
struct aesX660_dev *aesdev = fpi_imgdev_get_user_data(dev);
struct fpi_ssm *ssm;
fpi_ssm *ssm;
if (aesdev->deactivating) {
complete_deactivation(dev);
......@@ -448,7 +448,7 @@ enum activate_states {
static void activate_read_id_cb(struct libusb_transfer *transfer)
{
struct fpi_ssm *ssm = transfer->user_data;
fpi_ssm *ssm = transfer->user_data;
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aesX660_dev *aesdev = fpi_imgdev_get_user_data(dev);
unsigned char *data = transfer->buffer;
......@@ -499,7 +499,7 @@ out:
static void activate_read_init_cb(struct libusb_transfer *transfer)
{
struct fpi_ssm *ssm = transfer->user_data;
fpi_ssm *ssm = transfer->user_data;
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aesX660_dev *aesdev = fpi_imgdev_get_user_data(dev);
unsigned char *data = transfer->buffer;
......@@ -534,7 +534,7 @@ out:
libusb_free_transfer(transfer);
}
static void activate_run_state(struct fpi_ssm *ssm)
static void activate_run_state(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aesX660_dev *aesdev = fpi_imgdev_get_user_data(dev);
......@@ -580,7 +580,7 @@ static void activate_run_state(struct fpi_ssm *ssm)
}
}
static void activate_sm_complete(struct fpi_ssm *ssm)
static void activate_sm_complete(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
int err = fpi_ssm_get_error(ssm);
......@@ -594,7 +594,7 @@ static void activate_sm_complete(struct fpi_ssm *ssm)
int aesX660_dev_activate(struct fp_img_dev *dev, enum fp_imgdev_state state)
{
struct fpi_ssm *ssm = fpi_ssm_new(fpi_imgdev_get_dev(dev), activate_run_state,
fpi_ssm *ssm = fpi_ssm_new(fpi_imgdev_get_dev(dev), activate_run_state,
ACTIVATE_NUM_STATES);
fpi_ssm_set_user_data(ssm, dev);
fpi_ssm_start(ssm, activate_sm_complete);
......
......@@ -313,7 +313,7 @@ static void elan_submit_image(struct fp_img_dev *dev)
fpi_imgdev_image_captured(dev, img);
}
static void elan_cmd_done(struct fpi_ssm *ssm)
static void elan_cmd_done(fpi_ssm *ssm)
{
G_DEBUG_HERE();
fpi_ssm_next_state(ssm);
......@@ -321,7 +321,7 @@ static void elan_cmd_done(struct fpi_ssm *ssm)
static void elan_cmd_cb(struct libusb_transfer *transfer)
{
struct fpi_ssm *ssm = transfer->user_data;
fpi_ssm *ssm = transfer->user_data;
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct elan_dev *elandev = fpi_imgdev_get_user_data(dev);
......@@ -362,7 +362,7 @@ static void elan_cmd_cb(struct libusb_transfer *transfer)
}
}
static void elan_cmd_read(struct fpi_ssm *ssm)
static void elan_cmd_read(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct elan_dev *elandev = fpi_imgdev_get_user_data(dev);
......@@ -401,7 +401,7 @@ static void elan_cmd_read(struct fpi_ssm *ssm)
fpi_ssm_mark_aborted(ssm, r);
}
static void elan_run_cmd(struct fpi_ssm *ssm, const struct elan_cmd *cmd,
static void elan_run_cmd(fpi_ssm *ssm, const struct elan_cmd *cmd,
int cmd_timeout)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
......@@ -440,7 +440,7 @@ enum stop_capture_states {
STOP_CAPTURE_NUM_STATES,
};
static void stop_capture_run_state(struct fpi_ssm *ssm)
static void stop_capture_run_state(fpi_ssm *ssm)
{
G_DEBUG_HERE();
......@@ -451,7 +451,7 @@ static void stop_capture_run_state(struct fpi_ssm *ssm)
}
}
static void stop_capture_complete(struct fpi_ssm *ssm)
static void stop_capture_complete(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct elan_dev *elandev = fpi_imgdev_get_user_data(dev);
......@@ -485,7 +485,7 @@ static void elan_stop_capture(struct fp_img_dev *dev)
elan_dev_reset(elandev);
struct fpi_ssm *ssm =
fpi_ssm *ssm =
fpi_ssm_new(fpi_imgdev_get_dev(dev), stop_capture_run_state,
STOP_CAPTURE_NUM_STATES);
fpi_ssm_set_user_data(ssm, dev);
......@@ -500,7 +500,7 @@ enum capture_states {
CAPTURE_NUM_STATES,
};
static void capture_run_state(struct fpi_ssm *ssm)
static void capture_run_state(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct elan_dev *elandev = fpi_imgdev_get_user_data(dev);
......@@ -538,7 +538,7 @@ static void capture_run_state(struct fpi_ssm *ssm)
}
}
static void capture_complete(struct fpi_ssm *ssm)
static void capture_complete(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct elan_dev *elandev = fpi_imgdev_get_user_data(dev);
......@@ -578,7 +578,7 @@ static void elan_capture(struct fp_img_dev *dev)
G_DEBUG_HERE();
elan_dev_reset(elandev);
struct fpi_ssm *ssm =
fpi_ssm *ssm =
fpi_ssm_new(fpi_imgdev_get_dev(dev), capture_run_state, CAPTURE_NUM_STATES);
fpi_ssm_set_user_data(ssm, dev);
fpi_ssm_start(ssm, capture_complete);
......@@ -586,7 +586,7 @@ static void elan_capture(struct fp_img_dev *dev)
static void fpi_ssm_next_state_async(void *data)
{
fpi_ssm_next_state((struct fpi_ssm *)data);
fpi_ssm_next_state((fpi_ssm *)data);
}
/* this function needs to have elandev->background and elandev->last_read to be
......@@ -624,7 +624,7 @@ enum calibrate_states {
CALIBRATE_NUM_STATES,
};
static void calibrate_run_state(struct fpi_ssm *ssm)
static void calibrate_run_state(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct elan_dev *elandev = fpi_imgdev_get_user_data(dev);
......@@ -689,7 +689,7 @@ static void calibrate_run_state(struct fpi_ssm *ssm)
}
}
static void calibrate_complete(struct fpi_ssm *ssm)
static void calibrate_complete(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
......@@ -711,7 +711,7 @@ static void elan_calibrate(struct fp_img_dev *dev)
elan_dev_reset(elandev);
elandev->calib_atts_left = ELAN_CALIBRATION_ATTEMPTS;
struct fpi_ssm *ssm = fpi_ssm_new(fpi_imgdev_get_dev(dev), calibrate_run_state,
fpi_ssm *ssm = fpi_ssm_new(fpi_imgdev_get_dev(dev), calibrate_run_state,
CALIBRATE_NUM_STATES);
fpi_ssm_set_user_data(ssm, dev);
fpi_ssm_start(ssm, calibrate_complete);
......@@ -726,7 +726,7 @@ enum activate_states {
ACTIVATE_NUM_STATES,
};
static void activate_run_state(struct fpi_ssm *ssm)
static void activate_run_state(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct elan_dev *elandev = fpi_imgdev_get_user_data(dev);
......@@ -770,7 +770,7 @@ static void activate_run_state(struct fpi_ssm *ssm)
}
}
static void activate_complete(struct fpi_ssm *ssm)
static void activate_complete(fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
......@@ -790,7 +790,7 @@ static void elan_activate(struct fp_img_dev *dev)
G_DEBUG_HERE();
elan_dev_reset(elandev);
struct fpi_ssm *ssm =
fpi_ssm *ssm =
fpi_ssm_new(fpi_imgdev_get_dev(dev), activate_run_state, ACTIVATE_NUM_STATES);
fpi_ssm_set_user_data(ssm, dev);
fpi_ssm_start(ssm, activate_complete);
......
......@@ -210,8 +210,8 @@ static const struct usb_id elan_id_table[] = {
{0, 0, 0,},
};
static void elan_cmd_done(struct fpi_ssm *ssm);
static void elan_cmd_read(struct fpi_ssm *ssm);
static void elan_cmd_done(fpi_ssm *ssm);
static void elan_cmd_read(fpi_ssm *ssm);
static void elan_calibrate(struct fp_img_dev *dev);
static void elan_capture(struct fp_img_dev *dev);
......
......@@ -669,7 +669,7 @@ static int async_tx(struct fp_img_dev *idev, unsigned int ep, void *cb,
static void async_tx_cb(struct libusb_transfer *transfer)
{
struct fpi_ssm *ssm = transfer->user_data;
fpi_ssm *ssm = transfer->user_data;
struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm);
struct etes603_dev *dev = fpi_imgdev_get_user_data(idev);
......@@ -699,7 +699,7 @@ static void async_tx_cb(struct libusb_transfer *transfer)
}
}
static void m_exit_state(struct fpi_ssm *ssm)
static void m_exit_state(fpi_ssm *ssm)
{
struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm);
struct etes603_dev *dev = fpi_imgdev_get_user_data(idev);
......@@ -727,7 +727,7 @@ err:
fpi_ssm_mark_aborted(ssm, -EIO);
}
static void m_exit_complete(struct fpi_ssm *ssm)
static void m_exit_complete(fpi_ssm *ssm)
{
struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm);
......@@ -742,14 +742,14 @@ static void m_exit_complete(struct fpi_ssm *ssm)
static void m_exit_start(struct fp_img_dev *idev)
{
struct fpi_ssm *ssm = fpi_ssm_new(fpi_imgdev_get_dev(idev), m_exit_state,
fpi_ssm *ssm = fpi_ssm_new(fpi_imgdev_get_dev(idev), m_exit_state,
EXIT_NUM_STATES);
fp_dbg("Switching device to idle mode");
fpi_ssm_set_user_data(ssm, idev);
fpi_ssm_start(ssm, m_exit_complete);
}
static void m_capture_state(struct fpi_ssm *ssm)
static void m_capture_state(fpi_ssm *ssm)
{
struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm);
struct etes603_dev *dev = fpi_imgdev_get_user_data(idev);
......@@ -830,7 +830,7 @@ err:
fpi_ssm_mark_aborted(ssm, -EIO);
}
static void m_capture_complete(struct fpi_ssm *ssm)
static void m_capture_complete(fpi_ssm *ssm)
{
struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm);
struct etes603_dev *dev = fpi_imgdev_get_user_data(idev);
......@@ -852,7 +852,7 @@ static void m_capture_complete(struct fpi_ssm *ssm)
}
}
static void m_finger_state(struct fpi_ssm *ssm)
static void m_finger_state(fpi_ssm *ssm)
{
struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm);
struct etes603_dev *dev = fpi_imgdev_get_user_data(idev);
......@@ -948,13 +948,13 @@ err:
fpi_ssm_mark_aborted(ssm, -EIO);
}
static void m_finger_complete(struct fpi_ssm *ssm)
static void m_finger_complete(fpi_ssm *ssm)
{
struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm);
struct etes603_dev *dev = fpi_imgdev_get_user_data(idev);
if (!fpi_ssm_get_error(ssm)) {
struct fpi_ssm *ssm_cap;
fpi_ssm *ssm_cap;
ssm_cap = fpi_ssm_new(fpi_imgdev_get_dev(idev), m_capture_state,
CAP_NUM_STATES);
fpi_ssm_set_user_data(ssm_cap, idev);
......@@ -973,7 +973,7 @@ static void m_finger_complete(struct fpi_ssm *ssm)
static void m_start_fingerdetect(struct fp_img_dev *idev)
{
struct fpi_ssm *ssmf;
fpi_ssm *ssmf;
ssmf = fpi_ssm_new(fpi_imgdev_get_dev(idev), m_finger_state, FGR_NUM_STATES);
fpi_ssm_set_user_data(ssmf, idev);
fpi_ssm_start(ssmf, m_finger_complete);
......@@ -982,7 +982,7 @@ static void m_start_fingerdetect(struct fp_img_dev *idev)
/*
* Tune value of VRT and VRB for contrast and brightness.
*/
static void m_tunevrb_state(struct fpi_ssm *ssm)
static void m_tunevrb_state(fpi_ssm *ssm)
{
struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm);
struct etes603_dev *dev = fpi_imgdev_get_user_data(idev);
......@@ -1134,7 +1134,7 @@ err:
fpi_ssm_mark_aborted(ssm, -EIO);
}
static void m_tunevrb_complete(struct fpi_ssm *ssm)
static void m_tunevrb_complete(fpi_ssm *ssm)
{
struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm);
......@@ -1156,7 +1156,7 @@ static void m_tunevrb_complete(struct fpi_ssm *ssm)
* This function tunes the DCoffset value and adjusts the gain value if
* required.
*/
static void