| * Copyright (c) 2011 Samsung Electronics |
| * Lukasz Majewski <l.majewski@samsung.com> |
| * This is a Linux kernel compatibility layer for USB Gadget |
| * SPDX-License-Identifier: GPL-2.0+ |
| #include <linux/compat.h> |
| #define ENOTSUPP 524 /* Operation is not supported */ |
| #define BITS_TO_LONGS(nr) \ |
| DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long)) |
| #define DECLARE_BITMAP(name, bits) \ |
| unsigned long name[BITS_TO_LONGS(bits)] |
| #define small_const_nbits(nbits) \ |
| (__builtin_constant_p(nbits) && (nbits) <= BITS_PER_LONG) |
| static inline void bitmap_zero(unsigned long *dst, int nbits) |
| if (small_const_nbits(nbits)) |
| int len = BITS_TO_LONGS(nbits) * sizeof(unsigned long); |
| #define dma_cache_maint(addr, size, mode) cache_flush() |
| #endif /* __LIN_COMPAT_H__ */ |