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

sound: Remove unnecessary casts of private_data

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Joe Perches and committed by
Takashi Iwai
9fe856e4 831853c8

+41 -42
+11 -11
sound/core/oss/mixer_oss.c
··· 77 77 struct snd_mixer_oss_file *fmixer; 78 78 79 79 if (file->private_data) { 80 - fmixer = (struct snd_mixer_oss_file *) file->private_data; 80 + fmixer = file->private_data; 81 81 module_put(fmixer->card->module); 82 82 snd_card_file_remove(fmixer->card, file); 83 83 kfree(fmixer); ··· 368 368 369 369 static long snd_mixer_oss_ioctl(struct file *file, unsigned int cmd, unsigned long arg) 370 370 { 371 - return snd_mixer_oss_ioctl1((struct snd_mixer_oss_file *) file->private_data, cmd, arg); 371 + return snd_mixer_oss_ioctl1(file->private_data, cmd, arg); 372 372 } 373 373 374 374 int snd_mixer_oss_ioctl_card(struct snd_card *card, unsigned int cmd, unsigned long arg) ··· 582 582 struct snd_mixer_oss_slot *pslot, 583 583 int *left, int *right) 584 584 { 585 - struct slot *slot = (struct slot *)pslot->private_data; 585 + struct slot *slot = pslot->private_data; 586 586 587 587 *left = *right = 100; 588 588 if (slot->present & SNDRV_MIXER_OSS_PRESENT_PVOLUME) { ··· 691 691 struct snd_mixer_oss_slot *pslot, 692 692 int left, int right) 693 693 { 694 - struct slot *slot = (struct slot *)pslot->private_data; 694 + struct slot *slot = pslot->private_data; 695 695 696 696 if (slot->present & SNDRV_MIXER_OSS_PRESENT_PVOLUME) { 697 697 snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PVOLUME], left, right); ··· 740 740 struct snd_mixer_oss_slot *pslot, 741 741 int *active) 742 742 { 743 - struct slot *slot = (struct slot *)pslot->private_data; 743 + struct slot *slot = pslot->private_data; 744 744 int left, right; 745 745 746 746 left = right = 1; ··· 753 753 struct snd_mixer_oss_slot *pslot, 754 754 int *active) 755 755 { 756 - struct slot *slot = (struct slot *)pslot->private_data; 756 + struct slot *slot = pslot->private_data; 757 757 int left, right; 758 758 759 759 left = right = 1; ··· 766 766 struct snd_mixer_oss_slot *pslot, 767 767 int active) 768 768 { 769 - struct slot *slot = (struct slot *)pslot->private_data; 769 + struct slot *slot = pslot->private_data; 770 770 771 771 snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CSWITCH], active, active, 0); 772 772 return 0; ··· 776 776 struct snd_mixer_oss_slot *pslot, 777 777 int active) 778 778 { 779 - struct slot *slot = (struct slot *)pslot->private_data; 779 + struct slot *slot = pslot->private_data; 780 780 781 781 snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CROUTE], active, active, 1); 782 782 return 0; ··· 813 813 if (!(mixer->mask_recsrc & (1 << idx))) 814 814 continue; 815 815 pslot = &mixer->slots[idx]; 816 - slot = (struct slot *)pslot->private_data; 816 + slot = pslot->private_data; 817 817 if (slot->signature != SNDRV_MIXER_OSS_SIGNATURE) 818 818 continue; 819 819 if (!(slot->present & SNDRV_MIXER_OSS_PRESENT_CAPTURE)) ··· 861 861 if (!(mixer->mask_recsrc & (1 << idx))) 862 862 continue; 863 863 pslot = &mixer->slots[idx]; 864 - slot = (struct slot *)pslot->private_data; 864 + slot = pslot->private_data; 865 865 if (slot->signature != SNDRV_MIXER_OSS_SIGNATURE) 866 866 continue; 867 867 if (!(slot->present & SNDRV_MIXER_OSS_PRESENT_CAPTURE)) ··· 925 925 926 926 static void snd_mixer_oss_slot_free(struct snd_mixer_oss_slot *chn) 927 927 { 928 - struct slot *p = (struct slot *)chn->private_data; 928 + struct slot *p = chn->private_data; 929 929 if (p) { 930 930 if (p->allocated && p->assigned) { 931 931 kfree(p->assigned->name);
+1 -2
sound/core/pcm.c
··· 364 364 static void snd_pcm_substream_proc_info_read(struct snd_info_entry *entry, 365 365 struct snd_info_buffer *buffer) 366 366 { 367 - snd_pcm_proc_info_read((struct snd_pcm_substream *)entry->private_data, 368 - buffer); 367 + snd_pcm_proc_info_read(entry->private_data, buffer); 369 368 } 370 369 371 370 static void snd_pcm_substream_proc_hw_params_read(struct snd_info_entry *entry,
+1 -1
sound/drivers/virmidi.c
··· 94 94 sizeof(struct snd_card_virmidi), &card); 95 95 if (err < 0) 96 96 return err; 97 - vmidi = (struct snd_card_virmidi *)card->private_data; 97 + vmidi = card->private_data; 98 98 vmidi->card = card; 99 99 100 100 if (midi_devs[dev] > MAX_MIDI_DEVICES) {
+1 -1
sound/i2c/other/ak4xxx-adda.c
··· 878 878 static void proc_regs_read(struct snd_info_entry *entry, 879 879 struct snd_info_buffer *buffer) 880 880 { 881 - struct snd_akm4xxx *ak = (struct snd_akm4xxx *)entry->private_data; 881 + struct snd_akm4xxx *ak = entry->private_data; 882 882 int reg, val, chip; 883 883 for (chip = 0; chip < ak->num_chips; chip++) { 884 884 for (reg = 0; reg < ak->total_regs; reg++) {
+1 -1
sound/isa/ad1816a/ad1816a.c
··· 162 162 sizeof(struct snd_card_ad1816a), &card); 163 163 if (error < 0) 164 164 return error; 165 - acard = (struct snd_card_ad1816a *)card->private_data; 165 + acard = card->private_data; 166 166 167 167 if ((error = snd_card_ad1816a_pnp(dev, acard, pcard, pid))) { 168 168 snd_card_free(card);
+1 -1
sound/isa/azt2320.c
··· 188 188 sizeof(struct snd_card_azt2320), &card); 189 189 if (error < 0) 190 190 return error; 191 - acard = (struct snd_card_azt2320 *)card->private_data; 191 + acard = card->private_data; 192 192 193 193 if ((error = snd_card_azt2320_pnp(dev, acard, pcard, pid))) { 194 194 snd_card_free(card);
+2 -2
sound/isa/gus/gusmax.c
··· 191 191 192 192 static void snd_gusmax_free(struct snd_card *card) 193 193 { 194 - struct snd_gusmax *maxcard = (struct snd_gusmax *)card->private_data; 194 + struct snd_gusmax *maxcard = card->private_data; 195 195 196 196 if (maxcard == NULL) 197 197 return; ··· 219 219 if (err < 0) 220 220 return err; 221 221 card->private_free = snd_gusmax_free; 222 - maxcard = (struct snd_gusmax *)card->private_data; 222 + maxcard = card->private_data; 223 223 maxcard->card = card; 224 224 maxcard->irq = -1; 225 225
+1 -1
sound/isa/sb/sb8.c
··· 72 72 73 73 static void snd_sb8_free(struct snd_card *card) 74 74 { 75 - struct snd_sb8 *acard = (struct snd_sb8 *)card->private_data; 75 + struct snd_sb8 *acard = card->private_data; 76 76 77 77 if (acard == NULL) 78 78 return;
+9 -9
sound/oss/au1550_ac97.c
··· 171 171 static u16 172 172 rdcodec(struct ac97_codec *codec, u8 addr) 173 173 { 174 - struct au1550_state *s = (struct au1550_state *)codec->private_data; 174 + struct au1550_state *s = codec->private_data; 175 175 unsigned long flags; 176 176 u32 cmd, val; 177 177 u16 data; ··· 239 239 static void 240 240 wrcodec(struct ac97_codec *codec, u8 addr, u16 data) 241 241 { 242 - struct au1550_state *s = (struct au1550_state *)codec->private_data; 242 + struct au1550_state *s = codec->private_data; 243 243 unsigned long flags; 244 244 u32 cmd, val; 245 245 int i; ··· 820 820 static long 821 821 au1550_ioctl_mixdev(struct file *file, unsigned int cmd, unsigned long arg) 822 822 { 823 - struct au1550_state *s = (struct au1550_state *)file->private_data; 823 + struct au1550_state *s = file->private_data; 824 824 struct ac97_codec *codec = s->codec; 825 825 int ret; 826 826 ··· 1031 1031 static ssize_t 1032 1032 au1550_read(struct file *file, char *buffer, size_t count, loff_t *ppos) 1033 1033 { 1034 - struct au1550_state *s = (struct au1550_state *)file->private_data; 1034 + struct au1550_state *s = file->private_data; 1035 1035 struct dmabuf *db = &s->dma_adc; 1036 1036 DECLARE_WAITQUEUE(wait, current); 1037 1037 ssize_t ret; ··· 1111 1111 static ssize_t 1112 1112 au1550_write(struct file *file, const char *buffer, size_t count, loff_t * ppos) 1113 1113 { 1114 - struct au1550_state *s = (struct au1550_state *)file->private_data; 1114 + struct au1550_state *s = file->private_data; 1115 1115 struct dmabuf *db = &s->dma_dac; 1116 1116 DECLARE_WAITQUEUE(wait, current); 1117 1117 ssize_t ret = 0; ··· 1211 1211 static unsigned int 1212 1212 au1550_poll(struct file *file, struct poll_table_struct *wait) 1213 1213 { 1214 - struct au1550_state *s = (struct au1550_state *)file->private_data; 1214 + struct au1550_state *s = file->private_data; 1215 1215 unsigned long flags; 1216 1216 unsigned int mask = 0; 1217 1217 ··· 1250 1250 static int 1251 1251 au1550_mmap(struct file *file, struct vm_area_struct *vma) 1252 1252 { 1253 - struct au1550_state *s = (struct au1550_state *)file->private_data; 1253 + struct au1550_state *s = file->private_data; 1254 1254 struct dmabuf *db; 1255 1255 unsigned long size; 1256 1256 int ret = 0; ··· 1342 1342 static int 1343 1343 au1550_ioctl(struct file *file, unsigned int cmd, unsigned long arg) 1344 1344 { 1345 - struct au1550_state *s = (struct au1550_state *)file->private_data; 1345 + struct au1550_state *s = file->private_data; 1346 1346 unsigned long flags; 1347 1347 audio_buf_info abinfo; 1348 1348 count_info cinfo; ··· 1868 1868 static int 1869 1869 au1550_release(struct inode *inode, struct file *file) 1870 1870 { 1871 - struct au1550_state *s = (struct au1550_state *)file->private_data; 1871 + struct au1550_state *s = file->private_data; 1872 1872 1873 1873 lock_kernel(); 1874 1874
+1 -1
sound/pci/emu10k1/emumpu401.c
··· 321 321 322 322 static void snd_emu10k1_midi_free(struct snd_rawmidi *rmidi) 323 323 { 324 - struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)rmidi->private_data; 324 + struct snd_emu10k1_midi *midi = rmidi->private_data; 325 325 midi->interrupt = NULL; 326 326 midi->rmidi = NULL; 327 327 }
+3 -3
sound/pci/ice1712/pontis.c
··· 638 638 */ 639 639 static void wm_proc_regs_write(struct snd_info_entry *entry, struct snd_info_buffer *buffer) 640 640 { 641 - struct snd_ice1712 *ice = (struct snd_ice1712 *)entry->private_data; 641 + struct snd_ice1712 *ice = entry->private_data; 642 642 char line[64]; 643 643 unsigned int reg, val; 644 644 mutex_lock(&ice->gpio_mutex); ··· 653 653 654 654 static void wm_proc_regs_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) 655 655 { 656 - struct snd_ice1712 *ice = (struct snd_ice1712 *)entry->private_data; 656 + struct snd_ice1712 *ice = entry->private_data; 657 657 int reg, val; 658 658 659 659 mutex_lock(&ice->gpio_mutex); ··· 676 676 677 677 static void cs_proc_regs_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) 678 678 { 679 - struct snd_ice1712 *ice = (struct snd_ice1712 *)entry->private_data; 679 + struct snd_ice1712 *ice = entry->private_data; 680 680 int reg, val; 681 681 682 682 mutex_lock(&ice->gpio_mutex);
+1 -1
sound/pci/ice1712/prodigy192.c
··· 654 654 static void stac9460_proc_regs_read(struct snd_info_entry *entry, 655 655 struct snd_info_buffer *buffer) 656 656 { 657 - struct snd_ice1712 *ice = (struct snd_ice1712 *)entry->private_data; 657 + struct snd_ice1712 *ice = entry->private_data; 658 658 int reg, val; 659 659 /* registers 0x0 - 0x14 */ 660 660 for (reg = 0; reg <= 0x15; reg++) {
+4 -4
sound/pci/rme96.c
··· 1527 1527 static void 1528 1528 snd_rme96_free_spdif_pcm(struct snd_pcm *pcm) 1529 1529 { 1530 - struct rme96 *rme96 = (struct rme96 *) pcm->private_data; 1530 + struct rme96 *rme96 = pcm->private_data; 1531 1531 rme96->spdif_pcm = NULL; 1532 1532 } 1533 1533 1534 1534 static void 1535 1535 snd_rme96_free_adat_pcm(struct snd_pcm *pcm) 1536 1536 { 1537 - struct rme96 *rme96 = (struct rme96 *) pcm->private_data; 1537 + struct rme96 *rme96 = pcm->private_data; 1538 1538 rme96->adat_pcm = NULL; 1539 1539 } 1540 1540 ··· 1661 1661 snd_rme96_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) 1662 1662 { 1663 1663 int n; 1664 - struct rme96 *rme96 = (struct rme96 *)entry->private_data; 1664 + struct rme96 *rme96 = entry->private_data; 1665 1665 1666 1666 rme96->rcreg = readl(rme96->iobase + RME96_IO_CONTROL_REGISTER); 1667 1667 ··· 2348 2348 if (err < 0) 2349 2349 return err; 2350 2350 card->private_free = snd_rme96_card_free; 2351 - rme96 = (struct rme96 *)card->private_data; 2351 + rme96 = card->private_data; 2352 2352 rme96->card = card; 2353 2353 rme96->pci = pci; 2354 2354 snd_card_set_dev(card, &pci->dev);
+4 -4
sound/pci/rme9652/hdsp.c
··· 3284 3284 static void 3285 3285 snd_hdsp_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) 3286 3286 { 3287 - struct hdsp *hdsp = (struct hdsp *) entry->private_data; 3287 + struct hdsp *hdsp = entry->private_data; 3288 3288 unsigned int status; 3289 3289 unsigned int status2; 3290 3290 char *pref_sync_ref; ··· 4566 4566 4567 4567 static int snd_hdsp_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, unsigned int cmd, unsigned long arg) 4568 4568 { 4569 - struct hdsp *hdsp = (struct hdsp *)hw->private_data; 4569 + struct hdsp *hdsp = hw->private_data; 4570 4570 void __user *argp = (void __user *)arg; 4571 4571 int err; 4572 4572 ··· 5155 5155 5156 5156 static void snd_hdsp_card_free(struct snd_card *card) 5157 5157 { 5158 - struct hdsp *hdsp = (struct hdsp *) card->private_data; 5158 + struct hdsp *hdsp = card->private_data; 5159 5159 5160 5160 if (hdsp) 5161 5161 snd_hdsp_free(hdsp); ··· 5181 5181 if (err < 0) 5182 5182 return err; 5183 5183 5184 - hdsp = (struct hdsp *) card->private_data; 5184 + hdsp = card->private_data; 5185 5185 card->private_free = snd_hdsp_card_free; 5186 5186 hdsp->dev = dev; 5187 5187 hdsp->pci = pci;