]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/storage/sddr55.c
ipg: missing Kconfig dependency
[linux-2.6-omap-h63xx.git] / drivers / usb / storage / sddr55.c
index 0b1b5b59ca7b6d2423a002a143ef3cf2f1f207a5..d43a3415e12f1d3aa105cfe0b2ff9cdd70c5c62c 100644 (file)
@@ -167,7 +167,8 @@ static int sddr55_read_data(struct us_data *us,
        unsigned long address;
 
        unsigned short pages;
-       unsigned int len, index, offset;
+       unsigned int len, offset;
+       struct scatterlist *sg;
 
        // Since we only read in one block at a time, we have to create
        // a bounce buffer and move the data a piece at a time between the
@@ -178,7 +179,8 @@ static int sddr55_read_data(struct us_data *us,
        buffer = kmalloc(len, GFP_NOIO);
        if (buffer == NULL)
                return USB_STOR_TRANSPORT_ERROR; /* out of memory */
-       index = offset = 0;
+       offset = 0;
+       sg = NULL;
 
        while (sectors>0) {
 
@@ -255,7 +257,7 @@ static int sddr55_read_data(struct us_data *us,
 
                // Store the data in the transfer buffer
                usb_stor_access_xfer_buf(buffer, len, us->srb,
-                               &index, &offset, TO_XFER_BUF);
+                               &sg, &offset, TO_XFER_BUF);
 
                page = 0;
                lba++;
@@ -287,7 +289,8 @@ static int sddr55_write_data(struct us_data *us,
 
        unsigned short pages;
        int i;
-       unsigned int len, index, offset;
+       unsigned int len, offset;
+       struct scatterlist *sg;
 
        /* check if we are allowed to write */
        if (info->read_only || info->force_read_only) {
@@ -304,7 +307,8 @@ static int sddr55_write_data(struct us_data *us,
        buffer = kmalloc(len, GFP_NOIO);
        if (buffer == NULL)
                return USB_STOR_TRANSPORT_ERROR;
-       index = offset = 0;
+       offset = 0;
+       sg = NULL;
 
        while (sectors > 0) {
 
@@ -322,7 +326,7 @@ static int sddr55_write_data(struct us_data *us,
 
                // Get the data from the transfer buffer
                usb_stor_access_xfer_buf(buffer, len, us->srb,
-                               &index, &offset, FROM_XFER_BUF);
+                               &sg, &offset, FROM_XFER_BUF);
 
                US_DEBUGP("Write %02X pages, to PBA %04X"
                        " (LBA %04X) page %02X\n",