diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/bluetooth/btmrvl_sdio.c | 12 | ||||
-rw-r--r-- | drivers/bluetooth/btmrvl_sdio.h | 3 |
2 files changed, 9 insertions, 6 deletions
diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c index 224af53e0fae..1cfa8b4ace50 100644 --- a/drivers/bluetooth/btmrvl_sdio.c +++ b/drivers/bluetooth/btmrvl_sdio.c @@ -481,12 +481,14 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv) goto exit; } - if ((u32) skb->data & (BTSDIO_DMA_ALIGN - 1)) { - skb_put(skb, (u32) skb->data & (BTSDIO_DMA_ALIGN - 1)); - skb_pull(skb, (u32) skb->data & (BTSDIO_DMA_ALIGN - 1)); + if ((unsigned long) skb->data & (BTSDIO_DMA_ALIGN - 1)) { + skb_put(skb, (unsigned long) skb->data & + (BTSDIO_DMA_ALIGN - 1)); + skb_pull(skb, (unsigned long) skb->data & + (BTSDIO_DMA_ALIGN - 1)); } - payload = skb->tail; + payload = skb->data; ret = sdio_readsb(card->func, payload, card->ioport, buf_block_len * blksz); @@ -773,7 +775,7 @@ static int btmrvl_sdio_host_to_card(struct btmrvl_private *priv, } buf = payload; - if ((u32) payload & (BTSDIO_DMA_ALIGN - 1)) { + if ((unsigned long) payload & (BTSDIO_DMA_ALIGN - 1)) { tmpbufsz = ALIGN_SZ(nb, BTSDIO_DMA_ALIGN); tmpbuf = kmalloc(tmpbufsz, GFP_KERNEL); memset(tmpbuf, 0, tmpbufsz); diff --git a/drivers/bluetooth/btmrvl_sdio.h b/drivers/bluetooth/btmrvl_sdio.h index 2dd284e0df14..27329f107e5a 100644 --- a/drivers/bluetooth/btmrvl_sdio.h +++ b/drivers/bluetooth/btmrvl_sdio.h @@ -104,4 +104,5 @@ struct btmrvl_sdio_device { /* Macros for Data Alignment : address */ #define ALIGN_ADDR(p, a) \ - ((((u32)(p)) + (((u32)(a)) - 1)) & ~(((u32)(a)) - 1)) + ((((unsigned long)(p)) + (((unsigned long)(a)) - 1)) & \ + ~(((unsigned long)(a)) - 1)) |