Commit e397571f authored by Bastien Nocera's avatar Bastien Nocera

lib: Add more args to fpi_ssm callbacks

Pass the struct fp_dev and user_data to fpi_ssm callbacks, so that we
might be able to get rid of the fpi_ssm_get_user_data(), and
fpi_ssm_get_dev() as most drivers just get those from the ssm anyway
in their callbacks.
parent d34d7c26
Pipeline #4466 passed with stage
in 1 minute and 56 seconds
...@@ -643,7 +643,7 @@ out: ...@@ -643,7 +643,7 @@ out:
libusb_free_transfer(transfer); libusb_free_transfer(transfer);
} }
static void capture_run_state(fpi_ssm *ssm) static void capture_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aes1610_dev *aesdev = FP_INSTANCE_DATA(FP_DEV(dev)); struct aes1610_dev *aesdev = FP_INSTANCE_DATA(FP_DEV(dev));
...@@ -690,7 +690,7 @@ static void capture_run_state(fpi_ssm *ssm) ...@@ -690,7 +690,7 @@ static void capture_run_state(fpi_ssm *ssm)
}; };
} }
static void capture_sm_complete(fpi_ssm *ssm) static void capture_sm_complete(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aes1610_dev *aesdev = FP_INSTANCE_DATA(FP_DEV(dev)); struct aes1610_dev *aesdev = FP_INSTANCE_DATA(FP_DEV(dev));
...@@ -737,7 +737,7 @@ enum activate_states { ...@@ -737,7 +737,7 @@ enum activate_states {
ACTIVATE_NUM_STATES, ACTIVATE_NUM_STATES,
}; };
static void activate_run_state(fpi_ssm *ssm) static void activate_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
...@@ -752,7 +752,7 @@ static void activate_run_state(fpi_ssm *ssm) ...@@ -752,7 +752,7 @@ static void activate_run_state(fpi_ssm *ssm)
} }
/* jump to finger detection */ /* jump to finger detection */
static void activate_sm_complete(fpi_ssm *ssm) static void activate_sm_complete(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
fp_dbg("status %d", fpi_ssm_get_error(ssm)); fp_dbg("status %d", fpi_ssm_get_error(ssm));
......
...@@ -520,7 +520,7 @@ out: ...@@ -520,7 +520,7 @@ out:
libusb_free_transfer(transfer); libusb_free_transfer(transfer);
} }
static void capture_run_state(fpi_ssm *ssm) static void capture_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aes2501_dev *aesdev = FP_INSTANCE_DATA(FP_DEV(dev)); struct aes2501_dev *aesdev = FP_INSTANCE_DATA(FP_DEV(dev));
...@@ -571,7 +571,7 @@ static void capture_run_state(fpi_ssm *ssm) ...@@ -571,7 +571,7 @@ static void capture_run_state(fpi_ssm *ssm)
}; };
} }
static void capture_sm_complete(fpi_ssm *ssm) static void capture_sm_complete(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aes2501_dev *aesdev = FP_INSTANCE_DATA(FP_DEV(dev)); struct aes2501_dev *aesdev = FP_INSTANCE_DATA(FP_DEV(dev));
...@@ -736,7 +736,7 @@ static void activate_init3_cb(struct fp_img_dev *dev, int result, ...@@ -736,7 +736,7 @@ static void activate_init3_cb(struct fp_img_dev *dev, int result,
fpi_ssm_mark_failed(ssm, result); fpi_ssm_mark_failed(ssm, result);
} }
static void activate_run_state(fpi_ssm *ssm) static void activate_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
...@@ -790,7 +790,7 @@ static void activate_run_state(fpi_ssm *ssm) ...@@ -790,7 +790,7 @@ static void activate_run_state(fpi_ssm *ssm)
} }
} }
static void activate_sm_complete(fpi_ssm *ssm) static void activate_sm_complete(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
fp_dbg("status %d", fpi_ssm_get_error(ssm)); fp_dbg("status %d", fpi_ssm_get_error(ssm));
......
...@@ -323,7 +323,7 @@ out: ...@@ -323,7 +323,7 @@ out:
libusb_free_transfer(transfer); libusb_free_transfer(transfer);
} }
static void capture_run_state(fpi_ssm *ssm) static void capture_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
int r; int r;
...@@ -386,7 +386,7 @@ static void capture_run_state(fpi_ssm *ssm) ...@@ -386,7 +386,7 @@ static void capture_run_state(fpi_ssm *ssm)
}; };
} }
static void capture_sm_complete(fpi_ssm *ssm) static void capture_sm_complete(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aes2550_dev *aesdev = FP_INSTANCE_DATA(FP_DEV(dev)); struct aes2550_dev *aesdev = FP_INSTANCE_DATA(FP_DEV(dev));
...@@ -482,7 +482,7 @@ static void calibrate_read_data_cb(struct libusb_transfer *transfer) ...@@ -482,7 +482,7 @@ static void calibrate_read_data_cb(struct libusb_transfer *transfer)
libusb_free_transfer(transfer); libusb_free_transfer(transfer);
} }
static void activate_run_state(fpi_ssm *ssm) static void activate_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
int r; int r;
...@@ -567,7 +567,7 @@ static void activate_run_state(fpi_ssm *ssm) ...@@ -567,7 +567,7 @@ static void activate_run_state(fpi_ssm *ssm)
} }
} }
static void activate_sm_complete(fpi_ssm *ssm) static void activate_sm_complete(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
fp_dbg("status %d", fpi_ssm_get_error(ssm)); fp_dbg("status %d", fpi_ssm_get_error(ssm));
......
...@@ -195,7 +195,7 @@ static void finger_det_set_idle_cmd_cb(struct libusb_transfer *transfer) ...@@ -195,7 +195,7 @@ static void finger_det_set_idle_cmd_cb(struct libusb_transfer *transfer)
libusb_free_transfer(transfer); libusb_free_transfer(transfer);
} }
static void finger_det_sm_complete(fpi_ssm *ssm) static void finger_det_sm_complete(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aesX660_dev *aesdev = FP_INSTANCE_DATA(FP_DEV(dev)); struct aesX660_dev *aesdev = FP_INSTANCE_DATA(FP_DEV(dev));
...@@ -215,7 +215,7 @@ static void finger_det_sm_complete(fpi_ssm *ssm) ...@@ -215,7 +215,7 @@ static void finger_det_sm_complete(fpi_ssm *ssm)
} }
} }
static void finger_det_run_state(fpi_ssm *ssm) static void finger_det_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
switch (fpi_ssm_get_cur_state(ssm)) { switch (fpi_ssm_get_cur_state(ssm)) {
case FINGER_DET_SEND_LED_CMD: case FINGER_DET_SEND_LED_CMD:
...@@ -370,7 +370,7 @@ out: ...@@ -370,7 +370,7 @@ out:
libusb_free_transfer(transfer); libusb_free_transfer(transfer);
} }
static void capture_run_state(fpi_ssm *ssm) static void capture_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aesX660_dev *aesdev = FP_INSTANCE_DATA(FP_DEV(dev)); struct aesX660_dev *aesdev = FP_INSTANCE_DATA(FP_DEV(dev));
...@@ -399,7 +399,7 @@ static void capture_run_state(fpi_ssm *ssm) ...@@ -399,7 +399,7 @@ static void capture_run_state(fpi_ssm *ssm)
} }
} }
static void capture_sm_complete(fpi_ssm *ssm) static void capture_sm_complete(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aesX660_dev *aesdev = FP_INSTANCE_DATA(FP_DEV(dev)); struct aesX660_dev *aesdev = FP_INSTANCE_DATA(FP_DEV(dev));
...@@ -532,7 +532,7 @@ out: ...@@ -532,7 +532,7 @@ out:
libusb_free_transfer(transfer); libusb_free_transfer(transfer);
} }
static void activate_run_state(fpi_ssm *ssm) static void activate_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct aesX660_dev *aesdev = FP_INSTANCE_DATA(FP_DEV(dev)); struct aesX660_dev *aesdev = FP_INSTANCE_DATA(FP_DEV(dev));
...@@ -578,7 +578,7 @@ static void activate_run_state(fpi_ssm *ssm) ...@@ -578,7 +578,7 @@ static void activate_run_state(fpi_ssm *ssm)
} }
} }
static void activate_sm_complete(fpi_ssm *ssm) static void activate_sm_complete(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
int err = fpi_ssm_get_error(ssm); int err = fpi_ssm_get_error(ssm);
......
...@@ -440,7 +440,7 @@ enum stop_capture_states { ...@@ -440,7 +440,7 @@ enum stop_capture_states {
STOP_CAPTURE_NUM_STATES, STOP_CAPTURE_NUM_STATES,
}; };
static void stop_capture_run_state(fpi_ssm *ssm) static void stop_capture_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
G_DEBUG_HERE(); G_DEBUG_HERE();
...@@ -451,7 +451,7 @@ static void stop_capture_run_state(fpi_ssm *ssm) ...@@ -451,7 +451,7 @@ static void stop_capture_run_state(fpi_ssm *ssm)
} }
} }
static void stop_capture_complete(fpi_ssm *ssm) static void stop_capture_complete(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct elan_dev *elandev = FP_INSTANCE_DATA(FP_DEV(dev)); struct elan_dev *elandev = FP_INSTANCE_DATA(FP_DEV(dev));
...@@ -499,7 +499,7 @@ enum capture_states { ...@@ -499,7 +499,7 @@ enum capture_states {
CAPTURE_NUM_STATES, CAPTURE_NUM_STATES,
}; };
static void capture_run_state(fpi_ssm *ssm) static void capture_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct elan_dev *elandev = FP_INSTANCE_DATA(FP_DEV(dev)); struct elan_dev *elandev = FP_INSTANCE_DATA(FP_DEV(dev));
...@@ -537,7 +537,7 @@ static void capture_run_state(fpi_ssm *ssm) ...@@ -537,7 +537,7 @@ static void capture_run_state(fpi_ssm *ssm)
} }
} }
static void capture_complete(fpi_ssm *ssm) static void capture_complete(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct elan_dev *elandev = FP_INSTANCE_DATA(FP_DEV(dev)); struct elan_dev *elandev = FP_INSTANCE_DATA(FP_DEV(dev));
...@@ -622,7 +622,7 @@ enum calibrate_states { ...@@ -622,7 +622,7 @@ enum calibrate_states {
CALIBRATE_NUM_STATES, CALIBRATE_NUM_STATES,
}; };
static void calibrate_run_state(fpi_ssm *ssm) static void calibrate_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct elan_dev *elandev = FP_INSTANCE_DATA(FP_DEV(dev)); struct elan_dev *elandev = FP_INSTANCE_DATA(FP_DEV(dev));
...@@ -687,7 +687,7 @@ static void calibrate_run_state(fpi_ssm *ssm) ...@@ -687,7 +687,7 @@ static void calibrate_run_state(fpi_ssm *ssm)
} }
} }
static void calibrate_complete(fpi_ssm *ssm) static void calibrate_complete(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
...@@ -723,7 +723,7 @@ enum activate_states { ...@@ -723,7 +723,7 @@ enum activate_states {
ACTIVATE_NUM_STATES, ACTIVATE_NUM_STATES,
}; };
static void activate_run_state(fpi_ssm *ssm) static void activate_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct elan_dev *elandev = FP_INSTANCE_DATA(FP_DEV(dev)); struct elan_dev *elandev = FP_INSTANCE_DATA(FP_DEV(dev));
...@@ -767,7 +767,7 @@ static void activate_run_state(fpi_ssm *ssm) ...@@ -767,7 +767,7 @@ static void activate_run_state(fpi_ssm *ssm)
} }
} }
static void activate_complete(fpi_ssm *ssm) static void activate_complete(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
......
...@@ -699,7 +699,7 @@ static void async_tx_cb(struct libusb_transfer *transfer) ...@@ -699,7 +699,7 @@ static void async_tx_cb(struct libusb_transfer *transfer)
} }
} }
static void m_exit_state(fpi_ssm *ssm) static void m_exit_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm);
struct etes603_dev *dev = FP_INSTANCE_DATA(FP_DEV(idev)); struct etes603_dev *dev = FP_INSTANCE_DATA(FP_DEV(idev));
...@@ -727,7 +727,7 @@ err: ...@@ -727,7 +727,7 @@ err:
fpi_ssm_mark_failed(ssm, -EIO); fpi_ssm_mark_failed(ssm, -EIO);
} }
static void m_exit_complete(fpi_ssm *ssm) static void m_exit_complete(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm);
...@@ -748,7 +748,7 @@ static void m_exit_start(struct fp_img_dev *idev) ...@@ -748,7 +748,7 @@ static void m_exit_start(struct fp_img_dev *idev)
fpi_ssm_start(ssm, m_exit_complete); fpi_ssm_start(ssm, m_exit_complete);
} }
static void m_capture_state(fpi_ssm *ssm) static void m_capture_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm);
struct etes603_dev *dev = FP_INSTANCE_DATA(FP_DEV(idev)); struct etes603_dev *dev = FP_INSTANCE_DATA(FP_DEV(idev));
...@@ -829,7 +829,7 @@ err: ...@@ -829,7 +829,7 @@ err:
fpi_ssm_mark_failed(ssm, -EIO); fpi_ssm_mark_failed(ssm, -EIO);
} }
static void m_capture_complete(fpi_ssm *ssm) static void m_capture_complete(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm);
struct etes603_dev *dev = FP_INSTANCE_DATA(FP_DEV(idev)); struct etes603_dev *dev = FP_INSTANCE_DATA(FP_DEV(idev));
...@@ -851,7 +851,7 @@ static void m_capture_complete(fpi_ssm *ssm) ...@@ -851,7 +851,7 @@ static void m_capture_complete(fpi_ssm *ssm)
} }
} }
static void m_finger_state(fpi_ssm *ssm) static void m_finger_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm);
struct etes603_dev *dev = FP_INSTANCE_DATA(FP_DEV(idev)); struct etes603_dev *dev = FP_INSTANCE_DATA(FP_DEV(idev));
...@@ -947,7 +947,7 @@ err: ...@@ -947,7 +947,7 @@ err:
fpi_ssm_mark_failed(ssm, -EIO); fpi_ssm_mark_failed(ssm, -EIO);
} }
static void m_finger_complete(fpi_ssm *ssm) static void m_finger_complete(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm);
struct etes603_dev *dev = FP_INSTANCE_DATA(FP_DEV(idev)); struct etes603_dev *dev = FP_INSTANCE_DATA(FP_DEV(idev));
...@@ -979,7 +979,7 @@ static void m_start_fingerdetect(struct fp_img_dev *idev) ...@@ -979,7 +979,7 @@ static void m_start_fingerdetect(struct fp_img_dev *idev)
/* /*
* Tune value of VRT and VRB for contrast and brightness. * Tune value of VRT and VRB for contrast and brightness.
*/ */
static void m_tunevrb_state(fpi_ssm *ssm) static void m_tunevrb_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm);
struct etes603_dev *dev = FP_INSTANCE_DATA(FP_DEV(idev)); struct etes603_dev *dev = FP_INSTANCE_DATA(FP_DEV(idev));
...@@ -1131,7 +1131,7 @@ err: ...@@ -1131,7 +1131,7 @@ err:
fpi_ssm_mark_failed(ssm, -EIO); fpi_ssm_mark_failed(ssm, -EIO);
} }
static void m_tunevrb_complete(fpi_ssm *ssm) static void m_tunevrb_complete(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm);
...@@ -1153,7 +1153,7 @@ static void m_tunevrb_complete(fpi_ssm *ssm) ...@@ -1153,7 +1153,7 @@ static void m_tunevrb_complete(fpi_ssm *ssm)
* This function tunes the DCoffset value and adjusts the gain value if * This function tunes the DCoffset value and adjusts the gain value if
* required. * required.
*/ */
static void m_tunedc_state(fpi_ssm *ssm) static void m_tunedc_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm);
struct etes603_dev *dev = FP_INSTANCE_DATA(FP_DEV(idev)); struct etes603_dev *dev = FP_INSTANCE_DATA(FP_DEV(idev));
...@@ -1256,7 +1256,7 @@ err: ...@@ -1256,7 +1256,7 @@ err:
} }
static void m_tunedc_complete(fpi_ssm *ssm) static void m_tunedc_complete(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm);
if (!fpi_ssm_get_error(ssm)) { if (!fpi_ssm_get_error(ssm)) {
...@@ -1274,7 +1274,7 @@ static void m_tunedc_complete(fpi_ssm *ssm) ...@@ -1274,7 +1274,7 @@ static void m_tunedc_complete(fpi_ssm *ssm)
fpi_ssm_free(ssm); fpi_ssm_free(ssm);
} }
static void m_init_state(fpi_ssm *ssm) static void m_init_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm);
struct etes603_dev *dev = FP_INSTANCE_DATA(FP_DEV(idev)); struct etes603_dev *dev = FP_INSTANCE_DATA(FP_DEV(idev));
...@@ -1375,7 +1375,7 @@ err: ...@@ -1375,7 +1375,7 @@ err:
} }
static void m_init_complete(fpi_ssm *ssm) static void m_init_complete(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *idev = fpi_ssm_get_user_data(ssm);
if (!fpi_ssm_get_error(ssm)) { if (!fpi_ssm_get_error(ssm)) {
......
...@@ -763,7 +763,7 @@ enum awfsm_1000_states { ...@@ -763,7 +763,7 @@ enum awfsm_1000_states {
AWFSM_1000_NUM_STATES, AWFSM_1000_NUM_STATES,
}; };
static void awfsm_2016_run_state(fpi_ssm *ssm) static void awfsm_2016_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct sonly_dev *sdev = FP_INSTANCE_DATA(FP_DEV(dev)); struct sonly_dev *sdev = FP_INSTANCE_DATA(FP_DEV(dev));
...@@ -810,7 +810,7 @@ static void awfsm_2016_run_state(fpi_ssm *ssm) ...@@ -810,7 +810,7 @@ static void awfsm_2016_run_state(fpi_ssm *ssm)
} }
} }
static void awfsm_1000_run_state(fpi_ssm *ssm) static void awfsm_1000_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
switch (fpi_ssm_get_cur_state(ssm)) { switch (fpi_ssm_get_cur_state(ssm)) {
case AWFSM_1000_WRITEV_1: case AWFSM_1000_WRITEV_1:
...@@ -881,7 +881,7 @@ static void capsm_fire_bulk(fpi_ssm *ssm) ...@@ -881,7 +881,7 @@ static void capsm_fire_bulk(fpi_ssm *ssm)
fpi_ssm_next_state(ssm); fpi_ssm_next_state(ssm);
} }
static void capsm_2016_run_state(fpi_ssm *ssm) static void capsm_2016_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct sonly_dev *sdev = FP_INSTANCE_DATA(FP_DEV(dev)); struct sonly_dev *sdev = FP_INSTANCE_DATA(FP_DEV(dev));
...@@ -913,7 +913,7 @@ static void capsm_2016_run_state(fpi_ssm *ssm) ...@@ -913,7 +913,7 @@ static void capsm_2016_run_state(fpi_ssm *ssm)
} }
} }
static void capsm_1000_run_state(fpi_ssm *ssm) static void capsm_1000_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct sonly_dev *sdev = FP_INSTANCE_DATA(FP_DEV(dev)); struct sonly_dev *sdev = FP_INSTANCE_DATA(FP_DEV(dev));
...@@ -939,7 +939,7 @@ static void capsm_1000_run_state(fpi_ssm *ssm) ...@@ -939,7 +939,7 @@ static void capsm_1000_run_state(fpi_ssm *ssm)
} }
} }
static void capsm_1001_run_state(fpi_ssm *ssm) static void capsm_1001_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct sonly_dev *sdev = FP_INSTANCE_DATA(FP_DEV(dev)); struct sonly_dev *sdev = FP_INSTANCE_DATA(FP_DEV(dev));
...@@ -994,7 +994,7 @@ enum deinitsm_1001_states { ...@@ -994,7 +994,7 @@ enum deinitsm_1001_states {
DEINITSM_1001_NUM_STATES, DEINITSM_1001_NUM_STATES,
}; };
static void deinitsm_2016_run_state(fpi_ssm *ssm) static void deinitsm_2016_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
switch (fpi_ssm_get_cur_state(ssm)) { switch (fpi_ssm_get_cur_state(ssm)) {
case DEINITSM_2016_WRITEV: case DEINITSM_2016_WRITEV:
...@@ -1003,7 +1003,7 @@ static void deinitsm_2016_run_state(fpi_ssm *ssm) ...@@ -1003,7 +1003,7 @@ static void deinitsm_2016_run_state(fpi_ssm *ssm)
} }
} }
static void deinitsm_1000_run_state(fpi_ssm *ssm) static void deinitsm_1000_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
switch (fpi_ssm_get_cur_state(ssm)) { switch (fpi_ssm_get_cur_state(ssm)) {
case DEINITSM_1000_WRITEV: case DEINITSM_1000_WRITEV:
...@@ -1012,7 +1012,7 @@ static void deinitsm_1000_run_state(fpi_ssm *ssm) ...@@ -1012,7 +1012,7 @@ static void deinitsm_1000_run_state(fpi_ssm *ssm)
} }
} }
static void deinitsm_1001_run_state(fpi_ssm *ssm) static void deinitsm_1001_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
switch (fpi_ssm_get_cur_state(ssm)) { switch (fpi_ssm_get_cur_state(ssm)) {
case DEINITSM_1001_WRITEV: case DEINITSM_1001_WRITEV:
...@@ -1048,7 +1048,7 @@ enum initsm_1001_states { ...@@ -1048,7 +1048,7 @@ enum initsm_1001_states {
INITSM_1001_NUM_STATES, INITSM_1001_NUM_STATES,
}; };
static void initsm_2016_run_state(fpi_ssm *ssm) static void initsm_2016_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct sonly_dev *sdev = FP_INSTANCE_DATA(FP_DEV(dev)); struct sonly_dev *sdev = FP_INSTANCE_DATA(FP_DEV(dev));
...@@ -1078,7 +1078,7 @@ static void initsm_2016_run_state(fpi_ssm *ssm) ...@@ -1078,7 +1078,7 @@ static void initsm_2016_run_state(fpi_ssm *ssm)
} }
} }
static void initsm_1000_run_state(fpi_ssm *ssm) static void initsm_1000_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
switch (fpi_ssm_get_cur_state(ssm)) { switch (fpi_ssm_get_cur_state(ssm)) {
case INITSM_1000_WRITEV_1: case INITSM_1000_WRITEV_1:
...@@ -1087,7 +1087,7 @@ static void initsm_1000_run_state(fpi_ssm *ssm) ...@@ -1087,7 +1087,7 @@ static void initsm_1000_run_state(fpi_ssm *ssm)
} }
} }
static void initsm_1001_run_state(fpi_ssm *ssm) static void initsm_1001_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
switch (fpi_ssm_get_cur_state(ssm)) { switch (fpi_ssm_get_cur_state(ssm)) {
case INITSM_1001_WRITEV_1: case INITSM_1001_WRITEV_1:
...@@ -1120,7 +1120,7 @@ enum loopsm_states { ...@@ -1120,7 +1120,7 @@ enum loopsm_states {
LOOPSM_NUM_STATES, LOOPSM_NUM_STATES,
}; };
static void loopsm_run_state(fpi_ssm *ssm) static void loopsm_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct sonly_dev *sdev = FP_INSTANCE_DATA(FP_DEV(dev)); struct sonly_dev *sdev = FP_INSTANCE_DATA(FP_DEV(dev));
...@@ -1245,7 +1245,7 @@ static void dev_deactivate(struct fp_img_dev *dev) ...@@ -1245,7 +1245,7 @@ static void dev_deactivate(struct fp_img_dev *dev)
cancel_img_transfers(dev); cancel_img_transfers(dev);
} }
static void loopsm_complete(fpi_ssm *ssm) static void loopsm_complete(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct sonly_dev *sdev = FP_INSTANCE_DATA(FP_DEV(dev)); struct sonly_dev *sdev = FP_INSTANCE_DATA(FP_DEV(dev));
...@@ -1264,7 +1264,7 @@ static void loopsm_complete(fpi_ssm *ssm) ...@@ -1264,7 +1264,7 @@ static void loopsm_complete(fpi_ssm *ssm)
} }
} }
static void initsm_complete(fpi_ssm *ssm) static void initsm_complete(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct sonly_dev *sdev = FP_INSTANCE_DATA(FP_DEV(dev)); struct sonly_dev *sdev = FP_INSTANCE_DATA(FP_DEV(dev));
......
...@@ -98,7 +98,7 @@ static void read_init_data_cb(struct libusb_transfer *transfer) ...@@ -98,7 +98,7 @@ static void read_init_data_cb(struct libusb_transfer *transfer)
libusb_free_transfer(transfer); libusb_free_transfer(transfer);
} }
static void activate_run_state(fpi_ssm *ssm) static void activate_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct upektc_dev *upekdev = FP_INSTANCE_DATA(FP_DEV(dev)); struct upektc_dev *upekdev = FP_INSTANCE_DATA(FP_DEV(dev));
...@@ -148,7 +148,7 @@ static void activate_run_state(fpi_ssm *ssm) ...@@ -148,7 +148,7 @@ static void activate_run_state(fpi_ssm *ssm)
} }
} }
static void activate_sm_complete(fpi_ssm *ssm) static void activate_sm_complete(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{ {
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm); struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
fp_dbg("status %d", fpi_ssm_get_error(ssm)); fp_dbg("status %d", fpi_ssm_get_error(ssm