X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=kernel%2Fkfifo.c;h=bc41ad0f24f881845d96d77a00a3d3535968566b;hb=9183482f5d4a2de00f66641b974e7f351d41b675;hp=cee419143fd47bb410b0cf80e7762a0f02ffbfce;hpb=72fd4a35a824331d7a0f4168d7576502d95d34b3;p=linux-2.6-omap-h63xx.git diff --git a/kernel/kfifo.c b/kernel/kfifo.c index cee419143fd..bc41ad0f24f 100644 --- a/kernel/kfifo.c +++ b/kernel/kfifo.c @@ -24,6 +24,7 @@ #include #include #include +#include /** * kfifo_init - allocates a new FIFO using a preallocated buffer @@ -41,7 +42,7 @@ struct kfifo *kfifo_init(unsigned char *buffer, unsigned int size, struct kfifo *fifo; /* size must be a power of 2 */ - BUG_ON(size & (size - 1)); + BUG_ON(!is_power_of_2(size)); fifo = kmalloc(sizeof(struct kfifo), gfp_mask); if (!fifo)