Changeset 34 for GPL/trunk/alsa-kernel/pci/cs4281.c
- Timestamp:
- Dec 11, 2005, 5:57:39 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk/alsa-kernel/pci/cs4281.c
r33 r34 1194 1194 size = (long)CS4281_BA0_SIZE - pos; 1195 1195 if (size > 0) { 1196 if (copy_to_user_fromio(buf, chip->ba0 + pos, size))1196 if (copy_to_user_fromio(buf, (char*)chip->ba0 + pos, size)) 1197 1197 return -EFAULT; 1198 1198 } … … 1211 1211 size = (long)CS4281_BA1_SIZE - pos; 1212 1212 if (size > 0) { 1213 if (copy_to_user_fromio(buf, chip->ba1 + pos, size))1213 if (copy_to_user_fromio(buf, (char*)chip->ba1 + pos, size)) 1214 1214 return -EFAULT; 1215 1215 } … … 1217 1217 } 1218 1218 1219 #ifdef TARGET_OS21220 1219 static struct snd_info_entry_ops snd_cs4281_proc_ops_BA0 = { 1221 0, 0, 1222 snd_cs4281_BA0_read, 1223 0, 0, 0, 0, 0 1220 .read = snd_cs4281_BA0_read, 1224 1221 }; 1225 1222 1226 1223 static struct snd_info_entry_ops snd_cs4281_proc_ops_BA1 = { 1227 0, 0, 1228 snd_cs4281_BA1_read, 1229 0, 0, 0, 0, 0 1224 .read = snd_cs4281_BA1_read, 1230 1225 }; 1231 #else1232 static struct snd_info_entry_ops snd_cs4281_proc_ops_BA0 = {1233 read: snd_cs4281_BA0_read,1234 };1235 1236 static struct snd_info_entry_ops snd_cs4281_proc_ops_BA1 = {1237 read: snd_cs4281_BA1_read,1238 };1239 1240 #endif1241 1226 1242 1227 static void __devinit snd_cs4281_proc_init(cs4281_t * chip) … … 1846 1831 } 1847 1832 1848 #ifdef TARGET_OS2 1849 static snd_rawmidi_ops_t snd_cs4281_midi_output = 1850 { 1851 /* open: */ snd_cs4281_midi_output_open, 1852 /* close: */ snd_cs4281_midi_output_close, 1853 /* trigger: */ snd_cs4281_midi_output_trigger, 1833 static struct snd_rawmidi_ops snd_cs4281_midi_output = 1834 { 1835 .open = snd_cs4281_midi_output_open, 1836 .close = snd_cs4281_midi_output_close, 1837 .trigger = snd_cs4281_midi_output_trigger, 1854 1838 }; 1855 1839 1856 static s nd_rawmidi_ops_tsnd_cs4281_midi_input =1857 { 1858 /* open: */snd_cs4281_midi_input_open,1859 /* close: */snd_cs4281_midi_input_close,1860 /* trigger: */snd_cs4281_midi_input_trigger,1840 static struct snd_rawmidi_ops snd_cs4281_midi_input = 1841 { 1842 .open = snd_cs4281_midi_input_open, 1843 .close = snd_cs4281_midi_input_close, 1844 .trigger = snd_cs4281_midi_input_trigger, 1861 1845 }; 1862 #else1863 static snd_rawmidi_ops_t snd_cs4281_midi_output =1864 {1865 open: snd_cs4281_midi_output_open,1866 close: snd_cs4281_midi_output_close,1867 trigger: snd_cs4281_midi_output_trigger,1868 };1869 1870 static snd_rawmidi_ops_t snd_cs4281_midi_input =1871 {1872 open: snd_cs4281_midi_input_open,1873 close: snd_cs4281_midi_input_close,1874 trigger: snd_cs4281_midi_input_trigger,1875 };1876 1877 #endif1878 1846 1879 1847 static int __devinit snd_cs4281_midi(cs4281_t * chip, int device, snd_rawmidi_t **rrawmidi) … … 1906 1874 unsigned int status, dma, val; 1907 1875 cs4281_dma_t *cdma; 1908 #ifdef TARGET_OS21909 int fOurIrq = FALSE;1910 #endif1911 1876 1912 1877 if (chip == NULL) … … 1919 1884 1920 1885 if (status & (BA0_HISR_DMA(0)|BA0_HISR_DMA(1)|BA0_HISR_DMA(2)|BA0_HISR_DMA(3))) { 1921 #ifdef TARGET_OS21922 fOurIrq = TRUE;1923 #endif1924 1886 for (dma = 0; dma < 4; dma++) 1925 1887 if (status & BA0_HISR_DMA(dma)) { … … 1951 1913 unsigned char c; 1952 1914 1953 #ifdef TARGET_OS21954 fOurIrq = TRUE;1955 #endif1956 1957 1915 spin_lock(&chip->reg_lock); 1958 1916 while ((snd_cs4281_peekBA0(chip, BA0_MIDSR) & BA0_MIDSR_RBE) == 0) { … … 1979 1937 /* EOI to the PCI part... reenables interrupts */ 1980 1938 snd_cs4281_pokeBA0(chip, BA0_HICR, BA0_HICR_EOI); 1981 1982 #ifdef TARGET_OS21983 if (fOurIrq) {1984 eoi_irq(irq);1985 }1986 #endif1987 1939 return IRQ_HANDLED; 1988 1940
Note:
See TracChangeset
for help on using the changeset viewer.