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 ...
This commit is contained in:
22
lib/bitmap.c
22
lib/bitmap.c
@@ -996,3 +996,25 @@ int bitmap_allocate_region(unsigned long *bitmap, int pos, int order)
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(bitmap_allocate_region);
|
||||
|
||||
/**
|
||||
* bitmap_copy_le - copy a bitmap, putting the bits into little-endian order.
|
||||
* @dst: destination buffer
|
||||
* @src: bitmap to copy
|
||||
* @nbits: number of bits in the bitmap
|
||||
*
|
||||
* Require nbits % BITS_PER_LONG == 0.
|
||||
*/
|
||||
void bitmap_copy_le(void *dst, const unsigned long *src, int nbits)
|
||||
{
|
||||
unsigned long *d = dst;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < nbits/BITS_PER_LONG; i++) {
|
||||
if (BITS_PER_LONG == 64)
|
||||
d[i] = cpu_to_le64(src[i]);
|
||||
else
|
||||
d[i] = cpu_to_le32(src[i]);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(bitmap_copy_le);
|
||||
|
Reference in New Issue
Block a user