vchiq: Rename timer func so they do not conflict with linuxkpi

This commit is contained in:
manu 2020-11-17 14:41:23 +00:00
parent d6a577b267
commit 55c7d922db
3 changed files with 19 additions and 19 deletions

View File

@ -77,7 +77,7 @@ run_timer(void *arg)
}
void
init_timer(struct timer_list *t)
vchiq_init_timer(struct timer_list *t)
{
mtx_init(&t->mtx, "dahdi timer lock", NULL, MTX_SPIN);
callout_init(&t->callout, 1);
@ -89,15 +89,15 @@ init_timer(struct timer_list *t)
}
void
setup_timer(struct timer_list *t, void (*function)(unsigned long), unsigned long data)
vchiq_setup_timer(struct timer_list *t, void (*function)(unsigned long), unsigned long data)
{
t->function = function;
t->data = data;
init_timer(t);
vchiq_init_timer(t);
}
void
mod_timer(struct timer_list *t, unsigned long expires)
vchiq_mod_timer(struct timer_list *t, unsigned long expires)
{
mtx_lock_spin(&t->mtx);
callout_reset(&t->callout, expires - jiffies, run_timer, t);
@ -105,13 +105,13 @@ mod_timer(struct timer_list *t, unsigned long expires)
}
void
add_timer(struct timer_list *t)
vchiq_add_timer(struct timer_list *t)
{
mod_timer(t, t->expires);
vchiq_mod_timer(t, t->expires);
}
int
del_timer_sync(struct timer_list *t)
vchiq_del_timer_sync(struct timer_list *t)
{
mtx_lock_spin(&t->mtx);
callout_stop(&t->callout);
@ -122,9 +122,9 @@ del_timer_sync(struct timer_list *t)
}
int
del_timer(struct timer_list *t)
vchiq_del_timer(struct timer_list *t)
{
del_timer_sync(t);
vchiq_del_timer_sync(t);
return 0;
}

View File

@ -196,12 +196,12 @@ struct timer_list {
unsigned long data;
};
void init_timer(struct timer_list *t);
void setup_timer(struct timer_list *t, void (*function)(unsigned long), unsigned long data);
void mod_timer(struct timer_list *t, unsigned long expires);
void add_timer(struct timer_list *t);
int del_timer(struct timer_list *t);
int del_timer_sync(struct timer_list *t);
void vchiq_init_timer(struct timer_list *t);
void vchiq_setup_timer(struct timer_list *t, void (*function)(unsigned long), unsigned long data);
void vchiq_mod_timer(struct timer_list *t, unsigned long expires);
void vchiq_add_timer(struct timer_list *t);
int vchiq_del_timer(struct timer_list *t);
int vchiq_del_timer_sync(struct timer_list *t);
/*
* Completion API

View File

@ -1754,7 +1754,7 @@ vchiq_arm_init_state(VCHIQ_STATE_T *state, VCHIQ_ARM_STATE_T *arm_state)
arm_state->suspend_timer_timeout = SUSPEND_TIMER_TIMEOUT_MS;
arm_state->suspend_timer_running = 0;
init_timer(&arm_state->suspend_timer);
vchiq_init_timer(&arm_state->suspend_timer);
arm_state->suspend_timer.data = (unsigned long)(state);
arm_state->suspend_timer.function = suspend_timer_callback;
@ -1892,11 +1892,11 @@ set_resume_state(VCHIQ_ARM_STATE_T *arm_state,
inline void
start_suspend_timer(VCHIQ_ARM_STATE_T *arm_state)
{
del_timer(&arm_state->suspend_timer);
vchiq_del_timer(&arm_state->suspend_timer);
arm_state->suspend_timer.expires = jiffies +
msecs_to_jiffies(arm_state->
suspend_timer_timeout);
add_timer(&arm_state->suspend_timer);
vchiq_add_timer(&arm_state->suspend_timer);
arm_state->suspend_timer_running = 1;
}
@ -1905,7 +1905,7 @@ static inline void
stop_suspend_timer(VCHIQ_ARM_STATE_T *arm_state)
{
if (arm_state->suspend_timer_running) {
del_timer(&arm_state->suspend_timer);
vchiq_del_timer(&arm_state->suspend_timer);
arm_state->suspend_timer_running = 0;
}
}