git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak...
[pandora-kernel.git]
/
drivers
/
usb
/
storage
/
sddr55.c
diff --git
a/drivers/usb/storage/sddr55.c
b/drivers/usb/storage/sddr55.c
index
8451779
..
0d8df75
100644
(file)
--- a/
drivers/usb/storage/sddr55.c
+++ b/
drivers/usb/storage/sddr55.c
@@
-1,6
+1,4
@@
/* Driver for SanDisk SDDR-55 SmartMedia reader
/* Driver for SanDisk SDDR-55 SmartMedia reader
- *
- * $Id:$
*
* SDDR55 driver v0.1:
*
*
* SDDR55 driver v0.1:
*
@@
-167,7
+165,8
@@
static int sddr55_read_data(struct us_data *us,
unsigned long address;
unsigned short pages;
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
// 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
+177,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 */
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) {
while (sectors>0) {
@@
-255,7
+255,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,
// 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++;
page = 0;
lba++;
@@
-287,7
+287,8
@@
static int sddr55_write_data(struct us_data *us,
unsigned short pages;
int i;
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) {
/* check if we are allowed to write */
if (info->read_only || info->force_read_only) {
@@
-304,7
+305,8
@@
static int sddr55_write_data(struct us_data *us,
buffer = kmalloc(len, GFP_NOIO);
if (buffer == NULL)
return USB_STOR_TRANSPORT_ERROR;
buffer = kmalloc(len, GFP_NOIO);
if (buffer == NULL)
return USB_STOR_TRANSPORT_ERROR;
- index = offset = 0;
+ offset = 0;
+ sg = NULL;
while (sectors > 0) {
while (sectors > 0) {
@@
-322,7
+324,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,
// 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",
US_DEBUGP("Write %02X pages, to PBA %04X"
" (LBA %04X) page %02X\n",
@@
-518,8
+520,8
@@
int sddr55_reset(struct us_data *us) {
static unsigned long sddr55_get_capacity(struct us_data *us) {
static unsigned long sddr55_get_capacity(struct us_data *us) {
- unsigned char
manufacturerID
;
- unsigned char
deviceID
;
+ unsigned char
uninitialized_var(manufacturerID)
;
+ unsigned char
uninitialized_var(deviceID)
;
int result;
struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra;
int result;
struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra;
@@
-751,11
+753,10
@@
int sddr55_transport(struct scsi_cmnd *srb, struct us_data *us)
struct sddr55_card_info *info;
if (!us->extra) {
struct sddr55_card_info *info;
if (!us->extra) {
- us->extra = k
m
alloc(
+ us->extra = k
z
alloc(
sizeof(struct sddr55_card_info), GFP_NOIO);
if (!us->extra)
return USB_STOR_TRANSPORT_ERROR;
sizeof(struct sddr55_card_info), GFP_NOIO);
if (!us->extra)
return USB_STOR_TRANSPORT_ERROR;
- memset(us->extra, 0, sizeof(struct sddr55_card_info));
us->extra_destructor = sddr55_card_info_destructor;
}
us->extra_destructor = sddr55_card_info_destructor;
}