Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

atp870u: switch to ->show_info()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro d773e422 d32812ae

+8 -32
+8 -32
drivers/scsi/atp870u.c
··· 3099 3099 return buffer; 3100 3100 } 3101 3101 3102 - #define BLS buffer + len + size 3103 - static int atp870u_proc_info(struct Scsi_Host *HBAptr, char *buffer, 3104 - char **start, off_t offset, int length, int inout) 3102 + static int atp870u_show_info(struct seq_file *m, struct Scsi_Host *HBAptr) 3105 3103 { 3106 - static u8 buff[512]; 3107 - int size = 0; 3108 - int len = 0; 3109 - off_t begin = 0; 3110 - off_t pos = 0; 3111 - 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); 3104 + seq_printf(m, "ACARD AEC-671X Driver Version: 2.6+ac\n"); 3105 + seq_printf(m, "\n"); 3106 + seq_printf(m, "Adapter Configuration:\n"); 3107 + seq_printf(m, " Base IO: %#.4lx\n", HBAptr->io_port); 3108 + seq_printf(m, " IRQ: %d\n", HBAptr->irq); 3109 + return 0; 3134 3110 } 3135 3111 3136 3112 ··· 3153 3177 .module = THIS_MODULE, 3154 3178 .name = "atp870u" /* name */, 3155 3179 .proc_name = "atp870u", 3156 - .proc_info = atp870u_proc_info, 3180 + .show_info = atp870u_show_info, 3157 3181 .info = atp870u_info /* info */, 3158 3182 .queuecommand = atp870u_queuecommand /* queuecommand */, 3159 3183 .eh_abort_handler = atp870u_abort /* abort */,