[atmel-serial] Fix compilation error caused by BUILD_BUG_ON() in 2.6.32-rc2 kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix compilation error caused by BUILD_BUG_ON() in 2.6.32-rc2 kernel.

Add ring buffer size requirements to the macro definition instead of calling
BUILD_BUG_ON().

See the following thread for details:
http://www.gossamer-threads.com/lists/linux/kernel/1118447?page=last

Signed-off-by: Yegor Yefremov <yegorslists@xxxxxxxxxxxxxx>

Index: linus2/drivers/serial/atmel_serial.c
===================================================================
--- linus2.orig/drivers/serial/atmel_serial.c
+++ linus2/drivers/serial/atmel_serial.c
@@ -123,6 +123,7 @@ struct atmel_uart_char {
 	u16		ch;
 };
 
+/* the ring buffer size must be the power of 2 */
 #define ATMEL_SERIAL_RINGSIZE 1024
 
 /*
@@ -1531,8 +1532,6 @@ static int __devinit atmel_serial_probe(
 	void *data;
 	int ret;
 
-	BUILD_BUG_ON(!is_power_of_2(ATMEL_SERIAL_RINGSIZE));
-
 	port = &atmel_ports[pdev->id];
 	port->backup_imr = 0;
 

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux