Commit aefdf116 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://bk.arm.linux.org.uk/linux-2.6-mmc

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents 2bd1b5e2 3b97cc29
...@@ -301,14 +301,15 @@ static u32 mmc_select_voltage(struct mmc_host *host, u32 ocr) ...@@ -301,14 +301,15 @@ static u32 mmc_select_voltage(struct mmc_host *host, u32 ocr)
#define UNSTUFF_BITS(resp,start,size) \ #define UNSTUFF_BITS(resp,start,size) \
({ \ ({ \
const u32 __mask = (1 << (size)) - 1; \ const int __size = size; \
const u32 __mask = (__size < 32 ? 1 << __size : 0) - 1; \
const int __off = 3 - ((start) / 32); \ const int __off = 3 - ((start) / 32); \
const int __shft = (start) & 31; \ const int __shft = (start) & 31; \
u32 __res; \ u32 __res; \
\ \
__res = resp[__off] >> __shft; \ __res = resp[__off] >> __shft; \
if ((size) + __shft >= 32) \ if (__size + __shft > 32) \
__res |= resp[__off-1] << (32 - __shft); \ __res |= resp[__off-1] << ((32 - __shft) % 32); \
__res & __mask; \ __res & __mask; \
}) })
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment