]> git.sur5r.net Git - u-boot/blobdiff - drivers/usb/gadget/storage_common.c
ums: support multiple LUNs at once
[u-boot] / drivers / usb / gadget / storage_common.c
index b55e40bbda947bb1c1c4f6f9c25ee03d0237df0f..b6df130a1405bc94328084f519de0c7fe56eda8f 100644 (file)
@@ -564,7 +564,8 @@ static struct usb_gadget_strings    fsg_stringtab = {
  * the caller must own fsg->filesem for writing.
  */
 
-static int fsg_lun_open(struct fsg_lun *curlun, const char *filename)
+static int fsg_lun_open(struct fsg_lun *curlun, unsigned int num_sectors,
+                       const char *filename)
 {
        int                             ro;
 
@@ -572,8 +573,8 @@ static int fsg_lun_open(struct fsg_lun *curlun, const char *filename)
        ro = curlun->initially_ro;
 
        curlun->ro = ro;
-       curlun->file_length = ums->num_sectors << 9;
-       curlun->num_sectors = ums->num_sectors;
+       curlun->file_length = num_sectors << 9;
+       curlun->num_sectors = num_sectors;
        debug("open backing file: %s\n", filename);
 
        return 0;