aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/atp870u.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/atp870u.c')
-rw-r--r--drivers/scsi/atp870u.c40
1 files changed, 8 insertions, 32 deletions
diff --git a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c
index cfc73041f102..15a629d8ed08 100644
--- a/drivers/scsi/atp870u.c
+++ b/drivers/scsi/atp870u.c
@@ -3099,38 +3099,14 @@ static const char *atp870u_info(struct Scsi_Host *notused)
3099 return buffer; 3099 return buffer;
3100} 3100}
3101 3101
3102#define BLS buffer + len + size 3102static int atp870u_show_info(struct seq_file *m, struct Scsi_Host *HBAptr)
3103static int atp870u_proc_info(struct Scsi_Host *HBAptr, char *buffer,
3104 char **start, off_t offset, int length, int inout)
3105{ 3103{
3106 static u8 buff[512]; 3104 seq_printf(m, "ACARD AEC-671X Driver Version: 2.6+ac\n");
3107 int size = 0; 3105 seq_printf(m, "\n");
3108 int len = 0; 3106 seq_printf(m, "Adapter Configuration:\n");
3109 off_t begin = 0; 3107 seq_printf(m, " Base IO: %#.4lx\n", HBAptr->io_port);
3110 off_t pos = 0; 3108 seq_printf(m, " IRQ: %d\n", HBAptr->irq);
3111 3109 return 0;
3112 if (inout)
3113 return -EINVAL;
3114 if (offset == 0)
3115 memset(buff, 0, sizeof(buff));
3116 size += sprintf(BLS, "ACARD AEC-671X Driver Version: 2.6+ac\n");
3117 len += size;
3118 pos = begin + len;
3119 size = 0;
3120
3121 size += sprintf(BLS, "\n");
3122 size += sprintf(BLS, "Adapter Configuration:\n");
3123 size += sprintf(BLS, " Base IO: %#.4lx\n", HBAptr->io_port);
3124 size += sprintf(BLS, " IRQ: %d\n", HBAptr->irq);
3125 len += size;
3126 pos = begin + len;
3127
3128 *start = buffer + (offset - begin); /* Start of wanted data */
3129 len -= (offset - begin); /* Start slop */
3130 if (len > length) {
3131 len = length; /* Ending slop */
3132 }
3133 return (len);
3134} 3110}
3135 3111
3136 3112
@@ -3177,7 +3153,7 @@ static struct scsi_host_template atp870u_template = {
3177 .module = THIS_MODULE, 3153 .module = THIS_MODULE,
3178 .name = "atp870u" /* name */, 3154 .name = "atp870u" /* name */,
3179 .proc_name = "atp870u", 3155 .proc_name = "atp870u",
3180 .proc_info = atp870u_proc_info, 3156 .show_info = atp870u_show_info,
3181 .info = atp870u_info /* info */, 3157 .info = atp870u_info /* info */,
3182 .queuecommand = atp870u_queuecommand /* queuecommand */, 3158 .queuecommand = atp870u_queuecommand /* queuecommand */,
3183 .eh_abort_handler = atp870u_abort /* abort */, 3159 .eh_abort_handler = atp870u_abort /* abort */,