lib: Typedef fpi_timeout

This commit is contained in:
Bastien Nocera 2018-09-05 17:34:59 +02:00
parent 969eefc81f
commit 2946dabd24
6 changed files with 12 additions and 12 deletions

View file

@ -135,7 +135,7 @@ struct uru4k_dev {
unsigned char powerup_hwstat;
int scanpwr_irq_timeouts;
struct fpi_timeout *scanpwr_irq_timeout;
fpi_timeout *scanpwr_irq_timeout;
int fwfixer_offset;
unsigned char fwfixer_value;

View file

@ -106,7 +106,7 @@ struct vfs101_dev
int ignore_error;
/* Timeout */
struct fpi_timeout *timeout;
fpi_timeout *timeout;
/* Loop counter */
int counter;

View file

@ -38,7 +38,7 @@ static void async_sleep_cb(void *data)
static void async_sleep(unsigned int msec, fpi_ssm *ssm)
{
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct fpi_timeout *timeout;
fpi_timeout *timeout;
/* Add timeout */
timeout = fpi_timeout_add(msec, async_sleep_cb, ssm);

View file

@ -672,7 +672,7 @@ static void activate_loop(fpi_ssm *ssm)
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
struct vfs5011_data *data;
int r;
struct fpi_timeout *timeout;
fpi_timeout *timeout;
data = fpi_imgdev_get_user_data(dev);

View file

@ -89,8 +89,8 @@ struct fpi_timeout {
static int timeout_sort_fn(gconstpointer _a, gconstpointer _b)
{
struct fpi_timeout *a = (struct fpi_timeout *) _a;
struct fpi_timeout *b = (struct fpi_timeout *) _b;
fpi_timeout *a = (fpi_timeout *) _a;
fpi_timeout *b = (fpi_timeout *) _b;
struct timeval *tv_a = &a->expiry;
struct timeval *tv_b = &b->expiry;
@ -118,12 +118,12 @@ static int timeout_sort_fn(gconstpointer _a, gconstpointer _b)
*
* Returns: an #fpi_timeout structure
*/
struct fpi_timeout *fpi_timeout_add(unsigned int msec, fpi_timeout_fn callback,
fpi_timeout *fpi_timeout_add(unsigned int msec, fpi_timeout_fn callback,
void *data)
{
struct timespec ts;
struct timeval add_msec;
struct fpi_timeout *timeout;
fpi_timeout *timeout;
int r;
fp_dbg("in %dms", msec);
@ -158,7 +158,7 @@ struct fpi_timeout *fpi_timeout_add(unsigned int msec, fpi_timeout_fn callback,
* Cancels a timeout scheduled with fpi_timeout_add(), and frees the
* @timeout structure.
*/
void fpi_timeout_cancel(struct fpi_timeout *timeout)
void fpi_timeout_cancel(fpi_timeout *timeout)
{
G_DEBUG_HERE();
active_timers = g_slist_remove(active_timers, timeout);

View file

@ -32,7 +32,7 @@ typedef void (*fpi_timeout_fn)(void *data);
* An opaque structure representing a scheduled function call, created with
* fpi_timeout_add().
*/
struct fpi_timeout;
struct fpi_timeout *fpi_timeout_add(unsigned int msec, fpi_timeout_fn callback,
typedef struct fpi_timeout fpi_timeout;
fpi_timeout *fpi_timeout_add(unsigned int msec, fpi_timeout_fn callback,
void *data);
void fpi_timeout_cancel(struct fpi_timeout *timeout);
void fpi_timeout_cancel(fpi_timeout *timeout);