diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-01-26 10:25:26 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-01-26 13:57:43 +0100 |
commit | 178c4978b3bf1d6876984b2d2659f646cdb39b8a (patch) | |
tree | a9e7488d75df6d142503fbb15e82602200943848 /include/kfifo.h | |
parent | 48529db7d46e600cbbf935af0f14f0a082950993 (diff) | |
download | barebox-178c4978b3bf1d6876984b2d2659f646cdb39b8a.tar.gz barebox-178c4978b3bf1d6876984b2d2659f646cdb39b8a.tar.xz |
kfifo: change kfifo_init to work with a preallocated fifo
kfifo currently only works with dynamically allocated fifos.
Change the currently unused kfifo_init to take a preallocated
fifo. This allows for statically initialized fifos.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/kfifo.h')
-rw-r--r-- | include/kfifo.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/kfifo.h b/include/kfifo.h index 3eb03cb17c..2987e0b1e2 100644 --- a/include/kfifo.h +++ b/include/kfifo.h @@ -28,7 +28,7 @@ struct kfifo { unsigned int out; /* data is extracted from off. (out % size) */ }; -struct kfifo *kfifo_init(unsigned char *buffer, unsigned int size); +void kfifo_init(struct kfifo *fifo, unsigned char *buffer, unsigned int size); struct kfifo *kfifo_alloc(unsigned int size); void kfifo_free(struct kfifo *fifo); |