aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/mixart/mixart.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/mixart/mixart.c')
-rw-r--r--sound/pci/mixart/mixart.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c
index be95e005c81d..6c3fd4d1c49d 100644
--- a/sound/pci/mixart/mixart.c
+++ b/sound/pci/mixart/mixart.c
@@ -1102,55 +1102,6 @@ static int snd_mixart_free(struct mixart_mgr *mgr)
1102/* 1102/*
1103 * proc interface 1103 * proc interface
1104 */ 1104 */
1105static 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)
1109{
1110 offset = offset & ~3; /* 4 bytes aligned */
1111
1112 switch(orig) {
1113 case SEEK_SET:
1114 file->f_pos = offset;
1115 break;
1116 case SEEK_CUR:
1117 file->f_pos += offset;
1118 break;
1119 case SEEK_END: /* offset is negative */
1120 file->f_pos = MIXART_BA0_SIZE + offset;
1121 break;
1122 default:
1123 return -EINVAL;
1124 }
1125 if(file->f_pos > MIXART_BA0_SIZE)
1126 file->f_pos = MIXART_BA0_SIZE;
1127 return file->f_pos;
1128}
1129
1130static loff_t snd_mixart_BA1_llseek(struct snd_info_entry *entry,
1131 void *private_file_data,
1132 struct file *file,
1133 loff_t offset, int orig)
1134{
1135 offset = offset & ~3; /* 4 bytes aligned */
1136
1137 switch(orig) {
1138 case SEEK_SET:
1139 file->f_pos = offset;
1140 break;
1141 case SEEK_CUR:
1142 file->f_pos += offset;
1143 break;
1144 case SEEK_END: /* offset is negative */
1145 file->f_pos = MIXART_BA1_SIZE + offset;
1146 break;
1147 default:
1148 return -EINVAL;
1149 }
1150 if(file->f_pos > MIXART_BA1_SIZE)
1151 file->f_pos = MIXART_BA1_SIZE;
1152 return file->f_pos;
1153}
1154 1105
1155/* 1106/*
1156 mixart_BA0 proc interface for BAR 0 - read callback 1107 mixart_BA0 proc interface for BAR 0 - read callback
@@ -1186,12 +1137,10 @@ static ssize_t snd_mixart_BA1_read(struct snd_info_entry *entry,
1186 1137
1187static struct snd_info_entry_ops snd_mixart_proc_ops_BA0 = { 1138static struct snd_info_entry_ops snd_mixart_proc_ops_BA0 = {
1188 .read = snd_mixart_BA0_read, 1139 .read = snd_mixart_BA0_read,
1189 .llseek = snd_mixart_BA0_llseek
1190}; 1140};
1191 1141
1192static struct snd_info_entry_ops snd_mixart_proc_ops_BA1 = { 1142static struct snd_info_entry_ops snd_mixart_proc_ops_BA1 = {
1193 .read = snd_mixart_BA1_read, 1143 .read = snd_mixart_BA1_read,
1194 .llseek = snd_mixart_BA1_llseek
1195}; 1144};
1196 1145
1197 1146