diff options
author | Tilman Schmidt <tilman@imap.cc> | 2006-04-11 01:55:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-11 09:18:50 -0400 |
commit | 714e8236e5ea9d39169761c546274ceb7eeb765f (patch) | |
tree | ff24b813867d9461abe2bc042034d5afdd4ceae1 /drivers/isdn/gigaset/gigaset.h | |
parent | d48c77841a71ba552ef4e6a862642073652f4473 (diff) |
[PATCH] isdn4linux: Siemens Gigaset drivers: uninline
With Hansjoerg Lipp <hjlipp@web.de>
Uninline a function which was slightly too big to warrant inlining.
Signed-off-by: Hansjoerg Lipp <hjlipp@web.de>
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/isdn/gigaset/gigaset.h')
-rw-r--r-- | drivers/isdn/gigaset/gigaset.h | 42 |
1 files changed, 2 insertions, 40 deletions
diff --git a/drivers/isdn/gigaset/gigaset.h b/drivers/isdn/gigaset/gigaset.h index 7acae34e66e0..446a078224a9 100644 --- a/drivers/isdn/gigaset/gigaset.h +++ b/drivers/isdn/gigaset/gigaset.h | |||
@@ -902,47 +902,9 @@ static inline void gigaset_rcv_error(struct sk_buff *procskb, | |||
902 | /* bitwise byte inversion table */ | 902 | /* bitwise byte inversion table */ |
903 | extern __u8 gigaset_invtab[]; /* in common.c */ | 903 | extern __u8 gigaset_invtab[]; /* in common.c */ |
904 | 904 | ||
905 | |||
906 | /* append received bytes to inbuf */ | 905 | /* append received bytes to inbuf */ |
907 | static inline int gigaset_fill_inbuf(struct inbuf_t *inbuf, | 906 | int gigaset_fill_inbuf(struct inbuf_t *inbuf, const unsigned char *src, |
908 | const unsigned char *src, | 907 | unsigned numbytes); |
909 | unsigned numbytes) | ||
910 | { | ||
911 | unsigned n, head, tail, bytesleft; | ||
912 | |||
913 | gig_dbg(DEBUG_INTR, "received %u bytes", numbytes); | ||
914 | |||
915 | if (!numbytes) | ||
916 | return 0; | ||
917 | |||
918 | bytesleft = numbytes; | ||
919 | tail = atomic_read(&inbuf->tail); | ||
920 | head = atomic_read(&inbuf->head); | ||
921 | gig_dbg(DEBUG_INTR, "buffer state: %u -> %u", head, tail); | ||
922 | |||
923 | while (bytesleft) { | ||
924 | if (head > tail) | ||
925 | n = head - 1 - tail; | ||
926 | else if (head == 0) | ||
927 | n = (RBUFSIZE-1) - tail; | ||
928 | else | ||
929 | n = RBUFSIZE - tail; | ||
930 | if (!n) { | ||
931 | dev_err(inbuf->cs->dev, | ||
932 | "buffer overflow (%u bytes lost)", bytesleft); | ||
933 | break; | ||
934 | } | ||
935 | if (n > bytesleft) | ||
936 | n = bytesleft; | ||
937 | memcpy(inbuf->data + tail, src, n); | ||
938 | bytesleft -= n; | ||
939 | tail = (tail + n) % RBUFSIZE; | ||
940 | src += n; | ||
941 | } | ||
942 | gig_dbg(DEBUG_INTR, "setting tail to %u", tail); | ||
943 | atomic_set(&inbuf->tail, tail); | ||
944 | return numbytes != bytesleft; | ||
945 | } | ||
946 | 908 | ||
947 | /* =========================================================================== | 909 | /* =========================================================================== |
948 | * Functions implemented in interface.c | 910 | * Functions implemented in interface.c |