#include <usb_mass_storage.h>
#include <asm/unaligned.h>
+#include <linux/bitops.h>
#include <linux/usb/gadget.h>
#include <linux/usb/gadget.h>
#include <linux/usb/composite.h>
struct kref {int x; };
struct completion {int x; };
-inline void set_bit(int nr, volatile void *addr)
-{
- int mask;
- unsigned int *a = (unsigned int *) addr;
-
- a += nr >> 5;
- mask = 1 << (nr & 0x1f);
- *a |= mask;
-}
-
-inline void clear_bit(int nr, volatile void *addr)
-{
- int mask;
- unsigned int *a = (unsigned int *) addr;
-
- a += nr >> 5;
- mask = 1 << (nr & 0x1f);
- *a &= ~mask;
-}
-
struct fsg_dev;
struct fsg_common;
* we can simply accept and discard any data received
* until the next reset. */
wedge_bulk_in_endpoint(fsg);
- set_bit(IGNORE_BULK_OUT, &fsg->atomic_bitflags);
+ generic_set_bit(IGNORE_BULK_OUT, &fsg->atomic_bitflags);
return -EINVAL;
}
fsg->bulk_out_enabled = 1;
common->bulk_out_maxpacket =
le16_to_cpu(get_unaligned(&d->wMaxPacketSize));
- clear_bit(IGNORE_BULK_OUT, &fsg->atomic_bitflags);
+ generic_clear_bit(IGNORE_BULK_OUT, &fsg->atomic_bitflags);
/* Allocate the requests */
for (i = 0; i < FSG_NUM_BUFFERS; ++i) {