]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
libertas: use roundup instead of opencoding
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Sat, 13 Dec 2008 19:33:13 +0000 (21:33 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 19 Dec 2008 20:23:14 +0000 (15:23 -0500)
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/if_sdio.c

index b54e2ea8346bf26ae5071ed39bbfe450830a980d..4519d7314f47c37677df87ca51fc4b53bfeac2fe 100644 (file)
@@ -26,6 +26,7 @@
  * if_sdio_card_to_host() to pad the data.
  */
 
+#include <linux/kernel.h>
 #include <linux/moduleparam.h>
 #include <linux/firmware.h>
 #include <linux/netdevice.h>
@@ -581,7 +582,7 @@ static int if_sdio_prog_real(struct if_sdio_card *card)
                                chunk_size, (chunk_size + 31) / 32 * 32);
 */
                        ret = sdio_writesb(card->func, card->ioport,
-                               chunk_buffer, (chunk_size + 31) / 32 * 32);
+                               chunk_buffer, roundup(chunk_size, 32));
                        if (ret)
                                goto release;