diff options
author | Stefani Seibold <stefani@seibold.net> | 2009-12-21 14:37:28 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-22 14:17:56 -0800 |
commit | e64c026dd09b73faf20707711402fc5ed55a8e70 (patch) | |
tree | 4780736e021824f15329a0826eff3cc27d3f9646 /include/linux/kfifo.h | |
parent | c1e13f25674ed564948ecb7dfe5f83e578892896 (diff) |
kfifo: cleanup namespace
change name of __kfifo_* functions to kfifo_*, because the prefix __kfifo
should be reserved for internal functions only.
Signed-off-by: Stefani Seibold <stefani@seibold.net>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/kfifo.h')
-rw-r--r-- | include/linux/kfifo.h | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index e0f5c9d4197d..a893acda3964 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h @@ -37,34 +37,25 @@ extern void kfifo_init(struct kfifo *fifo, unsigned char *buffer, extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size, gfp_t gfp_mask); extern void kfifo_free(struct kfifo *fifo); -extern unsigned int __kfifo_put(struct kfifo *fifo, +extern unsigned int kfifo_put(struct kfifo *fifo, const unsigned char *buffer, unsigned int len); -extern unsigned int __kfifo_get(struct kfifo *fifo, +extern unsigned int kfifo_get(struct kfifo *fifo, unsigned char *buffer, unsigned int len); /** - * __kfifo_reset - removes the entire FIFO contents, no locking version - * @fifo: the fifo to be emptied. - */ -static inline void __kfifo_reset(struct kfifo *fifo) -{ - fifo->in = fifo->out = 0; -} - -/** * kfifo_reset - removes the entire FIFO contents * @fifo: the fifo to be emptied. */ static inline void kfifo_reset(struct kfifo *fifo) { - __kfifo_reset(fifo); + fifo->in = fifo->out = 0; } /** - * __kfifo_len - returns the number of bytes available in the FIFO + * kfifo_len - returns the number of used bytes in the FIFO * @fifo: the fifo to be used. */ -static inline unsigned int __kfifo_len(struct kfifo *fifo) +static inline unsigned int kfifo_len(struct kfifo *fifo) { register unsigned int out; @@ -92,7 +83,7 @@ static inline __must_check unsigned int kfifo_put_locked(struct kfifo *fifo, spin_lock_irqsave(lock, flags); - ret = __kfifo_put(fifo, from, n); + ret = kfifo_put(fifo, from, n); spin_unlock_irqrestore(lock, flags); @@ -117,7 +108,7 @@ static inline __must_check unsigned int kfifo_get_locked(struct kfifo *fifo, spin_lock_irqsave(lock, flags); - ret = __kfifo_get(fifo, to, n); + ret = kfifo_get(fifo, to, n); /* * optimization: if the FIFO is empty, set the indices to 0 @@ -131,13 +122,4 @@ static inline __must_check unsigned int kfifo_get_locked(struct kfifo *fifo, return ret; } -/** - * kfifo_len - returns the number of bytes available in the FIFO - * @fifo: the fifo to be used. - */ -static inline unsigned int kfifo_len(struct kfifo *fifo) -{ - return __kfifo_len(fifo); -} - #endif |