Merge branch 'for-linus' into for-next
authorTakashi Iwai <tiwai@suse.de>
Thu, 19 Sep 2013 16:46:43 +0000 (18:46 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 19 Sep 2013 16:46:43 +0000 (18:46 +0200)
sound/pci/asihpi/asihpi.c
sound/pci/au88x0/au88x0_synth.c
sound/pci/ctxfi/ctdaio.c
sound/pci/hda/patch_ca0132.c
sound/pci/rme9652/hdspm.c

index dc632cd..5f2acd3 100644 (file)
@@ -1913,6 +1913,7 @@ static int snd_asihpi_tuner_band_put(struct snd_kcontrol *kcontrol,
        struct snd_card_asihpi *asihpi = snd_kcontrol_chip(kcontrol);
        */
        u32 h_control = kcontrol->private_value;
+       unsigned int idx;
        u16 band;
        u16 tuner_bands[HPI_TUNER_BAND_LAST];
        u32 num_bands = 0;
@@ -1920,7 +1921,10 @@ static int snd_asihpi_tuner_band_put(struct snd_kcontrol *kcontrol,
        num_bands = asihpi_tuner_band_query(kcontrol, tuner_bands,
                        HPI_TUNER_BAND_LAST);
 
-       band = tuner_bands[ucontrol->value.enumerated.item[0]];
+       idx = ucontrol->value.enumerated.item[0];
+       if (idx >= ARRAY_SIZE(tuner_bands))
+               idx = ARRAY_SIZE(tuner_bands) - 1;
+       band = tuner_bands[idx];
        hpi_handle_error(hpi_tuner_set_band(h_control, band));
 
        return 1;
@@ -2383,7 +2387,8 @@ static int snd_asihpi_clksrc_put(struct snd_kcontrol *kcontrol,
        struct snd_card_asihpi *asihpi =
                        (struct snd_card_asihpi *)(kcontrol->private_data);
        struct clk_cache *clkcache = &asihpi->cc;
-       int change, item;
+       unsigned int item;
+       int change;
        u32 h_control = kcontrol->private_value;
 
        change = 1;
index 8bef473..922a84b 100644 (file)
@@ -219,7 +219,6 @@ vortex_wt_SetReg(vortex_t * vortex, unsigned char reg, int wt,
                */
                hwwrite(vortex->mmio, WT_RUN(wt), val);
                return 0xc;
-               break;
        case 1:         /* param 0 */
                /*
                printk(KERN_DEBUG "vortex: WT SetReg(0x%x) = 0x%08x\n",
@@ -227,7 +226,6 @@ vortex_wt_SetReg(vortex_t * vortex, unsigned char reg, int wt,
                */
                hwwrite(vortex->mmio, WT_PARM(wt, 0), val);
                return 0xc;
-               break;
        case 2:         /* param 1 */
                /*
                printk(KERN_DEBUG "vortex: WT SetReg(0x%x) = 0x%08x\n",
@@ -235,7 +233,6 @@ vortex_wt_SetReg(vortex_t * vortex, unsigned char reg, int wt,
                */
                hwwrite(vortex->mmio, WT_PARM(wt, 1), val);
                return 0xc;
-               break;
        case 3:         /* param 2 */
                /*
                printk(KERN_DEBUG "vortex: WT SetReg(0x%x) = 0x%08x\n",
@@ -243,7 +240,6 @@ vortex_wt_SetReg(vortex_t * vortex, unsigned char reg, int wt,
                */
                hwwrite(vortex->mmio, WT_PARM(wt, 2), val);
                return 0xc;
-               break;
        case 4:         /* param 3 */
                /*
                printk(KERN_DEBUG "vortex: WT SetReg(0x%x) = 0x%08x\n",
@@ -251,7 +247,6 @@ vortex_wt_SetReg(vortex_t * vortex, unsigned char reg, int wt,
                */
                hwwrite(vortex->mmio, WT_PARM(wt, 3), val);
                return 0xc;
-               break;
        case 6:         /* mute */
                /*
                printk(KERN_DEBUG "vortex: WT SetReg(0x%x) = 0x%08x\n",
@@ -259,20 +254,17 @@ vortex_wt_SetReg(vortex_t * vortex, unsigned char reg, int wt,
                */
                hwwrite(vortex->mmio, WT_MUTE(wt), val);
                return 0xc;
-               break;
        case 0xb:
-               {               /* delay */
-                       /*
-                       printk(KERN_DEBUG "vortex: WT SetReg(0x%x) = 0x%08x\n",
-                              WT_DELAY(wt,0), (int)val);
-                       */
-                       hwwrite(vortex->mmio, WT_DELAY(wt, 3), val);
-                       hwwrite(vortex->mmio, WT_DELAY(wt, 2), val);
-                       hwwrite(vortex->mmio, WT_DELAY(wt, 1), val);
-                       hwwrite(vortex->mmio, WT_DELAY(wt, 0), val);
-                       return 0xc;
-               }
-               break;
+                       /* delay */
+               /*
+               printk(KERN_DEBUG "vortex: WT SetReg(0x%x) = 0x%08x\n",
+                      WT_DELAY(wt,0), (int)val);
+               */
+               hwwrite(vortex->mmio, WT_DELAY(wt, 3), val);
+               hwwrite(vortex->mmio, WT_DELAY(wt, 2), val);
+               hwwrite(vortex->mmio, WT_DELAY(wt, 1), val);
+               hwwrite(vortex->mmio, WT_DELAY(wt, 0), val);
+               return 0xc;
                /* Global WT block parameters */
        case 5:         /* sramp */
                ecx = WT_SRAMP(wt);
@@ -291,7 +283,6 @@ vortex_wt_SetReg(vortex_t * vortex, unsigned char reg, int wt,
                break;
        default:
                return 0;
-               break;
        }
        /*
        printk(KERN_DEBUG "vortex: WT SetReg(0x%x) = 0x%08x\n", ecx, (int)val);
index 0c00eb4..84f86bf 100644 (file)
@@ -33,7 +33,7 @@ struct daio_rsc_idx {
        unsigned short right;
 };
 
-struct daio_rsc_idx idx_20k1[NUM_DAIOTYP] = {
+static struct daio_rsc_idx idx_20k1[NUM_DAIOTYP] = {
        [LINEO1] = {.left = 0x00, .right = 0x01},
        [LINEO2] = {.left = 0x18, .right = 0x19},
        [LINEO3] = {.left = 0x08, .right = 0x09},
@@ -44,7 +44,7 @@ struct daio_rsc_idx idx_20k1[NUM_DAIOTYP] = {
        [SPDIFI1] = {.left = 0x95, .right = 0x9d},
 };
 
-struct daio_rsc_idx idx_20k2[NUM_DAIOTYP] = {
+static struct daio_rsc_idx idx_20k2[NUM_DAIOTYP] = {
        [LINEO1] = {.left = 0x40, .right = 0x41},
        [LINEO2] = {.left = 0x60, .right = 0x61},
        [LINEO3] = {.left = 0x50, .right = 0x51},
index 6e9876f..54d1479 100644 (file)
@@ -759,7 +759,7 @@ struct ca0132_spec {
 /*
  * CA0132 codec access
  */
-unsigned int codec_send_command(struct hda_codec *codec, hda_nid_t nid,
+static unsigned int codec_send_command(struct hda_codec *codec, hda_nid_t nid,
                unsigned int verb, unsigned int parm, unsigned int *res)
 {
        unsigned int response;
index 3cde55b..2907e68 100644 (file)
@@ -3996,7 +3996,6 @@ static int hdspm_tco_sync_check(struct hdspm *hdspm)
                                        return 1;
                        }
                        return 0;
-                       break;
                case AES32:
                        status = hdspm_read(hdspm, HDSPM_statusRegister);
                        if (status & HDSPM_tcoLockAes) {
@@ -4006,9 +4005,6 @@ static int hdspm_tco_sync_check(struct hdspm *hdspm)
                                        return 1;
                        }
                        return 0;
-
-                       break;
-
                case RayDAT:
                case AIO:
                        status = hdspm_read(hdspm, HDSPM_RD_STATUS_1);
@@ -4018,7 +4014,6 @@ static int hdspm_tco_sync_check(struct hdspm *hdspm)
                        if (status & 0x4000000)
                                return 1; /* Lock */
                        return 0; /* No signal */
-                       break;
 
                default:
                        break;