+/* SPDX-License-Identifier: GPL-2.0+ */
/*
* 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+
*/
#ifndef __LIN_COMPAT_H__
#define __LIN_COMPAT_H__
+#include <linux/bitops.h>
#include <linux/compat.h>
/* common */
-#define ENOTSUPP 524 /* Operation is not supported */
-
-#define BITS_PER_BYTE 8
-#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)]