Merge branch 'semaphore' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc
[pandora-kernel.git] / drivers / isdn / gigaset / asyncdata.c
index ddf5e92..c2bd97d 100644 (file)
  * =====================================================================
  */
 
-/* not set by Kbuild when building both ser_gigaset and usb_gigaset */
-#ifndef KBUILD_MODNAME
-#define KBUILD_MODNAME "asy_gigaset"
-#endif
-
 #include "gigaset.h"
 #include <linux/crc-ccitt.h>
 #include <linux/bitrev.h>
@@ -355,8 +350,8 @@ void gigaset_m10x_input(struct inbuf_t *inbuf)
        unsigned char *src, c;
        int procbytes;
 
-       head = atomic_read(&inbuf->head);
-       tail = atomic_read(&inbuf->tail);
+       head = inbuf->head;
+       tail = inbuf->tail;
        gig_dbg(DEBUG_INTR, "buffer state: %u -> %u", head, tail);
 
        if (head != tail) {
@@ -366,7 +361,7 @@ void gigaset_m10x_input(struct inbuf_t *inbuf)
                gig_dbg(DEBUG_INTR, "processing %u bytes", numbytes);
 
                while (numbytes) {
-                       if (atomic_read(&cs->mstate) == MS_LOCKED) {
+                       if (cs->mstate == MS_LOCKED) {
                                procbytes = lock_loop(src, numbytes, inbuf);
                                src += procbytes;
                                numbytes -= procbytes;
@@ -441,9 +436,10 @@ nextbyte:
                }
 
                gig_dbg(DEBUG_INTR, "setting head to %u", head);
-               atomic_set(&inbuf->head, head);
+               inbuf->head = head;
        }
 }
+EXPORT_SYMBOL_GPL(gigaset_m10x_input);
 
 
 /* == data output ========================================================== */
@@ -579,7 +575,8 @@ int gigaset_m10x_send_skb(struct bc_state *bcs, struct sk_buff *skb)
        else
                skb = iraw_encode(skb, HW_HDR_LEN, 0);
        if (!skb) {
-               err("unable to allocate memory for encoding!\n");
+               dev_err(bcs->cs->dev,
+                       "unable to allocate memory for encoding!\n");
                return -ENOMEM;
        }
 
@@ -591,3 +588,4 @@ int gigaset_m10x_send_skb(struct bc_state *bcs, struct sk_buff *skb)
 
        return len;     /* ok so far */
 }
+EXPORT_SYMBOL_GPL(gigaset_m10x_send_skb);