diff options
author | Joe Perches <joe@perches.com> | 2010-09-04 21:52:54 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-09-07 02:05:59 -0400 |
commit | 9fe856e47e1751204faf3d604c6d20ab24bd3b93 (patch) | |
tree | 744a735096a76caad69d73884893c897b0ce3219 /sound/core | |
parent | 831853c87fb7234a8650484d30993242ea9ad6d3 (diff) |
sound: Remove unnecessary casts of private_data
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/oss/mixer_oss.c | 22 | ||||
-rw-r--r-- | sound/core/pcm.c | 3 |
2 files changed, 12 insertions, 13 deletions
diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c index f50ebf20df96..86afb13cd240 100644 --- a/sound/core/oss/mixer_oss.c +++ b/sound/core/oss/mixer_oss.c | |||
@@ -77,7 +77,7 @@ static int snd_mixer_oss_release(struct inode *inode, struct file *file) | |||
77 | struct snd_mixer_oss_file *fmixer; | 77 | struct snd_mixer_oss_file *fmixer; |
78 | 78 | ||
79 | if (file->private_data) { | 79 | if (file->private_data) { |
80 | fmixer = (struct snd_mixer_oss_file *) file->private_data; | 80 | fmixer = file->private_data; |
81 | module_put(fmixer->card->module); | 81 | module_put(fmixer->card->module); |
82 | snd_card_file_remove(fmixer->card, file); | 82 | snd_card_file_remove(fmixer->card, file); |
83 | kfree(fmixer); | 83 | kfree(fmixer); |
@@ -368,7 +368,7 @@ static int snd_mixer_oss_ioctl1(struct snd_mixer_oss_file *fmixer, unsigned int | |||
368 | 368 | ||
369 | static long snd_mixer_oss_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | 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 | int snd_mixer_oss_ioctl_card(struct snd_card *card, unsigned int cmd, unsigned long arg) | 374 | int snd_mixer_oss_ioctl_card(struct snd_card *card, unsigned int cmd, unsigned long arg) |
@@ -582,7 +582,7 @@ static int snd_mixer_oss_get_volume1(struct snd_mixer_oss_file *fmixer, | |||
582 | struct snd_mixer_oss_slot *pslot, | 582 | struct snd_mixer_oss_slot *pslot, |
583 | int *left, int *right) | 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 | *left = *right = 100; | 587 | *left = *right = 100; |
588 | if (slot->present & SNDRV_MIXER_OSS_PRESENT_PVOLUME) { | 588 | if (slot->present & SNDRV_MIXER_OSS_PRESENT_PVOLUME) { |
@@ -691,7 +691,7 @@ static int snd_mixer_oss_put_volume1(struct snd_mixer_oss_file *fmixer, | |||
691 | struct snd_mixer_oss_slot *pslot, | 691 | struct snd_mixer_oss_slot *pslot, |
692 | int left, int right) | 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 | if (slot->present & SNDRV_MIXER_OSS_PRESENT_PVOLUME) { | 696 | if (slot->present & SNDRV_MIXER_OSS_PRESENT_PVOLUME) { |
697 | snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PVOLUME], left, right); | 697 | snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PVOLUME], left, right); |
@@ -740,7 +740,7 @@ static int snd_mixer_oss_get_recsrc1_sw(struct snd_mixer_oss_file *fmixer, | |||
740 | struct snd_mixer_oss_slot *pslot, | 740 | struct snd_mixer_oss_slot *pslot, |
741 | int *active) | 741 | int *active) |
742 | { | 742 | { |
743 | struct slot *slot = (struct slot *)pslot->private_data; | 743 | struct slot *slot = pslot->private_data; |
744 | int left, right; | 744 | int left, right; |
745 | 745 | ||
746 | left = right = 1; | 746 | left = right = 1; |
@@ -753,7 +753,7 @@ static int snd_mixer_oss_get_recsrc1_route(struct snd_mixer_oss_file *fmixer, | |||
753 | struct snd_mixer_oss_slot *pslot, | 753 | struct snd_mixer_oss_slot *pslot, |
754 | int *active) | 754 | int *active) |
755 | { | 755 | { |
756 | struct slot *slot = (struct slot *)pslot->private_data; | 756 | struct slot *slot = pslot->private_data; |
757 | int left, right; | 757 | int left, right; |
758 | 758 | ||
759 | left = right = 1; | 759 | left = right = 1; |
@@ -766,7 +766,7 @@ static int snd_mixer_oss_put_recsrc1_sw(struct snd_mixer_oss_file *fmixer, | |||
766 | struct snd_mixer_oss_slot *pslot, | 766 | struct snd_mixer_oss_slot *pslot, |
767 | int active) | 767 | int active) |
768 | { | 768 | { |
769 | struct slot *slot = (struct slot *)pslot->private_data; | 769 | struct slot *slot = pslot->private_data; |
770 | 770 | ||
771 | snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CSWITCH], active, active, 0); | 771 | snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CSWITCH], active, active, 0); |
772 | return 0; | 772 | return 0; |
@@ -776,7 +776,7 @@ static int snd_mixer_oss_put_recsrc1_route(struct snd_mixer_oss_file *fmixer, | |||
776 | struct snd_mixer_oss_slot *pslot, | 776 | struct snd_mixer_oss_slot *pslot, |
777 | int active) | 777 | int active) |
778 | { | 778 | { |
779 | struct slot *slot = (struct slot *)pslot->private_data; | 779 | struct slot *slot = pslot->private_data; |
780 | 780 | ||
781 | snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CROUTE], active, active, 1); | 781 | snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CROUTE], active, active, 1); |
782 | return 0; | 782 | return 0; |
@@ -813,7 +813,7 @@ static int snd_mixer_oss_get_recsrc2(struct snd_mixer_oss_file *fmixer, unsigned | |||
813 | if (!(mixer->mask_recsrc & (1 << idx))) | 813 | if (!(mixer->mask_recsrc & (1 << idx))) |
814 | continue; | 814 | continue; |
815 | pslot = &mixer->slots[idx]; | 815 | pslot = &mixer->slots[idx]; |
816 | slot = (struct slot *)pslot->private_data; | 816 | slot = pslot->private_data; |
817 | if (slot->signature != SNDRV_MIXER_OSS_SIGNATURE) | 817 | if (slot->signature != SNDRV_MIXER_OSS_SIGNATURE) |
818 | continue; | 818 | continue; |
819 | if (!(slot->present & SNDRV_MIXER_OSS_PRESENT_CAPTURE)) | 819 | if (!(slot->present & SNDRV_MIXER_OSS_PRESENT_CAPTURE)) |
@@ -861,7 +861,7 @@ static int snd_mixer_oss_put_recsrc2(struct snd_mixer_oss_file *fmixer, unsigned | |||
861 | if (!(mixer->mask_recsrc & (1 << idx))) | 861 | if (!(mixer->mask_recsrc & (1 << idx))) |
862 | continue; | 862 | continue; |
863 | pslot = &mixer->slots[idx]; | 863 | pslot = &mixer->slots[idx]; |
864 | slot = (struct slot *)pslot->private_data; | 864 | slot = pslot->private_data; |
865 | if (slot->signature != SNDRV_MIXER_OSS_SIGNATURE) | 865 | if (slot->signature != SNDRV_MIXER_OSS_SIGNATURE) |
866 | continue; | 866 | continue; |
867 | if (!(slot->present & SNDRV_MIXER_OSS_PRESENT_CAPTURE)) | 867 | if (!(slot->present & SNDRV_MIXER_OSS_PRESENT_CAPTURE)) |
@@ -925,7 +925,7 @@ static int snd_mixer_oss_build_test(struct snd_mixer_oss *mixer, struct slot *sl | |||
925 | 925 | ||
926 | static void snd_mixer_oss_slot_free(struct snd_mixer_oss_slot *chn) | 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 | if (p) { | 929 | if (p) { |
930 | if (p->allocated && p->assigned) { | 930 | if (p->allocated && p->assigned) { |
931 | kfree(p->assigned->name); | 931 | kfree(p->assigned->name); |
diff --git a/sound/core/pcm.c b/sound/core/pcm.c index 204af48c5cc1..88525a958291 100644 --- a/sound/core/pcm.c +++ b/sound/core/pcm.c | |||
@@ -364,8 +364,7 @@ static void snd_pcm_stream_proc_info_read(struct snd_info_entry *entry, | |||
364 | static void snd_pcm_substream_proc_info_read(struct snd_info_entry *entry, | 364 | static void snd_pcm_substream_proc_info_read(struct snd_info_entry *entry, |
365 | struct snd_info_buffer *buffer) | 365 | struct snd_info_buffer *buffer) |
366 | { | 366 | { |
367 | snd_pcm_proc_info_read((struct snd_pcm_substream *)entry->private_data, | 367 | snd_pcm_proc_info_read(entry->private_data, buffer); |
368 | buffer); | ||
369 | } | 368 | } |
370 | 369 | ||
371 | static void snd_pcm_substream_proc_hw_params_read(struct snd_info_entry *entry, | 370 | static void snd_pcm_substream_proc_hw_params_read(struct snd_info_entry *entry, |