]> git.kernelconcepts.de Git - mv-sheeva.git/commitdiff
Merge remote branch 'alsa/devel' into topic/misc
authorTakashi Iwai <tiwai@suse.de>
Mon, 11 Oct 2010 11:56:12 +0000 (13:56 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 11 Oct 2010 11:56:12 +0000 (13:56 +0200)
1  2 
sound/core/oss/mixer_oss.c

index 86afb13cd24004cf48d85c91fc0d56130ad66428,8442a088677d423268424bd20e171ae581bf7853..822dd56993ca2a54de249d38e5827be11be9b7ac
@@@ -77,7 -77,7 +77,7 @@@ static int snd_mixer_oss_release(struc
        struct snd_mixer_oss_file *fmixer;
  
        if (file->private_data) {
 -              fmixer = (struct snd_mixer_oss_file *) file->private_data;
 +              fmixer = file->private_data;
                module_put(fmixer->card->module);
                snd_card_file_remove(fmixer->card, file);
                kfree(fmixer);
@@@ -368,7 -368,7 +368,7 @@@ static int snd_mixer_oss_ioctl1(struct 
  
  static long snd_mixer_oss_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
  {
 -      return snd_mixer_oss_ioctl1((struct snd_mixer_oss_file *) file->private_data, cmd, arg);
 +      return snd_mixer_oss_ioctl1(file->private_data, cmd, arg);
  }
  
  int snd_mixer_oss_ioctl_card(struct snd_card *card, unsigned int cmd, unsigned long arg)
@@@ -582,7 -582,7 +582,7 @@@ static int snd_mixer_oss_get_volume1(st
                                     struct snd_mixer_oss_slot *pslot,
                                     int *left, int *right)
  {
 -      struct slot *slot = (struct slot *)pslot->private_data;
 +      struct slot *slot = pslot->private_data;
        
        *left = *right = 100;
        if (slot->present & SNDRV_MIXER_OSS_PRESENT_PVOLUME) {
@@@ -618,8 -618,10 +618,10 @@@ static void snd_mixer_oss_put_volume1_v
        if (numid == ID_UNKNOWN)
                return;
        down_read(&card->controls_rwsem);
-       if ((kctl = snd_ctl_find_numid(card, numid)) == NULL)
+       if ((kctl = snd_ctl_find_numid(card, numid)) == NULL) {
+               up_read(&card->controls_rwsem);
                return;
+       }
        uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL);
        uctl = kzalloc(sizeof(*uctl), GFP_KERNEL);
        if (uinfo == NULL || uctl == NULL)
@@@ -658,7 -660,7 +660,7 @@@ static void snd_mixer_oss_put_volume1_s
                return;
        down_read(&card->controls_rwsem);
        if ((kctl = snd_ctl_find_numid(card, numid)) == NULL) {
-               up_read(&fmixer->card->controls_rwsem);
+               up_read(&card->controls_rwsem);
                return;
        }
        uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL);
@@@ -691,7 -693,7 +693,7 @@@ static int snd_mixer_oss_put_volume1(st
                                     struct snd_mixer_oss_slot *pslot,
                                     int left, int right)
  {
 -      struct slot *slot = (struct slot *)pslot->private_data;
 +      struct slot *slot = pslot->private_data;
        
        if (slot->present & SNDRV_MIXER_OSS_PRESENT_PVOLUME) {
                snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PVOLUME], left, right);
@@@ -740,7 -742,7 +742,7 @@@ static int snd_mixer_oss_get_recsrc1_sw
                                        struct snd_mixer_oss_slot *pslot,
                                        int *active)
  {
 -      struct slot *slot = (struct slot *)pslot->private_data;
 +      struct slot *slot = pslot->private_data;
        int left, right;
        
        left = right = 1;
@@@ -753,7 -755,7 +755,7 @@@ static int snd_mixer_oss_get_recsrc1_ro
                                           struct snd_mixer_oss_slot *pslot,
                                           int *active)
  {
 -      struct slot *slot = (struct slot *)pslot->private_data;
 +      struct slot *slot = pslot->private_data;
        int left, right;
        
        left = right = 1;
@@@ -766,7 -768,7 +768,7 @@@ static int snd_mixer_oss_put_recsrc1_sw
                                        struct snd_mixer_oss_slot *pslot,
                                        int active)
  {
 -      struct slot *slot = (struct slot *)pslot->private_data;
 +      struct slot *slot = pslot->private_data;
        
        snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CSWITCH], active, active, 0);
        return 0;
@@@ -776,7 -778,7 +778,7 @@@ static int snd_mixer_oss_put_recsrc1_ro
                                           struct snd_mixer_oss_slot *pslot,
                                           int active)
  {
 -      struct slot *slot = (struct slot *)pslot->private_data;
 +      struct slot *slot = pslot->private_data;
        
        snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CROUTE], active, active, 1);
        return 0;
@@@ -797,7 -799,7 +799,7 @@@ static int snd_mixer_oss_get_recsrc2(st
        uctl = kzalloc(sizeof(*uctl), GFP_KERNEL);
        if (uinfo == NULL || uctl == NULL) {
                err = -ENOMEM;
-               goto __unlock;
+               goto __free_only;
        }
        down_read(&card->controls_rwsem);
        kctl = snd_mixer_oss_test_id(mixer, "Capture Source", 0);
                if (!(mixer->mask_recsrc & (1 << idx)))
                        continue;
                pslot = &mixer->slots[idx];
 -              slot = (struct slot *)pslot->private_data;
 +              slot = pslot->private_data;
                if (slot->signature != SNDRV_MIXER_OSS_SIGNATURE)
                        continue;
                if (!(slot->present & SNDRV_MIXER_OSS_PRESENT_CAPTURE))
        err = 0;
        __unlock:
        up_read(&card->controls_rwsem);
+       __free_only:
                kfree(uctl);
                kfree(uinfo);
                return err;
@@@ -847,7 -850,7 +850,7 @@@ static int snd_mixer_oss_put_recsrc2(st
        uctl = kzalloc(sizeof(*uctl), GFP_KERNEL);
        if (uinfo == NULL || uctl == NULL) {
                err = -ENOMEM;
-               goto __unlock;
+               goto __free_only;
        }
        down_read(&card->controls_rwsem);
        kctl = snd_mixer_oss_test_id(mixer, "Capture Source", 0);
                if (!(mixer->mask_recsrc & (1 << idx)))
                        continue;
                pslot = &mixer->slots[idx];
 -              slot = (struct slot *)pslot->private_data;
 +              slot = pslot->private_data;
                if (slot->signature != SNDRV_MIXER_OSS_SIGNATURE)
                        continue;
                if (!(slot->present & SNDRV_MIXER_OSS_PRESENT_CAPTURE))
        err = 0;
        __unlock:
        up_read(&card->controls_rwsem);
+       __free_only:
        kfree(uctl);
        kfree(uinfo);
        return err;
@@@ -925,7 -929,7 +929,7 @@@ static int snd_mixer_oss_build_test(str
  
  static void snd_mixer_oss_slot_free(struct snd_mixer_oss_slot *chn)
  {
 -      struct slot *p = (struct slot *)chn->private_data;
 +      struct slot *p = chn->private_data;
        if (p) {
                if (p->allocated && p->assigned) {
                        kfree(p->assigned->name);