vchiq: Rename timer func so they do not conflict with linuxkpi
This commit is contained in:
parent
d6a577b267
commit
55c7d922db
@ -77,7 +77,7 @@ run_timer(void *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
init_timer(struct timer_list *t)
|
vchiq_init_timer(struct timer_list *t)
|
||||||
{
|
{
|
||||||
mtx_init(&t->mtx, "dahdi timer lock", NULL, MTX_SPIN);
|
mtx_init(&t->mtx, "dahdi timer lock", NULL, MTX_SPIN);
|
||||||
callout_init(&t->callout, 1);
|
callout_init(&t->callout, 1);
|
||||||
@ -89,15 +89,15 @@ init_timer(struct timer_list *t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
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->function = function;
|
||||||
t->data = data;
|
t->data = data;
|
||||||
init_timer(t);
|
vchiq_init_timer(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
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);
|
mtx_lock_spin(&t->mtx);
|
||||||
callout_reset(&t->callout, expires - jiffies, run_timer, t);
|
callout_reset(&t->callout, expires - jiffies, run_timer, t);
|
||||||
@ -105,13 +105,13 @@ mod_timer(struct timer_list *t, unsigned long expires)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
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
|
int
|
||||||
del_timer_sync(struct timer_list *t)
|
vchiq_del_timer_sync(struct timer_list *t)
|
||||||
{
|
{
|
||||||
mtx_lock_spin(&t->mtx);
|
mtx_lock_spin(&t->mtx);
|
||||||
callout_stop(&t->callout);
|
callout_stop(&t->callout);
|
||||||
@ -122,9 +122,9 @@ del_timer_sync(struct timer_list *t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,12 +196,12 @@ struct timer_list {
|
|||||||
unsigned long data;
|
unsigned long data;
|
||||||
};
|
};
|
||||||
|
|
||||||
void init_timer(struct timer_list *t);
|
void vchiq_init_timer(struct timer_list *t);
|
||||||
void setup_timer(struct timer_list *t, void (*function)(unsigned long), unsigned long data);
|
void vchiq_setup_timer(struct timer_list *t, void (*function)(unsigned long), unsigned long data);
|
||||||
void mod_timer(struct timer_list *t, unsigned long expires);
|
void vchiq_mod_timer(struct timer_list *t, unsigned long expires);
|
||||||
void add_timer(struct timer_list *t);
|
void vchiq_add_timer(struct timer_list *t);
|
||||||
int del_timer(struct timer_list *t);
|
int vchiq_del_timer(struct timer_list *t);
|
||||||
int del_timer_sync(struct timer_list *t);
|
int vchiq_del_timer_sync(struct timer_list *t);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Completion API
|
* Completion API
|
||||||
|
@ -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_timeout = SUSPEND_TIMER_TIMEOUT_MS;
|
||||||
arm_state->suspend_timer_running = 0;
|
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.data = (unsigned long)(state);
|
||||||
arm_state->suspend_timer.function = suspend_timer_callback;
|
arm_state->suspend_timer.function = suspend_timer_callback;
|
||||||
|
|
||||||
@ -1892,11 +1892,11 @@ set_resume_state(VCHIQ_ARM_STATE_T *arm_state,
|
|||||||
inline void
|
inline void
|
||||||
start_suspend_timer(VCHIQ_ARM_STATE_T *arm_state)
|
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 +
|
arm_state->suspend_timer.expires = jiffies +
|
||||||
msecs_to_jiffies(arm_state->
|
msecs_to_jiffies(arm_state->
|
||||||
suspend_timer_timeout);
|
suspend_timer_timeout);
|
||||||
add_timer(&arm_state->suspend_timer);
|
vchiq_add_timer(&arm_state->suspend_timer);
|
||||||
arm_state->suspend_timer_running = 1;
|
arm_state->suspend_timer_running = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1905,7 +1905,7 @@ static inline void
|
|||||||
stop_suspend_timer(VCHIQ_ARM_STATE_T *arm_state)
|
stop_suspend_timer(VCHIQ_ARM_STATE_T *arm_state)
|
||||||
{
|
{
|
||||||
if (arm_state->suspend_timer_running) {
|
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;
|
arm_state->suspend_timer_running = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user