summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/usb/storage/scsiglue.c
diff options
context:
space:
mode:
authorJosé Pekkarinen <jose.pekkarinen@nokia.com>2016-04-11 10:41:07 +0300
committerJosé Pekkarinen <jose.pekkarinen@nokia.com>2016-04-13 08:17:18 +0300
commite09b41010ba33a20a87472ee821fa407a5b8da36 (patch)
treed10dc367189862e7ca5c592f033dc3726e1df4e3 /kernel/drivers/usb/storage/scsiglue.c
parentf93b97fd65072de626c074dbe099a1fff05ce060 (diff)
These changes are the raw update to linux-4.4.6-rt14. Kernel sources
are taken from kernel.org, and rt patch from the rt wiki download page. During the rebasing, the following patch collided: Force tick interrupt and get rid of softirq magic(I70131fb85). Collisions have been removed because its logic was found on the source already. Change-Id: I7f57a4081d9deaa0d9ccfc41a6c8daccdee3b769 Signed-off-by: José Pekkarinen <jose.pekkarinen@nokia.com>
Diffstat (limited to 'kernel/drivers/usb/storage/scsiglue.c')
-rw-r--r--kernel/drivers/usb/storage/scsiglue.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/kernel/drivers/usb/storage/scsiglue.c b/kernel/drivers/usb/storage/scsiglue.c
index 0e400f382..dba51362d 100644
--- a/kernel/drivers/usb/storage/scsiglue.c
+++ b/kernel/drivers/usb/storage/scsiglue.c
@@ -456,17 +456,13 @@ static int write_info(struct Scsi_Host *host, char *buffer, int length)
return length;
}
-/* we use this macro to help us write into the buffer */
-#undef SPRINTF
-#define SPRINTF(args...) seq_printf(m, ## args)
-
static int show_info (struct seq_file *m, struct Scsi_Host *host)
{
struct us_data *us = host_to_us(host);
const char *string;
/* print the controller name */
- SPRINTF(" Host scsi%d: usb-storage\n", host->host_no);
+ seq_printf(m, " Host scsi%d: usb-storage\n", host->host_no);
/* print product, vendor, and serial number strings */
if (us->pusb_dev->manufacturer)
@@ -475,26 +471,26 @@ static int show_info (struct seq_file *m, struct Scsi_Host *host)
string = us->unusual_dev->vendorName;
else
string = "Unknown";
- SPRINTF(" Vendor: %s\n", string);
+ seq_printf(m, " Vendor: %s\n", string);
if (us->pusb_dev->product)
string = us->pusb_dev->product;
else if (us->unusual_dev->productName)
string = us->unusual_dev->productName;
else
string = "Unknown";
- SPRINTF(" Product: %s\n", string);
+ seq_printf(m, " Product: %s\n", string);
if (us->pusb_dev->serial)
string = us->pusb_dev->serial;
else
string = "None";
- SPRINTF("Serial Number: %s\n", string);
+ seq_printf(m, "Serial Number: %s\n", string);
/* show the protocol and transport */
- SPRINTF(" Protocol: %s\n", us->protocol_name);
- SPRINTF(" Transport: %s\n", us->transport_name);
+ seq_printf(m, " Protocol: %s\n", us->protocol_name);
+ seq_printf(m, " Transport: %s\n", us->transport_name);
/* show the device flags */
- SPRINTF(" Quirks:");
+ seq_printf(m, " Quirks:");
#define US_FLAG(name, value) \
if (us->fflags & value) seq_printf(m, " " #name);
@@ -540,7 +536,7 @@ static struct device_attribute *sysfs_device_attr_list[] = {
* this defines our host template, with which we'll allocate hosts
*/
-struct scsi_host_template usb_stor_host_template = {
+static const struct scsi_host_template usb_stor_host_template = {
/* basic userland interface stuff */
.name = "usb-storage",
.proc_name = "usb-storage",
@@ -558,7 +554,6 @@ struct scsi_host_template usb_stor_host_template = {
/* queue commands only, only one command per LUN */
.can_queue = 1,
- .cmd_per_lun = 1,
/* unknown initiator id */
.this_id = -1,
@@ -592,6 +587,16 @@ struct scsi_host_template usb_stor_host_template = {
.module = THIS_MODULE
};
+void usb_stor_host_template_init(struct scsi_host_template *sht,
+ const char *name, struct module *owner)
+{
+ *sht = usb_stor_host_template;
+ sht->name = name;
+ sht->proc_name = name;
+ sht->module = owner;
+}
+EXPORT_SYMBOL_GPL(usb_stor_host_template_init);
+
/* To Report "Illegal Request: Invalid Field in CDB */
unsigned char usb_stor_sense_invalidCDB[18] = {
[0] = 0x70, /* current error */