Commit 180c0aec authored by Stephen Hemminger's avatar Stephen Hemminger

[IRDA]: Make irda_start_timer inline rather than exporting.

parent 18111d02
...@@ -71,8 +71,18 @@ struct lap_cb; ...@@ -71,8 +71,18 @@ struct lap_cb;
typedef void (*TIMER_CALLBACK)(void *); typedef void (*TIMER_CALLBACK)(void *);
void irda_start_timer(struct timer_list *ptimer, int timeout, void* data, static inline void irda_start_timer(struct timer_list *ptimer, int timeout,
TIMER_CALLBACK callback); void* data, TIMER_CALLBACK callback)
{
ptimer->function = (void (*)(unsigned long)) callback;
ptimer->data = (unsigned long) data;
/* Set new value for timer (update or add timer).
* We use mod_timer() because it's more efficient and also
* safer with respect to race conditions - Jean II */
mod_timer(ptimer, jiffies + timeout);
}
void irlap_start_slot_timer(struct irlap_cb *self, int timeout); void irlap_start_slot_timer(struct irlap_cb *self, int timeout);
void irlap_start_query_timer(struct irlap_cb *self, int timeout); void irlap_start_query_timer(struct irlap_cb *self, int timeout);
......
...@@ -97,7 +97,6 @@ EXPORT_SYMBOL(irda_task_execute); ...@@ -97,7 +97,6 @@ EXPORT_SYMBOL(irda_task_execute);
EXPORT_SYMBOL(irda_task_next_state); EXPORT_SYMBOL(irda_task_next_state);
EXPORT_SYMBOL(irda_task_delete); EXPORT_SYMBOL(irda_task_delete);
EXPORT_SYMBOL(irda_start_timer);
#ifdef CONFIG_IRDA_DEBUG #ifdef CONFIG_IRDA_DEBUG
__u32 irda_debug = IRDA_DEBUG_LEVEL; __u32 irda_debug = IRDA_DEBUG_LEVEL;
......
...@@ -41,29 +41,6 @@ static void irlap_wd_timer_expired(void* data); ...@@ -41,29 +41,6 @@ static void irlap_wd_timer_expired(void* data);
static void irlap_backoff_timer_expired(void* data); static void irlap_backoff_timer_expired(void* data);
static void irlap_media_busy_expired(void* data); static void irlap_media_busy_expired(void* data);
/*
* Function irda_start_timer (timer, timeout)
*
* Start an IrDA timer
*
*/
void irda_start_timer(struct timer_list *ptimer, int timeout, void *data,
TIMER_CALLBACK callback)
{
/*
* For most architectures void * is the same as unsigned long, but
* at least we try to use void * as long as possible. Since the
* timer functions use unsigned long, we cast the function here
*/
ptimer->function = (void (*)(unsigned long)) callback;
ptimer->data = (unsigned long) data;
/* Set new value for timer (update or add timer).
* We use mod_timer() because it's more efficient and also
* safer with respect to race conditions - Jean II */
mod_timer(ptimer, jiffies + timeout);
}
void irlap_start_slot_timer(struct irlap_cb *self, int timeout) void irlap_start_slot_timer(struct irlap_cb *self, int timeout)
{ {
irda_start_timer(&self->slot_timer, timeout, (void *) self, irda_start_timer(&self->slot_timer, timeout, (void *) self,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment