usb: gadget: rndis: fix broken data aggregation build
authorAmit Pundir <amit.pundir@linaro.org>
Mon, 21 Dec 2015 08:45:58 +0000 (14:15 +0530)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:52:17 +0000 (13:52 -0800)
Declare "cdev" to fix broken AOSP commit
"RNDIS: Add Data aggregation (multi packet) support",
otherwise we run into following build failure:

  CC      drivers/usb/gadget/function/f_rndis.o
drivers/usb/gadget/function/f_rndis.c: In function ‘rndis_command_complete’:
drivers/usb/gadget/function/f_rndis.c:479:3: error: ‘cdev’ undeclared (first use in this function)
drivers/usb/gadget/function/f_rndis.c:479:3: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [drivers/usb/gadget/function/f_rndis.o] Error 1

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
drivers/usb/gadget/function/f_rndis.c

index 2758522180f392eabfa30f7eb991538b51097bb9..2bc1197074a8812092af98fb57d5b66b8181091f 100644 (file)
@@ -459,6 +459,7 @@ static void rndis_response_complete(struct usb_ep *ep, struct usb_request *req)
 static void rndis_command_complete(struct usb_ep *ep, struct usb_request *req)
 {
        struct f_rndis                  *rndis = req->context;
+       struct usb_composite_dev        *cdev = rndis->port.func.config->cdev;
        int                             status;
        rndis_init_msg_type             *buf;