X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Fstaging%2Fkeucr%2Fscsiglue.c;h=afb00d84679dfa8d12d51cd8f8804696752c3185;hb=0c46d68d1930c8a58d0f291328b9759da754e599;hp=48e1005349dac8e40a0066f942c5738c6ff8466c;hpb=a8a07fffe4ecab7b77a4009ed317361385616aec;p=karo-tx-linux.git diff --git a/drivers/staging/keucr/scsiglue.c b/drivers/staging/keucr/scsiglue.c index 48e1005349da..afb00d84679d 100644 --- a/drivers/staging/keucr/scsiglue.c +++ b/drivers/staging/keucr/scsiglue.c @@ -73,7 +73,8 @@ static int slave_configure(struct scsi_device *sdev) if (us->fflags & US_FL_CAPACITY_HEURISTICS) sdev->guess_capacity = 1; if (sdev->scsi_level > SCSI_2) - sdev->sdev_target->scsi_level = sdev->scsi_level = SCSI_2; + sdev->sdev_target->scsi_level = sdev->scsi_level + = SCSI_2; sdev->retry_hwerror = 1; sdev->allow_restart = 1; sdev->last_sector_bug = 1; @@ -144,7 +145,7 @@ static int command_abort(struct scsi_cmnd *srb) scsi_lock(us_to_host(us)); if (us->srb != srb) { scsi_unlock(us_to_host(us)); - printk("-- nothing to abort\n"); + dev_info(&us->pusb_dev->dev, "-- nothing to abort\n"); return FAILED; } @@ -319,8 +320,11 @@ static ssize_t store_max_sectors(struct device *dev, return -EINVAL; } -static DEVICE_ATTR(max_sectors, S_IRUGO | S_IWUSR, show_max_sectors, store_max_sectors); -static struct device_attribute *sysfs_device_attr_list[] = {&dev_attr_max_sectors, NULL, }; +static DEVICE_ATTR(max_sectors, S_IRUGO | S_IWUSR, show_max_sectors, + store_max_sectors); +static struct device_attribute *sysfs_device_attr_list[] = { + &dev_attr_max_sectors, NULL, +}; /* this defines our host template, with which we'll allocate hosts */ @@ -393,8 +397,9 @@ unsigned char usb_stor_sense_invalidCDB[18] = { /* * usb_stor_access_xfer_buf() */ -unsigned int usb_stor_access_xfer_buf(struct us_data *us, unsigned char *buffer, - unsigned int buflen, struct scsi_cmnd *srb, struct scatterlist **sgptr, +unsigned int usb_stor_access_xfer_buf(struct us_data *us, + unsigned char *buffer, unsigned int buflen, + struct scsi_cmnd *srb, struct scatterlist **sgptr, unsigned int *offset, enum xfer_buf_dir dir) { unsigned int cnt; @@ -424,7 +429,7 @@ unsigned int usb_stor_access_xfer_buf(struct us_data *us, unsigned char *buffer, while (sglen > 0) { unsigned int plen = min(sglen, - (unsigned int)PAGE_SIZE - poff); + (unsigned int)PAGE_SIZE - poff); unsigned char *ptr = kmap(page); if (dir == TO_XFER_BUF)