scsi proc_fops: convert aic7xxx
Subsystems (2)
PATCH 16/27 scsi proc_fops: convert aic7xxx
In ahc_send_async() remove unused buffer and initialization.
Signed-off-by Alexey Dobriyan <[email protected]>
---
drivers/scsi/aic7xxx/aic7xxx_osm.c | 8 - drivers/scsi/aic7xxx/aic7xxx_osm.h | 13 -- drivers/scsi/aic7xxx/aic7xxx_proc.c | 205 ++++++++++++++---------------------- 3 files changed, 85 insertions(+), 141 deletions(-)
drivers/scsi/aic7xxx/aic7xxx_osm.c +1 -7
@@ -800,7 +800,7 @@ struct scsi_host_template aic7xxx_driver_template = { .module = THIS_MODULE, .name = "aic7xxx", .proc_name = "aic7xxx", - .proc_info = ahc_linux_proc_info, + .proc_fops = &ahc_linux_proc_fops, .info = ahc_linux_info, .queuecommand = ahc_linux_queue, .eh_abort_handler = ahc_linux_abort,
@@ -1628,10 +1628,8 @@ ahc_send_async(struct ahc_softc *ahc, char channel,switch (code) {case AC_TRANSFER_NEG : { -char buf[80 ];struct scsi_target *starget;struct ahc_linux_target *targ; -struct info_str info;struct ahc_initiator_tinfo *tinfo;struct ahc_tmode_tstate *tstate;int target_offset;
@@ -1639,10 +1637,6 @@ ahc_send_async(struct ahc_softc *ahc, char channel,BUG_ON (target ==CAM_TARGET_WILDCARD ); - info.buffer = buf; - info.length =sizeof (buf); - info.offset =0 ; - info.pos =0 ; tinfo = ahc_fetch_transinfo(ahc, channel, channel == 'A' ? ahc->our_id : ahc->our_id_b,
drivers/scsi/aic7xxx/aic7xxx_osm.h +3 -10
@@ -66,6 +66,8 @@#include <linux/pci.h> #include <linux/interrupt.h> #include <linux/module.h> +#include <linux/proc_fs.h> +#include <linux/seq_file.h> #include <linux/slab.h> #include <asm/byteorder.h> #include <asm/io.h>
@@ -390,14 +392,6 @@ void ahc_insb(struct ahc_softc * ahc, long port,int ahc_linux_register_host (struct ahc_softc *,struct scsi_host_template *); -/*************************** Pretty Printing **********************************/ -struct info_str { -char *buffer; -int length; -off_t offset; -int pos; -}; -/******************************** Locking *************************************/ /* Lock protecting internal data structures */
@@ -530,8 +524,7 @@ ahc_flush_device_writes(struct ahc_softc *ahc) }/**************************** Proc FS Support *********************************/ -int ahc_linux_proc_info (struct Scsi_Host *,char *,char **, -off_t ,int ,int ); +extern const struct file_operations ahc_linux_proc_fops;/*************************** Domain Validation ********************************/ /*********************** Transaction Access Wrappers *************************/
drivers/scsi/aic7xxx/aic7xxx_proc.c +81 -123
329 lines not on this page · raw message
Signature · 1 line
1.6.5.2