diff --git a/[refs] b/[refs] index 8b70ddc1c79e..9af25815cb8c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a5b9e2c1063046421ce01dcf5ddd7ec12567f3e1 +refs/heads/master: d994ffc247f7c4a48b848f10c4c01c9b06411ada diff --git a/trunk/include/linux/kfifo.h b/trunk/include/linux/kfifo.h index 7ad6d32dd673..c8618243ca5a 100644 --- a/trunk/include/linux/kfifo.h +++ b/trunk/include/linux/kfifo.h @@ -116,6 +116,16 @@ extern __must_check unsigned int kfifo_out(struct kfifo *fifo, extern __must_check unsigned int kfifo_out_peek(struct kfifo *fifo, void *to, unsigned int len, unsigned offset); +/** + * kfifo_initialized - Check if kfifo is initialized. + * @fifo: fifo to check + * Return %true if FIFO is initialized, otherwise %false. + * Assumes the fifo was 0 before. + */ +static inline bool kfifo_initialized(struct kfifo *fifo) +{ + return fifo->buffer != 0; +} /** * kfifo_reset - removes the entire FIFO contents