]> git.hungrycats.org Git - linux/commitdiff
[IRDA]: Make irda_start_timer inline rather than exporting.
authorStephen Hemminger <shemminger@osdl.org>
Tue, 9 Mar 2004 05:35:04 +0000 (21:35 -0800)
committerStephen Hemminger <shemminger@osdl.org>
Tue, 9 Mar 2004 05:35:04 +0000 (21:35 -0800)
include/net/irda/timer.h
net/irda/irsyms.c
net/irda/timer.c

index 61103a361d6ef695ed71ec1ffad370980dee60d0..9d24d6c033dc13c80a2f910d0aa2384c5f3e135f 100644 (file)
@@ -71,8 +71,18 @@ struct lap_cb;
 
 typedef void (*TIMER_CALLBACK)(void *);
 
-void irda_start_timer(struct timer_list *ptimer, int timeout, void* data,
-                     TIMER_CALLBACK callback);
+static inline void irda_start_timer(struct timer_list *ptimer, int timeout, 
+                                   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_query_timer(struct irlap_cb *self, int timeout);
index 985bc86565aa5a90ec4e198dc526d2581f5bb767..26cae78fdb6f23fae64c8f7e417032b5e2e31c40 100644 (file)
@@ -97,7 +97,6 @@ EXPORT_SYMBOL(irda_task_execute);
 EXPORT_SYMBOL(irda_task_next_state);
 EXPORT_SYMBOL(irda_task_delete);
 
-EXPORT_SYMBOL(irda_start_timer);
 
 #ifdef CONFIG_IRDA_DEBUG
 __u32 irda_debug = IRDA_DEBUG_LEVEL;
index b14e3f703b2896dc7cf9bc7c79faa62cd967e4ea..f05b94250ffa6112253657a56fc948c6aacd1182 100644 (file)
@@ -41,29 +41,6 @@ static void irlap_wd_timer_expired(void* data);
 static void irlap_backoff_timer_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)
 {
        irda_start_timer(&self->slot_timer, timeout, (void *) self,