aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/atmel_serial.c
diff options
context:
space:
mode:
authorHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2009-10-26 19:50:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-10-29 10:39:30 -0400
commit9d09daf8e891e6ed60f96fbaf765ba7bced8bad1 (patch)
tree1518c6f1fdfc9af99b81994cd7dc654bb97de6aa /drivers/serial/atmel_serial.c
parent6a7b95481d49f73991d3dbf8c1e696a24684ac05 (diff)
atmel_serial: fix bad BUILD_BUG_ON() usage
is_power_of_2() appears not to be constant enough for BUILD_BUG_ON() after the latest rework, so replace it with an open-coded test. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Jan Beulich <jbeulich@novell.com> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Alan Cox <alan@linux.intel.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Claudio Scordino <claudio@evidence.eu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/serial/atmel_serial.c')
-rw-r--r--drivers/serial/atmel_serial.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
index 3551c5cb7094..9d948bccafaf 100644
--- a/drivers/serial/atmel_serial.c
+++ b/drivers/serial/atmel_serial.c
@@ -1531,7 +1531,7 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev)
1531 void *data; 1531 void *data;
1532 int ret; 1532 int ret;
1533 1533
1534 BUILD_BUG_ON(!is_power_of_2(ATMEL_SERIAL_RINGSIZE)); 1534 BUILD_BUG_ON(ATMEL_SERIAL_RINGSIZE & (ATMEL_SERIAL_RINGSIZE - 1));
1535 1535
1536 port = &atmel_ports[pdev->id]; 1536 port = &atmel_ports[pdev->id];
1537 port->backup_imr = 0; 1537 port->backup_imr = 0;