This commit was generated by cvs2svn to compensate for changes in r1129,
[linux-2.6.git] / drivers / net / irda / sir_kthread.c
index d1a656f..e3904d6 100644 (file)
@@ -19,7 +19,6 @@
 #include <linux/smp_lock.h>
 #include <linux/completion.h>
 #include <linux/delay.h>
-#include <linux/suspend.h>
 
 #include <net/irda/irda.h>
 
@@ -136,8 +135,7 @@ static int irda_thread(void *startup)
                remove_wait_queue(&irda_rq_queue.kick, &wait);
 
                /* make swsusp happy with our thread */
-               if (current->flags & PF_FREEZE)
-                       refrigerator(PF_FREEZE);
+               try_to_freeze();
 
                run_irda_queue();
        }
@@ -223,7 +221,7 @@ static int irda_tx_complete_fsm(struct sir_dev *dev)
                        return 0;
 
                default:
-                       ERROR("%s - undefined state\n", __FUNCTION__);
+                       IRDA_ERROR("%s - undefined state\n", __FUNCTION__);
                        return -EINVAL;
                }
                fsm->substate = next_state;
@@ -392,12 +390,12 @@ static void irda_config_fsm(void *data)
                        break;
 
                default:
-                       ERROR("%s - undefined state\n", __FUNCTION__);
+                       IRDA_ERROR("%s - undefined state\n", __FUNCTION__);
                        fsm->result = -EINVAL;
                        /* fall thru */
 
                case SIRDEV_STATE_ERROR:
-                       ERROR("%s - error: %d\n", __FUNCTION__, fsm->result);
+                       IRDA_ERROR("%s - error: %d\n", __FUNCTION__, fsm->result);
 
 #if 0  /* don't enable this before we have netdev->tx_timeout to recover */
                        netif_stop_queue(dev->netdev);
@@ -440,7 +438,7 @@ int sirdev_schedule_request(struct sir_dev *dev, int initial_state, unsigned par
 
        if (fsm->state == SIRDEV_STATE_DEAD) {
                /* race with sirdev_close should never happen */
-               ERROR("%s(), instance staled!\n", __FUNCTION__);
+               IRDA_ERROR("%s(), instance staled!\n", __FUNCTION__);
                up(&fsm->sem);
                return -ESTALE;         /* or better EPIPE? */
        }
@@ -468,7 +466,7 @@ int sirdev_schedule_request(struct sir_dev *dev, int initial_state, unsigned par
        return 0;
 }
 
-int __init irda_thread_create(void)
+static int __init irda_thread_create(void)
 {
        struct completion startup;
        int pid;
@@ -490,7 +488,7 @@ int __init irda_thread_create(void)
        return 0;
 }
 
-void __exit irda_thread_join(void) 
+static void __exit irda_thread_join(void)
 {
        if (irda_rq_queue.thread) {
                flush_irda_queue();
@@ -501,3 +499,10 @@ void __exit irda_thread_join(void)
        }
 }
 
+module_init(irda_thread_create);
+module_exit(irda_thread_join);
+
+MODULE_AUTHOR("Martin Diehl <info@mdiehl.de>");
+MODULE_DESCRIPTION("IrDA SIR core");
+MODULE_LICENSE("GPL");
+