Skip to content

Commit

Permalink
atmel_serial: fix bad BUILD_BUG_ON() usage
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Haavard Skinnemoen authored and Linus Torvalds committed Oct 29, 2009
1 parent 6a7b954 commit 9d09daf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/serial/atmel_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,7 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev)
void *data;
int ret;

BUILD_BUG_ON(!is_power_of_2(ATMEL_SERIAL_RINGSIZE));
BUILD_BUG_ON(ATMEL_SERIAL_RINGSIZE & (ATMEL_SERIAL_RINGSIZE - 1));

port = &atmel_ports[pdev->id];
port->backup_imr = 0;
Expand Down

0 comments on commit 9d09daf

Please sign in to comment.