diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 11:20:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 11:20:34 -0400 |
commit | 9779a8325a9bbf4ccd3853e0e4064984cf9da9c9 (patch) | |
tree | 7814d54c7554210ee03d0dbecc546cc2e8a876ec /lib/bitmap.c | |
parent | 309e1e4240636f3a9704d77a164a08e1f5a81fea (diff) | |
parent | 61e0e79ee3c609eb34edf2fe023708cba6a79b1f (diff) |
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb
* 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb: (47 commits)
uwb: wrong sizeof argument in mac address compare
uwb: don't use printk_ratelimit() so often
uwb: use kcalloc where appropriate
uwb: use time_after() when purging stale beacons
uwb: add credits for the original developers of the UWB/WUSB/WLP subsystems
uwb: add entries in the MAINTAINERS file
uwb: depend on EXPERIMENTAL
wusb: wusb-cbaf (CBA driver) sysfs ABI simplification
uwb: document UWB and WUSB sysfs files
uwb: add symlinks in sysfs between radio controllers and PALs
uwb: dont tranmit identification IEs
uwb: i1480/GUWA100U: fix firmware download issues
uwb: i1480: remove MAC/PHY information checking function
uwb: add Intel i1480 HWA to the UWB RC quirk table
uwb: disable command/event filtering for D-Link DUB-1210
uwb: initialize the debug sub-system
uwb: Fix handling IEs with empty IE data in uwb_est_get_size()
wusb: fix bmRequestType for Abort RPipe request
wusb: fix error path for wusb_set_dev_addr()
wusb: add HWA host controller driver
...
Diffstat (limited to 'lib/bitmap.c')
-rw-r--r-- | lib/bitmap.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/bitmap.c b/lib/bitmap.c index 482df94ea21e..1338469ac849 100644 --- a/lib/bitmap.c +++ b/lib/bitmap.c | |||
@@ -996,3 +996,25 @@ int bitmap_allocate_region(unsigned long *bitmap, int pos, int order) | |||
996 | return 0; | 996 | return 0; |
997 | } | 997 | } |
998 | EXPORT_SYMBOL(bitmap_allocate_region); | 998 | EXPORT_SYMBOL(bitmap_allocate_region); |
999 | |||
1000 | /** | ||
1001 | * bitmap_copy_le - copy a bitmap, putting the bits into little-endian order. | ||
1002 | * @dst: destination buffer | ||
1003 | * @src: bitmap to copy | ||
1004 | * @nbits: number of bits in the bitmap | ||
1005 | * | ||
1006 | * Require nbits % BITS_PER_LONG == 0. | ||
1007 | */ | ||
1008 | void bitmap_copy_le(void *dst, const unsigned long *src, int nbits) | ||
1009 | { | ||
1010 | unsigned long *d = dst; | ||
1011 | int i; | ||
1012 | |||
1013 | for (i = 0; i < nbits/BITS_PER_LONG; i++) { | ||
1014 | if (BITS_PER_LONG == 64) | ||
1015 | d[i] = cpu_to_le64(src[i]); | ||
1016 | else | ||
1017 | d[i] = cpu_to_le32(src[i]); | ||
1018 | } | ||
1019 | } | ||
1020 | EXPORT_SYMBOL(bitmap_copy_le); | ||