From: Andrei Emeltchenko Date: Fri, 28 Sep 2012 11:36:09 +0000 (+0300) Subject: Bluetooth: btmrvl: Use DIV_ROUND_UP macro X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e678bad515f06d3ca5def3a28aa21a5aeb51cf30;p=openwrt%2Fstaging%2Fblogic.git Bluetooth: btmrvl: Use DIV_ROUND_UP macro The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) / (d)) Signed-off-by: Andrei Emeltchenko Signed-off-by: Gustavo Padovan --- diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c index 645b42e143fa..ec5c45672f1d 100644 --- a/drivers/bluetooth/btmrvl_sdio.c +++ b/drivers/bluetooth/btmrvl_sdio.c @@ -514,7 +514,7 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv) } blksz = SDIO_BLOCK_SIZE; - num_blocks = (buf_len + blksz - 1) / blksz; + num_blocks = DIV_ROUND_UP(buf_len, blksz); if (buf_len <= SDIO_HEADER_LEN || (num_blocks * blksz) > ALLOC_BUF_SIZE) {