USB, Mass Storage, composite, gadget: Fix build failure and memset of a struct
[firefly-linux-kernel-4.4.55.git] / drivers / usb / gadget / f_mass_storage.c
index b5dbb2308f56f84d9225155abb6356fd0be10d94..6d8e533949eb3cb3a7c13212f36610e1b25090d9 100644 (file)
 
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
+#include <linux/usb/composite.h>
 
 #include "gadget_chips.h"
 
@@ -2763,7 +2764,7 @@ static struct fsg_common *fsg_common_init(struct fsg_common *common,
                        return ERR_PTR(-ENOMEM);
                common->free_storage_on_release = 1;
        } else {
-               memset(common, 0, sizeof common);
+               memset(common, 0, sizeof *common);
                common->free_storage_on_release = 0;
        }