summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2013-08-02 14:10:12 +0300
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2013-08-21 16:46:50 +0200
commitba34dd3df73eaa2aa4fbb82a91aade3f3a910acb (patch)
tree1631427b0ed2730c10a93260bcad9609e4592568 /drivers/bluetooth
parent473c13179c5828f7123a4d9fe449d8bd79fae254 (diff)
downloadop-kernel-dev-ba34dd3df73eaa2aa4fbb82a91aade3f3a910acb.zip
op-kernel-dev-ba34dd3df73eaa2aa4fbb82a91aade3f3a910acb.tar.gz
Bluetooth: use DIV_ROUND_UP in suitable places in btmrvl_sdio
There are two places where DIV_ROUND_UP may be used. It makes code a bit clearer. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/btmrvl_sdio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c
index 75c2626..00da6df 100644
--- a/drivers/bluetooth/btmrvl_sdio.c
+++ b/drivers/bluetooth/btmrvl_sdio.c
@@ -486,7 +486,7 @@ static int btmrvl_sdio_download_fw_w_helper(struct btmrvl_sdio_card *card)
if (firmwarelen - offset < txlen)
txlen = firmwarelen - offset;
- tx_blocks = (txlen + blksz_dl - 1) / blksz_dl;
+ tx_blocks = DIV_ROUND_UP(txlen, blksz_dl);
memcpy(fwbuf, &firmware[offset], txlen);
}
@@ -873,7 +873,7 @@ static int btmrvl_sdio_host_to_card(struct btmrvl_private *priv,
}
blksz = SDIO_BLOCK_SIZE;
- buf_block_len = (nb + blksz - 1) / blksz;
+ buf_block_len = DIV_ROUND_UP(nb, blksz);
sdio_claim_host(card->func);
OpenPOWER on IntegriCloud