]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/irda/irlmp.c
Merge branch 'master' of /home/sam/kernel/linux-2.6/
[mv-sheeva.git] / net / irda / irlmp.c
index 7a4a4d7fbe66bf7774d91e9e04c1a42c2bf5b495..129ad64c15bbcd069f6c61086e510b7b7e50907d 100644 (file)
@@ -24,7 +24,6 @@
  *
  ********************************************************************/
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/string.h>
@@ -44,6 +43,8 @@
 #include <net/irda/irlmp.h>
 #include <net/irda/irlmp_frame.h>
 
+#include <asm/unaligned.h>
+
 static __u8 irlmp_find_free_slsap(void);
 static int irlmp_slsap_inuse(__u8 slsap_sel);
 
@@ -53,7 +54,6 @@ struct irlmp_cb *irlmp = NULL;
 /* These can be altered by the sysctl interface */
 int  sysctl_discovery         = 0;
 int  sysctl_discovery_timeout = 3; /* 3 seconds by default */
-EXPORT_SYMBOL(sysctl_discovery_timeout);
 int  sysctl_discovery_slots   = 6; /* 6 slots by default */
 int  sysctl_lap_keepalive_time = LM_IDLE_TIMEOUT * 1000 / HZ;
 char sysctl_devname[65];
@@ -67,7 +67,6 @@ const char *irlmp_reasons[] = {
        "LM_INIT_DISCONNECT",
        "ERROR, NOT USED",
 };
-EXPORT_SYMBOL(irlmp_reasons);
 
 /*
  * Function irlmp_init (void)
@@ -675,7 +674,6 @@ struct lsap_cb *irlmp_dup(struct lsap_cb *orig, void *instance)
 
        return new;
 }
-EXPORT_SYMBOL(irlmp_dup);
 
 /*
  * Function irlmp_disconnect_request (handle, userdata)
@@ -843,6 +841,7 @@ void irlmp_do_expiry(void)
 void irlmp_do_discovery(int nslots)
 {
        struct lap_cb *lap;
+       __u16 *data_hintsp;
 
        /* Make sure the value is sane */
        if ((nslots != 1) && (nslots != 6) && (nslots != 8) && (nslots != 16)){
@@ -852,7 +851,8 @@ void irlmp_do_discovery(int nslots)
        }
 
        /* Construct new discovery info to be used by IrLAP, */
-       u16ho(irlmp->discovery_cmd.data.hints) = irlmp->hints.word;
+       data_hintsp = (__u16 *) irlmp->discovery_cmd.data.hints;
+       put_unaligned(irlmp->hints.word, data_hintsp);
 
        /*
         *  Set character set for device name (we use ASCII), and