1
0
Fork 0

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>
hifive-unleashed-5.1
Andy Shevchenko 2013-08-02 14:10:12 +03:00 committed by Gustavo Padovan
parent 473c13179c
commit ba34dd3df7
1 changed files with 2 additions and 2 deletions

View File

@ -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);