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

ALSA: info - Use standard types for info callbacks

Use loff_t, size_t and ssize_t for arguments of info callbacks
to follow the standard procfs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

+65 -59
+12 -12
include/sound/info.h
··· 51 51 unsigned short mode, void **file_private_data); 52 52 int (*release)(struct snd_info_entry *entry, 53 53 unsigned short mode, void *file_private_data); 54 - long (*read)(struct snd_info_entry *entry, void *file_private_data, 55 - struct file *file, char __user *buf, 56 - unsigned long count, unsigned long pos); 57 - long (*write)(struct snd_info_entry *entry, void *file_private_data, 58 - struct file *file, const char __user *buf, 59 - unsigned long count, unsigned long pos); 60 - long long (*llseek)(struct snd_info_entry *entry, 61 - void *file_private_data, struct file *file, 62 - long long offset, int orig); 63 - unsigned int(*poll)(struct snd_info_entry *entry, 64 - void *file_private_data, struct file *file, 65 - poll_table *wait); 54 + ssize_t (*read)(struct snd_info_entry *entry, void *file_private_data, 55 + struct file *file, char __user *buf, 56 + size_t count, loff_t pos); 57 + ssize_t (*write)(struct snd_info_entry *entry, void *file_private_data, 58 + struct file *file, const char __user *buf, 59 + size_t count, loff_t pos); 60 + loff_t (*llseek)(struct snd_info_entry *entry, 61 + void *file_private_data, struct file *file, 62 + loff_t offset, int orig); 63 + unsigned int (*poll)(struct snd_info_entry *entry, 64 + void *file_private_data, struct file *file, 65 + poll_table *wait); 66 66 int (*ioctl)(struct snd_info_entry *entry, void *file_private_data, 67 67 struct file *file, unsigned int cmd, unsigned long arg); 68 68 int (*mmap)(struct snd_info_entry *entry, void *file_private_data,
+13 -8
sound/drivers/opl4/opl4_proc.c
··· 49 49 return 0; 50 50 } 51 51 52 - static long snd_opl4_mem_proc_read(struct snd_info_entry *entry, void *file_private_data, 53 - struct file *file, char __user *_buf, 54 - unsigned long count, unsigned long pos) 52 + static ssize_t snd_opl4_mem_proc_read(struct snd_info_entry *entry, 53 + void *file_private_data, 54 + struct file *file, char __user *_buf, 55 + size_t count, loff_t pos) 55 56 { 56 57 struct snd_opl4 *opl4 = entry->private_data; 57 58 long size; ··· 76 75 return 0; 77 76 } 78 77 79 - static long snd_opl4_mem_proc_write(struct snd_info_entry *entry, void *file_private_data, 80 - struct file *file, const char __user *_buf, 81 - unsigned long count, unsigned long pos) 78 + static ssize_t snd_opl4_mem_proc_write(struct snd_info_entry *entry, 79 + void *file_private_data, 80 + struct file *file, 81 + const char __user *_buf, 82 + size_t count, size_t pos) 82 83 { 83 84 struct snd_opl4 *opl4 = entry->private_data; 84 85 long size; ··· 104 101 return 0; 105 102 } 106 103 107 - static long long snd_opl4_mem_proc_llseek(struct snd_info_entry *entry, void *file_private_data, 108 - struct file *file, long long offset, int orig) 104 + static loff_t snd_opl4_mem_proc_llseek(struct snd_info_entry *entry, 105 + void *file_private_data, 106 + struct file *file, 107 + loff_t offset, int orig) 109 108 { 110 109 switch (orig) { 111 110 case SEEK_SET:
+8 -8
sound/isa/gus/gus_mem_proc.c
··· 31 31 struct snd_gus_card * gus; 32 32 }; 33 33 34 - static long snd_gf1_mem_proc_dump(struct snd_info_entry *entry, void *file_private_data, 35 - struct file *file, char __user *buf, 36 - unsigned long count, unsigned long pos) 34 + static ssize_t snd_gf1_mem_proc_dump(struct snd_info_entry *entry, 35 + void *file_private_data, 36 + struct file *file, char __user *buf, 37 + size_t count, loff_t pos) 37 38 { 38 39 long size; 39 40 struct gus_proc_private *priv = entry->private_data; ··· 52 51 return 0; 53 52 } 54 53 55 - static long long snd_gf1_mem_proc_llseek(struct snd_info_entry *entry, 56 - void *private_file_data, 57 - struct file *file, 58 - long long offset, 59 - int orig) 54 + static loff_t snd_gf1_mem_proc_llseek(struct snd_info_entry *entry, 55 + void *private_file_data, 56 + struct file *file, 57 + loff_t offset, int orig) 60 58 { 61 59 struct gus_proc_private *priv = entry->private_data; 62 60
+8 -8
sound/pci/cs4281.c
··· 1139 1139 snd_iprintf(buffer, "Spurious end IRQs : %u\n", chip->spurious_dtc_irq); 1140 1140 } 1141 1141 1142 - static long snd_cs4281_BA0_read(struct snd_info_entry *entry, 1143 - void *file_private_data, 1144 - struct file *file, char __user *buf, 1145 - unsigned long count, unsigned long pos) 1142 + static ssize_t snd_cs4281_BA0_read(struct snd_info_entry *entry, 1143 + void *file_private_data, 1144 + struct file *file, char __user *buf, 1145 + size_t count, loff_t pos) 1146 1146 { 1147 1147 long size; 1148 1148 struct cs4281 *chip = entry->private_data; ··· 1157 1157 return size; 1158 1158 } 1159 1159 1160 - static long snd_cs4281_BA1_read(struct snd_info_entry *entry, 1161 - void *file_private_data, 1162 - struct file *file, char __user *buf, 1163 - unsigned long count, unsigned long pos) 1160 + static ssize_t snd_cs4281_BA1_read(struct snd_info_entry *entry, 1161 + void *file_private_data, 1162 + struct file *file, char __user *buf, 1163 + size_t count, loff_t pos) 1164 1164 { 1165 1165 long size; 1166 1166 struct cs4281 *chip = entry->private_data;
+4 -3
sound/pci/cs46xx/cs46xx_lib.c
··· 2657 2657 * proc interface 2658 2658 */ 2659 2659 2660 - static long snd_cs46xx_io_read(struct snd_info_entry *entry, void *file_private_data, 2661 - struct file *file, char __user *buf, 2662 - unsigned long count, unsigned long pos) 2660 + static ssize_t snd_cs46xx_io_read(struct snd_info_entry *entry, 2661 + void *file_private_data, 2662 + struct file *file, char __user *buf, 2663 + size_t count, loff_t pos) 2663 2664 { 2664 2665 long size; 2665 2666 struct snd_cs46xx_region *region = entry->private_data;
+4 -4
sound/pci/emu10k1/emuproc.c
··· 341 341 #define TOTAL_SIZE_CODE (0x200*8) 342 342 #define A_TOTAL_SIZE_CODE (0x400*8) 343 343 344 - static long snd_emu10k1_fx8010_read(struct snd_info_entry *entry, 345 - void *file_private_data, 346 - struct file *file, char __user *buf, 347 - unsigned long count, unsigned long pos) 344 + static ssize_t snd_emu10k1_fx8010_read(struct snd_info_entry *entry, 345 + void *file_private_data, 346 + struct file *file, char __user *buf, 347 + size_t count, loff_t pos) 348 348 { 349 349 long size; 350 350 struct snd_emu10k1 *emu = entry->private_data;
+16 -16
sound/pci/mixart/mixart.c
··· 1102 1102 /* 1103 1103 * proc interface 1104 1104 */ 1105 - static long long snd_mixart_BA0_llseek(struct snd_info_entry *entry, 1106 - void *private_file_data, 1107 - struct file *file, 1108 - long long offset, 1109 - int orig) 1105 + static loff_t snd_mixart_BA0_llseek(struct snd_info_entry *entry, 1106 + void *private_file_data, 1107 + struct file *file, 1108 + loff_t offset, int orig) 1110 1109 { 1111 1110 offset = offset & ~3; /* 4 bytes aligned */ 1112 1111 ··· 1127 1128 return file->f_pos; 1128 1129 } 1129 1130 1130 - static long long snd_mixart_BA1_llseek(struct snd_info_entry *entry, 1131 - void *private_file_data, 1132 - struct file *file, 1133 - long long offset, 1134 - int orig) 1131 + static loff_t snd_mixart_BA1_llseek(struct snd_info_entry *entry, 1132 + void *private_file_data, 1133 + struct file *file, 1134 + loff_t offset, int orig) 1135 1135 { 1136 1136 offset = offset & ~3; /* 4 bytes aligned */ 1137 1137 ··· 1155 1157 /* 1156 1158 mixart_BA0 proc interface for BAR 0 - read callback 1157 1159 */ 1158 - static long snd_mixart_BA0_read(struct snd_info_entry *entry, void *file_private_data, 1159 - struct file *file, char __user *buf, 1160 - unsigned long count, unsigned long pos) 1160 + static ssize_t snd_mixart_BA0_read(struct snd_info_entry *entry, 1161 + void *file_private_data, 1162 + struct file *file, char __user *buf, 1163 + size_t count, loff_t pos) 1161 1164 { 1162 1165 struct mixart_mgr *mgr = entry->private_data; 1163 1166 unsigned long maxsize; ··· 1177 1178 /* 1178 1179 mixart_BA1 proc interface for BAR 1 - read callback 1179 1180 */ 1180 - static long snd_mixart_BA1_read(struct snd_info_entry *entry, void *file_private_data, 1181 - struct file *file, char __user *buf, 1182 - unsigned long count, unsigned long pos) 1181 + static ssize_t snd_mixart_BA1_read(struct snd_info_entry *entry, 1182 + void *file_private_data, 1183 + struct file *file, char __user *buf, 1184 + size_t count, loff_t pos) 1183 1185 { 1184 1186 struct mixart_mgr *mgr = entry->private_data; 1185 1187 unsigned long maxsize;