aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-03-31 00:58:31 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-04-09 14:13:17 -0400
commitb7654914bb8059a9817f32f4c4d0e7f75a08b78a (patch)
tree47ecc8297af2aa92c02fe09b55e2cc196160f4ad /drivers/scsi
parentfa5fd36820efdc82fc9ac8ac9bd47ddc2fee3d37 (diff)
ppa: switch to ->show_info()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/ppa.c36
1 files changed, 10 insertions, 26 deletions
diff --git a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c
index d164c9639361..1db8b26063b4 100644
--- a/drivers/scsi/ppa.c
+++ b/drivers/scsi/ppa.c
@@ -118,8 +118,9 @@ static inline void ppa_pb_release(ppa_struct *dev)
118 * Also gives a method to use a script to obtain optimum timings (TODO) 118 * Also gives a method to use a script to obtain optimum timings (TODO)
119 */ 119 */
120 120
121static inline int ppa_proc_write(ppa_struct *dev, char *buffer, int length) 121static inline int ppa_write_info(struct Scsi_Host *host, char *buffer, int length)
122{ 122{
123 ppa_struct *dev = ppa_dev(host);
123 unsigned long x; 124 unsigned long x;
124 125
125 if ((length > 5) && (strncmp(buffer, "mode=", 5) == 0)) { 126 if ((length > 5) && (strncmp(buffer, "mode=", 5) == 0)) {
@@ -137,35 +138,17 @@ static inline int ppa_proc_write(ppa_struct *dev, char *buffer, int length)
137 return -EINVAL; 138 return -EINVAL;
138} 139}
139 140
140static int ppa_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, int length, int inout) 141static int ppa_show_info(struct seq_file *m, struct Scsi_Host *host)
141{ 142{
142 int len = 0;
143 ppa_struct *dev = ppa_dev(host); 143 ppa_struct *dev = ppa_dev(host);
144 144
145 if (inout) 145 seq_printf(m, "Version : %s\n", PPA_VERSION);
146 return ppa_proc_write(dev, buffer, length); 146 seq_printf(m, "Parport : %s\n", dev->dev->port->name);
147 147 seq_printf(m, "Mode : %s\n", PPA_MODE_STRING[dev->mode]);
148 len += sprintf(buffer + len, "Version : %s\n", PPA_VERSION);
149 len +=
150 sprintf(buffer + len, "Parport : %s\n",
151 dev->dev->port->name);
152 len +=
153 sprintf(buffer + len, "Mode : %s\n",
154 PPA_MODE_STRING[dev->mode]);
155#if PPA_DEBUG > 0 148#if PPA_DEBUG > 0
156 len += 149 seq_printf(m, "recon_tmo : %lu\n", dev->recon_tmo);
157 sprintf(buffer + len, "recon_tmo : %lu\n", dev->recon_tmo);
158#endif 150#endif
159 151 return 0;
160 /* Request for beyond end of buffer */
161 if (offset > length)
162 return 0;
163
164 *start = buffer + offset;
165 len -= offset;
166 if (len > length)
167 len = length;
168 return len;
169} 152}
170 153
171static int device_check(ppa_struct *dev); 154static int device_check(ppa_struct *dev);
@@ -981,7 +964,8 @@ static int ppa_adjust_queue(struct scsi_device *device)
981static struct scsi_host_template ppa_template = { 964static struct scsi_host_template ppa_template = {
982 .module = THIS_MODULE, 965 .module = THIS_MODULE,
983 .proc_name = "ppa", 966 .proc_name = "ppa",
984 .proc_info = ppa_proc_info, 967 .show_info = ppa_show_info,
968 .write_info = ppa_write_info,
985 .name = "Iomega VPI0 (ppa) interface", 969 .name = "Iomega VPI0 (ppa) interface",
986 .queuecommand = ppa_queuecommand, 970 .queuecommand = ppa_queuecommand,
987 .eh_abort_handler = ppa_abort, 971 .eh_abort_handler = ppa_abort,