X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=include%2Flinux%2Fkfifo.h;h=ad6bdf5a5970c5fdbceb6b5c440a196b7a620b22;hb=f653398c86a1c104f0992bd788dd4bb065449be4;hp=48eccd865bd8add9d9353f13771eab89745f0000;hpb=dd0fc66fb33cd610bc1a5db8a5e232d34879b4d7;p=safe%2Fjmp%2Flinux-2.6 diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index 48eccd8..ad6bdf5 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h @@ -21,8 +21,6 @@ #ifndef _LINUX_KFIFO_H #define _LINUX_KFIFO_H -#ifdef __KERNEL__ - #include #include @@ -40,7 +38,7 @@ extern struct kfifo *kfifo_alloc(unsigned int size, gfp_t gfp_mask, spinlock_t *lock); extern void kfifo_free(struct kfifo *fifo); extern unsigned int __kfifo_put(struct kfifo *fifo, - unsigned char *buffer, unsigned int len); + const unsigned char *buffer, unsigned int len); extern unsigned int __kfifo_get(struct kfifo *fifo, unsigned char *buffer, unsigned int len); @@ -74,12 +72,12 @@ static inline void kfifo_reset(struct kfifo *fifo) * @buffer: the data to be added. * @len: the length of the data to be added. * - * This function copies at most 'len' bytes from the 'buffer' into + * This function copies at most @len bytes from the @buffer into * the FIFO depending on the free space, and returns the number of * bytes copied. */ static inline unsigned int kfifo_put(struct kfifo *fifo, - unsigned char *buffer, unsigned int len) + const unsigned char *buffer, unsigned int len) { unsigned long flags; unsigned int ret; @@ -99,8 +97,8 @@ static inline unsigned int kfifo_put(struct kfifo *fifo, * @buffer: where the data must be copied. * @len: the size of the destination buffer. * - * This function copies at most 'len' bytes from the FIFO into the - * 'buffer' and returns the number of copied bytes. + * This function copies at most @len bytes from the FIFO into the + * @buffer and returns the number of copied bytes. */ static inline unsigned int kfifo_get(struct kfifo *fifo, unsigned char *buffer, unsigned int len) @@ -151,7 +149,4 @@ static inline unsigned int kfifo_len(struct kfifo *fifo) return ret; } -#else -#warning "don't include kernel headers in userspace" -#endif /* __KERNEL__ */ #endif