struct android_dev *dev = _android_dev;
struct usb_composite_dev *cdev = get_gadget_data(gadget);
struct usb_request *req = cdev->req;
- struct android_usb_function **functions = dev->functions;
struct android_usb_function *f;
int value = -EOPNOTSUPP;
unsigned long flags;
req->length = 0;
gadget->ep0->driver_data = cdev;
- while ((f = *functions++)) {
+ list_for_each_entry(f, &dev->enabled_functions, enabled_list) {
if (f->ctrlrequest) {
value = f->ctrlrequest(f, cdev, c);
if (value >= 0)