···220220 return string;221221}222222223223-/*224224- * Function: int arxescsi_proc_info(char *buffer, char **start, off_t offset,225225- * int length, int host_no, int inout)226226- * Purpose : Return information about the driver to a user process accessing227227- * the /proc filesystem.228228- * Params : buffer - a buffer to write information to229229- * start - a pointer into this buffer set by this routine to the start230230- * of the required information.231231- * offset - offset into information that we have read up to.232232- * length - length of buffer233233- * host_no - host number to return information for234234- * inout - 0 for reading, 1 for writing.235235- * Returns : length of data written to buffer.236236- */237223static int238238-arxescsi_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, int length,239239- int inout)224224+arxescsi_show_info(struct seq_file *m, struct Scsi_Host *host)240225{241226 struct arxescsi_info *info;242242- char *p = buffer;243243- int pos;244244-245227 info = (struct arxescsi_info *)host->hostdata;246246- if (inout == 1)247247- return -EINVAL;248228249249- p += sprintf(p, "ARXE 16-bit SCSI driver v%s\n", VERSION);250250- p += fas216_print_host(&info->info, p);251251- p += fas216_print_stats(&info->info, p);252252- p += fas216_print_devices(&info->info, p);253253-254254- *start = buffer + offset;255255- pos = p - buffer - offset;256256- if (pos > length)257257- pos = length;258258-259259- return pos;229229+ seq_printf(m, "ARXE 16-bit SCSI driver v%s\n", VERSION);230230+ fas216_print_host(&info->info, m);231231+ fas216_print_stats(&info->info, m);232232+ fas216_print_devices(&info->info, m);233233+ return 0;260234}261235262236static struct scsi_host_template arxescsi_template = {263263- .proc_info = arxescsi_proc_info,237237+ .show_info = arxescsi_show_info,264238 .name = "ARXE SCSI card",265239 .info = arxescsi_info,266240 .queuecommand = fas216_noqueue_command,
+9-34
drivers/scsi/arm/cumana_2.c
···337337 return ret;338338}339339340340-/* Prototype: int cumanascsi_2_proc_info(char *buffer, char **start, off_t offset,341341- * int length, int host_no, int inout)342342- * Purpose : Return information about the driver to a user process accessing343343- * the /proc filesystem.344344- * Params : buffer - a buffer to write information to345345- * start - a pointer into this buffer set by this routine to the start346346- * of the required information.347347- * offset - offset into information that we have read up to.348348- * length - length of buffer349349- * host_no - host number to return information for350350- * inout - 0 for reading, 1 for writing.351351- * Returns : length of data written to buffer.352352- */353353-int cumanascsi_2_proc_info (struct Scsi_Host *host, char *buffer, char **start, off_t offset,354354- int length, int inout)340340+static int cumanascsi_2_show_info(struct seq_file *m, struct Scsi_Host *host)355341{356342 struct cumanascsi2_info *info;357357- char *p = buffer;358358- int pos;359359-360360- if (inout == 1)361361- return cumanascsi_2_set_proc_info(host, buffer, length);362362-363343 info = (struct cumanascsi2_info *)host->hostdata;364344365365- p += sprintf(p, "Cumana SCSI II driver v%s\n", VERSION);366366- p += fas216_print_host(&info->info, p);367367- p += sprintf(p, "Term : o%s\n",345345+ seq_printf(m, "Cumana SCSI II driver v%s\n", VERSION);346346+ fas216_print_host(&info->info, m);347347+ seq_printf(m, "Term : o%s\n",368348 info->terms ? "n" : "ff");369349370370- p += fas216_print_stats(&info->info, p);371371- p += fas216_print_devices(&info->info, p);372372-373373- *start = buffer + offset;374374- pos = p - buffer - offset;375375- if (pos > length)376376- pos = length;377377-378378- return pos;350350+ fas216_print_stats(&info->info, m);351351+ fas216_print_devices(&info->info, m);352352+ return 0;379353}380354381355static struct scsi_host_template cumanascsi2_template = {382356 .module = THIS_MODULE,383383- .proc_info = cumanascsi_2_proc_info,357357+ .show_info = cumanascsi_2_show_info,358358+ .write_info = cumanascsi_2_set_proc_info,384359 .name = "Cumana SCSI II",385360 .info = cumanascsi_2_info,386361 .queuecommand = fas216_queue_command,
+9-33
drivers/scsi/arm/eesox.c
···422422 return ret;423423}424424425425-/* Prototype: int eesoxscsi_proc_info(char *buffer, char **start, off_t offset,426426- * int length, int host_no, int inout)427427- * Purpose : Return information about the driver to a user process accessing428428- * the /proc filesystem.429429- * Params : buffer - a buffer to write information to430430- * start - a pointer into this buffer set by this routine to the start431431- * of the required information.432432- * offset - offset into information that we have read up to.433433- * length - length of buffer434434- * host_no - host number to return information for435435- * inout - 0 for reading, 1 for writing.436436- * Returns : length of data written to buffer.437437- */438438-int eesoxscsi_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset,439439- int length, int inout)425425+static int eesoxscsi_show_info(struct seq_file *m, struct Scsi_Host *host)440426{441427 struct eesoxscsi_info *info;442442- char *p = buffer;443443- int pos;444444-445445- if (inout == 1)446446- return eesoxscsi_set_proc_info(host, buffer, length);447428448429 info = (struct eesoxscsi_info *)host->hostdata;449430450450- p += sprintf(p, "EESOX SCSI driver v%s\n", VERSION);451451- p += fas216_print_host(&info->info, p);452452- p += sprintf(p, "Term : o%s\n",431431+ seq_printf(m, "EESOX SCSI driver v%s\n", VERSION);432432+ fas216_print_host(&info->info, m);433433+ seq_printf(m, "Term : o%s\n",453434 info->control & EESOX_TERM_ENABLE ? "n" : "ff");454435455455- p += fas216_print_stats(&info->info, p);456456- p += fas216_print_devices(&info->info, p);457457-458458- *start = buffer + offset;459459- pos = p - buffer - offset;460460- if (pos > length)461461- pos = length;462462-463463- return pos;436436+ fas216_print_stats(&info->info, m);437437+ fas216_print_devices(&info->info, m);438438+ return 0;464439}465440466441static ssize_t eesoxscsi_show_term(struct device *dev, struct device_attribute *attr, char *buf)···473498474499static struct scsi_host_template eesox_template = {475500 .module = THIS_MODULE,476476- .proc_info = eesoxscsi_proc_info,501501+ .show_info = eesoxscsi_show_info,502502+ .write_info = eesoxscsi_set_proc_info,477503 .name = "EESOX SCSI",478504 .info = eesoxscsi_info,479505 .queuecommand = fas216_queue_command,