diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2013-08-02 07:10:12 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2013-08-21 10:46:50 -0400 |
commit | ba34dd3df73eaa2aa4fbb82a91aade3f3a910acb (patch) | |
tree | 1631427b0ed2730c10a93260bcad9609e4592568 /drivers/bluetooth | |
parent | 473c13179c5828f7123a4d9fe449d8bd79fae254 (diff) |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c index 75c262694632..00da6df9f71e 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) | |||
486 | if (firmwarelen - offset < txlen) | 486 | if (firmwarelen - offset < txlen) |
487 | txlen = firmwarelen - offset; | 487 | txlen = firmwarelen - offset; |
488 | 488 | ||
489 | tx_blocks = (txlen + blksz_dl - 1) / blksz_dl; | 489 | tx_blocks = DIV_ROUND_UP(txlen, blksz_dl); |
490 | 490 | ||
491 | memcpy(fwbuf, &firmware[offset], txlen); | 491 | memcpy(fwbuf, &firmware[offset], txlen); |
492 | } | 492 | } |
@@ -873,7 +873,7 @@ static int btmrvl_sdio_host_to_card(struct btmrvl_private *priv, | |||
873 | } | 873 | } |
874 | 874 | ||
875 | blksz = SDIO_BLOCK_SIZE; | 875 | blksz = SDIO_BLOCK_SIZE; |
876 | buf_block_len = (nb + blksz - 1) / blksz; | 876 | buf_block_len = DIV_ROUND_UP(nb, blksz); |
877 | 877 | ||
878 | sdio_claim_host(card->func); | 878 | sdio_claim_host(card->func); |
879 | 879 | ||