summaryrefslogtreecommitdiff
blob: 0070549b88d8a5915fe23d5155d59c63eb610d9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
--- rts_pstor.a/rtsx.c	2013-07-03 05:39:26.316723407 +0530
+++ rts_pstor.b/rtsx.c	2013-07-03 05:28:28.584882761 +0530
@@ -135,38 +135,18 @@
 
 
 #undef SPRINTF
-#define SPRINTF(args...) \
-	do { if (pos < buffer+length) pos += sprintf(pos, ## args); } while (0)
+#define SPRINTF(args...) seq_printf(m, ##args)
 
-static int proc_info (struct Scsi_Host *host, char *buffer,
-		char **start, off_t offset, int length, int inout)
+static int show_info(struct seq_file *m, struct Scsi_Host *host)
 {
-	char *pos = buffer;
-
-	
-	if (inout)
-		return length;
-
 	
 	SPRINTF("   Host scsi%d: %s\n", host->host_no, CR_DRIVER_NAME);
-
 	
 	SPRINTF("       Vendor: Realtek Corp.\n");
 	SPRINTF("      Product: PCIE Card Reader\n");
 	SPRINTF("      Version: %s\n", DRIVER_VERSION);
 	SPRINTF("        Build: %s\n", DRIVER_MAKE_TIME);
-
-	/*
-	 * Calculate start of next buffer, and return value.
-	 */
-	*start = buffer + offset;
-
-	if ((pos - buffer) < offset)
-		return (0);
-	else if ((pos - buffer - offset) < length)
-		return (pos - buffer - offset);
-	else
-		return (length);
+    return 0;
 }
 
 
@@ -272,7 +252,7 @@
 	
 	.name =				CR_DRIVER_NAME,
 	.proc_name =			CR_DRIVER_NAME,
-	.proc_info =			proc_info,
+	.show_info =			show_info,
 	.info =				host_info,