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

Merge branch 'fix/misc' into topic/misc

+121 -65
+1 -1
sound/atmel/abdac.c
··· 420 420 return PTR_ERR(pclk); 421 421 } 422 422 sample_clk = clk_get(&pdev->dev, "sample_clk"); 423 - if (IS_ERR(pclk)) { 423 + if (IS_ERR(sample_clk)) { 424 424 dev_dbg(&pdev->dev, "no sample clock\n"); 425 425 retval = PTR_ERR(pclk); 426 426 goto out_put_pclk;
+1 -1
sound/core/pcm_lib.c
··· 223 223 entry->jiffies = jiffies; 224 224 entry->pos = pos; 225 225 entry->period_size = runtime->period_size; 226 - entry->buffer_size = runtime->buffer_size;; 226 + entry->buffer_size = runtime->buffer_size; 227 227 entry->old_hw_ptr = runtime->status->hw_ptr; 228 228 entry->hw_ptr_base = runtime->hw_ptr_base; 229 229 log->idx = (log->idx + 1) % XRUN_LOG_CNT;
+2 -4
sound/oss/dev_table.c
··· 71 71 if (sound_nblocks >= MAX_MEM_BLOCKS) 72 72 sound_nblocks = MAX_MEM_BLOCKS - 1; 73 73 74 - op = (struct audio_operations *) (sound_mem_blocks[sound_nblocks] = vmalloc(sizeof(struct audio_operations))); 74 + op = (struct audio_operations *) (sound_mem_blocks[sound_nblocks] = vzalloc(sizeof(struct audio_operations))); 75 75 sound_nblocks++; 76 76 if (sound_nblocks >= MAX_MEM_BLOCKS) 77 77 sound_nblocks = MAX_MEM_BLOCKS - 1; ··· 81 81 sound_unload_audiodev(num); 82 82 return -(ENOMEM); 83 83 } 84 - memset((char *) op, 0, sizeof(struct audio_operations)); 85 84 init_waitqueue_head(&op->in_sleeper); 86 85 init_waitqueue_head(&op->out_sleeper); 87 86 init_waitqueue_head(&op->poll_sleeper); ··· 127 128 /* FIXME: This leaks a mixer_operations struct every time its called 128 129 until you unload sound! */ 129 130 130 - op = (struct mixer_operations *) (sound_mem_blocks[sound_nblocks] = vmalloc(sizeof(struct mixer_operations))); 131 + op = (struct mixer_operations *) (sound_mem_blocks[sound_nblocks] = vzalloc(sizeof(struct mixer_operations))); 131 132 sound_nblocks++; 132 133 if (sound_nblocks >= MAX_MEM_BLOCKS) 133 134 sound_nblocks = MAX_MEM_BLOCKS - 1; ··· 136 137 printk(KERN_ERR "Sound: Can't allocate mixer driver for (%s)\n", name); 137 138 return -ENOMEM; 138 139 } 139 - memset((char *) op, 0, sizeof(struct mixer_operations)); 140 140 memcpy((char *) op, (char *) driver, driver_size); 141 141 142 142 strlcpy(op->name, name, sizeof(op->name));
+2 -2
sound/oss/midibuf.c
··· 178 178 return err; 179 179 180 180 parms[dev].prech_timeout = MAX_SCHEDULE_TIMEOUT; 181 - midi_in_buf[dev] = (struct midi_buf *) vmalloc(sizeof(struct midi_buf)); 181 + midi_in_buf[dev] = vmalloc(sizeof(struct midi_buf)); 182 182 183 183 if (midi_in_buf[dev] == NULL) 184 184 { ··· 188 188 } 189 189 midi_in_buf[dev]->len = midi_in_buf[dev]->head = midi_in_buf[dev]->tail = 0; 190 190 191 - midi_out_buf[dev] = (struct midi_buf *) vmalloc(sizeof(struct midi_buf)); 191 + midi_out_buf[dev] = vmalloc(sizeof(struct midi_buf)); 192 192 193 193 if (midi_out_buf[dev] == NULL) 194 194 {
+3 -3
sound/oss/pss.c
··· 859 859 return 0; 860 860 861 861 case SNDCTL_COPR_LOAD: 862 - buf = (copr_buffer *) vmalloc(sizeof(copr_buffer)); 862 + buf = vmalloc(sizeof(copr_buffer)); 863 863 if (buf == NULL) 864 864 return -ENOSPC; 865 865 if (copy_from_user(buf, arg, sizeof(copr_buffer))) { ··· 871 871 return err; 872 872 873 873 case SNDCTL_COPR_SENDMSG: 874 - mbuf = (copr_msg *)vmalloc(sizeof(copr_msg)); 874 + mbuf = vmalloc(sizeof(copr_msg)); 875 875 if (mbuf == NULL) 876 876 return -ENOSPC; 877 877 if (copy_from_user(mbuf, arg, sizeof(copr_msg))) { ··· 895 895 896 896 case SNDCTL_COPR_RCVMSG: 897 897 err = 0; 898 - mbuf = (copr_msg *)vmalloc(sizeof(copr_msg)); 898 + mbuf = vmalloc(sizeof(copr_msg)); 899 899 if (mbuf == NULL) 900 900 return -ENOSPC; 901 901 data = (unsigned short *)mbuf->data;
+2 -2
sound/oss/sequencer.c
··· 1646 1646 { 1647 1647 if (sequencer_ok) 1648 1648 return; 1649 - queue = (unsigned char *)vmalloc(SEQ_MAX_QUEUE * EV_SZ); 1649 + queue = vmalloc(SEQ_MAX_QUEUE * EV_SZ); 1650 1650 if (queue == NULL) 1651 1651 { 1652 1652 printk(KERN_ERR "sequencer: Can't allocate memory for sequencer output queue\n"); 1653 1653 return; 1654 1654 } 1655 - iqueue = (unsigned char *)vmalloc(SEQ_MAX_QUEUE * IEV_SZ); 1655 + iqueue = vmalloc(SEQ_MAX_QUEUE * IEV_SZ); 1656 1656 if (iqueue == NULL) 1657 1657 { 1658 1658 printk(KERN_ERR "sequencer: Can't allocate memory for sequencer input queue\n");
+1 -1
sound/pci/asihpi/hpioctl.c
··· 435 435 struct hpi_message hm; 436 436 struct hpi_response hr; 437 437 struct hpi_adapter *pa; 438 - pa = (struct hpi_adapter *)pci_get_drvdata(pci_dev); 438 + pa = pci_get_drvdata(pci_dev); 439 439 440 440 hpi_init_message_response(&hm, &hr, HPI_OBJ_SUBSYSTEM, 441 441 HPI_SUBSYS_DELETE_ADAPTER);
+18 -8
sound/pci/azt3328.c
··· 1129 1129 1130 1130 count_areas = size/2; 1131 1131 addr_area2 = addr+count_areas; 1132 - count_areas--; /* max. index */ 1133 1132 snd_azf3328_dbgcodec("setdma: buffers %08lx[%u] / %08lx[%u]\n", 1134 1133 addr, count_areas, addr_area2, count_areas); 1134 + 1135 + count_areas--; /* max. index */ 1135 1136 1136 1137 /* build combined I/O buffer length word */ 1137 1138 lengths = (count_areas << 16) | (count_areas); ··· 1741 1740 .rate_max = AZF_FREQ_66200, 1742 1741 .channels_min = 1, 1743 1742 .channels_max = 2, 1744 - .buffer_bytes_max = 65536, 1745 - .period_bytes_min = 64, 1746 - .period_bytes_max = 65536, 1747 - .periods_min = 1, 1748 - .periods_max = 1024, 1743 + .buffer_bytes_max = (64*1024), 1744 + .period_bytes_min = 1024, 1745 + .period_bytes_max = (32*1024), 1746 + /* We simply have two DMA areas (instead of a list of descriptors 1747 + such as other cards); I believe that this is a fixed hardware 1748 + attribute and there isn't much driver magic to be done to expand it. 1749 + Thus indicate that we have at least and at most 2 periods. */ 1750 + .periods_min = 2, 1751 + .periods_max = 2, 1749 1752 /* FIXME: maybe that card actually has a FIFO? 1750 1753 * Hmm, it seems newer revisions do have one, but we still don't know 1751 1754 * its size... */ ··· 1985 1980 chip = snd_timer_chip(timer); 1986 1981 spin_lock_irqsave(&chip->reg_lock, flags); 1987 1982 /* disable timer countdown and interrupt */ 1988 - /* FIXME: should we write TIMER_IRQ_ACK here? */ 1989 - snd_azf3328_ctrl_outb(chip, IDX_IO_TIMER_VALUE + 3, 0); 1983 + /* Hmm, should we write TIMER_IRQ_ACK here? 1984 + YES indeed, otherwise a rogue timer operation - which prompts 1985 + ALSA(?) to call repeated stop() in vain, but NOT start() - 1986 + will never end (value 0x03 is kept shown in control byte). 1987 + Simply manually poking 0x04 _once_ immediately successfully stops 1988 + the hardware/ALSA interrupt activity. */ 1989 + snd_azf3328_ctrl_outb(chip, IDX_IO_TIMER_VALUE + 3, 0x04); 1990 1990 spin_unlock_irqrestore(&chip->reg_lock, flags); 1991 1991 snd_azf3328_dbgcallleave(); 1992 1992 return 0;
+10 -6
sound/pci/ctxfi/ctpcm.c
··· 129 129 130 130 apcm->substream = substream; 131 131 apcm->interrupt = ct_atc_pcm_interrupt; 132 - runtime->private_data = apcm; 133 - runtime->private_free = ct_atc_pcm_free_substream; 134 132 if (IEC958 == substream->pcm->device) { 135 133 runtime->hw = ct_spdif_passthru_playback_hw; 136 134 atc->spdif_out_passthru(atc, 1); ··· 153 155 } 154 156 155 157 apcm->timer = ct_timer_instance_new(atc->timer, apcm); 156 - if (!apcm->timer) 158 + if (!apcm->timer) { 159 + kfree(apcm); 157 160 return -ENOMEM; 161 + } 162 + runtime->private_data = apcm; 163 + runtime->private_free = ct_atc_pcm_free_substream; 158 164 159 165 return 0; 160 166 } ··· 280 278 apcm->started = 0; 281 279 apcm->substream = substream; 282 280 apcm->interrupt = ct_atc_pcm_interrupt; 283 - runtime->private_data = apcm; 284 - runtime->private_free = ct_atc_pcm_free_substream; 285 281 runtime->hw = ct_pcm_capture_hw; 286 282 runtime->hw.rate_max = atc->rsr * atc->msr; 287 283 ··· 298 298 } 299 299 300 300 apcm->timer = ct_timer_instance_new(atc->timer, apcm); 301 - if (!apcm->timer) 301 + if (!apcm->timer) { 302 + kfree(apcm); 302 303 return -ENOMEM; 304 + } 305 + runtime->private_data = apcm; 306 + runtime->private_free = ct_atc_pcm_free_substream; 303 307 304 308 return 0; 305 309 }
+1
sound/pci/hda/patch_conexant.c
··· 3100 3100 SND_PCI_QUIRK(0x1028, 0x0402, "Dell Vostro", CXT5066_DELL_VOSTRO), 3101 3101 SND_PCI_QUIRK(0x1028, 0x0408, "Dell Inspiron One 19T", CXT5066_IDEAPAD), 3102 3102 SND_PCI_QUIRK(0x103c, 0x360b, "HP G60", CXT5066_HP_LAPTOP), 3103 + SND_PCI_QUIRK(0x1043, 0x13f3, "Asus A52J", CXT5066_HP_LAPTOP), 3103 3104 SND_PCI_QUIRK(0x1179, 0xff1e, "Toshiba Satellite C650D", CXT5066_IDEAPAD), 3104 3105 SND_PCI_QUIRK(0x1179, 0xff50, "Toshiba Satellite P500-PSPGSC-01800T", CXT5066_OLPC_XO_1_5), 3105 3106 SND_PCI_QUIRK(0x1179, 0xffe0, "Toshiba Satellite Pro T130-15F", CXT5066_OLPC_XO_1_5),
+9 -2
sound/pci/hda/patch_realtek.c
··· 10816 10816 return 0; 10817 10817 } 10818 10818 10819 + static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec, 10820 + const struct auto_pin_cfg *cfg); 10821 + 10819 10822 /* almost identical with ALC880 parser... */ 10820 10823 static int alc882_parse_auto_config(struct hda_codec *codec) 10821 10824 { ··· 10836 10833 err = alc880_auto_fill_dac_nids(spec, &spec->autocfg); 10837 10834 if (err < 0) 10838 10835 return err; 10839 - err = alc880_auto_create_multi_out_ctls(spec, &spec->autocfg); 10836 + if (codec->vendor_id == 0x10ec0887) 10837 + err = alc861vd_auto_create_multi_out_ctls(spec, &spec->autocfg); 10838 + else 10839 + err = alc880_auto_create_multi_out_ctls(spec, &spec->autocfg); 10840 10840 if (err < 0) 10841 10841 return err; 10842 10842 err = alc880_auto_create_extra_out(spec, spec->autocfg.hp_pins[0], ··· 16969 16963 #define alc861vd_idx_to_mixer_switch(nid) ((nid) + 0x0c) 16970 16964 16971 16965 /* add playback controls from the parsed DAC table */ 16972 - /* Based on ALC880 version. But ALC861VD has separate, 16966 + /* Based on ALC880 version. But ALC861VD and ALC887 have separate, 16973 16967 * different NIDs for mute/unmute switch and volume control */ 16974 16968 static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec, 16975 16969 const struct auto_pin_cfg *cfg) ··· 19304 19298 19305 19299 static struct snd_pci_quirk alc662_fixup_tbl[] = { 19306 19300 SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), 19301 + SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD), 19307 19302 SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD), 19308 19303 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD), 19309 19304 {}
+12 -2
sound/pci/hda/patch_sigmatel.c
··· 389 389 0x11, 0x20, 0 390 390 }; 391 391 392 + #define STAC92HD87B_NUM_DMICS 1 393 + static hda_nid_t stac92hd87b_dmic_nids[STAC92HD87B_NUM_DMICS + 1] = { 394 + 0x11, 0 395 + }; 396 + 392 397 #define STAC92HD83XXX_NUM_CAPS 2 393 398 static unsigned long stac92hd83xxx_capvols[] = { 394 399 HDA_COMPOSE_AMP_VAL(0x17, 3, 0, HDA_OUTPUT), ··· 5457 5452 stac92hd83xxx_brd_tbl[spec->board_config]); 5458 5453 5459 5454 switch (codec->vendor_id) { 5455 + case 0x111d76d1: 5456 + case 0x111d76d9: 5457 + spec->dmic_nids = stac92hd87b_dmic_nids; 5458 + spec->num_dmics = stac92xx_connected_ports(codec, 5459 + stac92hd87b_dmic_nids, 5460 + STAC92HD87B_NUM_DMICS); 5461 + /* Fall through */ 5460 5462 case 0x111d7666: 5461 5463 case 0x111d7667: 5462 5464 case 0x111d7668: 5463 5465 case 0x111d7669: 5464 - case 0x111d76d1: 5465 - case 0x111d76d9: 5466 5466 spec->num_pins = ARRAY_SIZE(stac92hd88xxx_pin_nids); 5467 5467 spec->pin_nids = stac92hd88xxx_pin_nids; 5468 5468 spec->mono_nid = 0;
+6
sound/pci/intel8x0.c
··· 1866 1866 }, 1867 1867 { 1868 1868 .subvendor = 0x1028, 1869 + .subdevice = 0x0182, 1870 + .name = "Dell Latitude D610", /* STAC9750/51 */ 1871 + .type = AC97_TUNE_HP_ONLY 1872 + }, 1873 + { 1874 + .subvendor = 0x1028, 1869 1875 .subdevice = 0x0186, 1870 1876 .name = "Dell Latitude D810", /* cf. Malone #41015 */ 1871 1877 .type = AC97_TUNE_HP_MUTE_LED
+11 -1
sound/pci/mixart/mixart_hwdep.h
··· 25 25 26 26 #include <sound/hwdep.h> 27 27 28 + #ifndef readl_be 28 29 #define readl_be(x) be32_to_cpu(__raw_readl(x)) 29 - #define writel_be(data,addr) __raw_writel(cpu_to_be32(data),addr) 30 + #endif 30 31 32 + #ifndef writel_be 33 + #define writel_be(data,addr) __raw_writel(cpu_to_be32(data),addr) 34 + #endif 35 + 36 + #ifndef readl_le 31 37 #define readl_le(x) le32_to_cpu(__raw_readl(x)) 38 + #endif 39 + 40 + #ifndef writel_le 32 41 #define writel_le(data,addr) __raw_writel(cpu_to_le32(data),addr) 42 + #endif 33 43 34 44 #define MIXART_MEM(mgr,x) ((mgr)->mem[0].virt + (x)) 35 45 #define MIXART_REG(mgr,x) ((mgr)->mem[1].virt + (x))
+4 -8
sound/ppc/pmac.c
··· 1228 1228 chip->rsrc[i].start + 1, 1229 1229 rnames[i]) == NULL) { 1230 1230 printk(KERN_ERR "snd: can't request rsrc " 1231 - " %d (%s: 0x%016llx:%016llx)\n", 1232 - i, rnames[i], 1233 - (unsigned long long)chip->rsrc[i].start, 1234 - (unsigned long long)chip->rsrc[i].end); 1231 + " %d (%s: %pR)\n", 1232 + i, rnames[i], &chip->rsrc[i]); 1235 1233 err = -ENODEV; 1236 1234 goto __error; 1237 1235 } ··· 1254 1256 chip->rsrc[i].start + 1, 1255 1257 rnames[i]) == NULL) { 1256 1258 printk(KERN_ERR "snd: can't request rsrc " 1257 - " %d (%s: 0x%016llx:%016llx)\n", 1258 - i, rnames[i], 1259 - (unsigned long long)chip->rsrc[i].start, 1260 - (unsigned long long)chip->rsrc[i].end); 1259 + " %d (%s: %pR)\n", 1260 + i, rnames[i], &chip->rsrc[i]); 1261 1261 err = -ENODEV; 1262 1262 goto __error; 1263 1263 }
+2 -1
sound/soc/codecs/Kconfig
··· 25 25 select SND_SOC_CQ0093VC if MFD_DAVINCI_VOICECODEC 26 26 select SND_SOC_CS42L51 if I2C 27 27 select SND_SOC_CS4270 if I2C 28 + select SND_SOC_CX20442 28 29 select SND_SOC_DA7210 if I2C 29 - select SND_SOC_JZ4740 if SOC_JZ4740 30 + select SND_SOC_JZ4740_CODEC if SOC_JZ4740 30 31 select SND_SOC_MAX98088 if I2C 31 32 select SND_SOC_MAX9877 if I2C 32 33 select SND_SOC_PCM3008
+26 -10
sound/soc/codecs/tlv320dac33.c
··· 58 58 (1000000000 / ((rate * 1000) / samples)) 59 59 60 60 #define US_TO_SAMPLES(rate, us) \ 61 - (rate / (1000000 / us)) 61 + (rate / (1000000 / (us < 1000000 ? us : 1000000))) 62 62 63 63 #define UTHR_FROM_PERIOD_SIZE(samples, playrate, burstrate) \ 64 64 ((samples * 5000) / ((burstrate * 5000) / (burstrate - playrate))) ··· 200 200 u8 *value) 201 201 { 202 202 struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec); 203 - int val; 203 + int val, ret = 0; 204 204 205 205 *value = reg & 0xff; 206 206 ··· 210 210 if (val < 0) { 211 211 dev_err(codec->dev, "Read failed (%d)\n", val); 212 212 value[0] = dac33_read_reg_cache(codec, reg); 213 + ret = val; 213 214 } else { 214 215 value[0] = val; 215 216 dac33_write_reg_cache(codec, reg, val); ··· 219 218 value[0] = dac33_read_reg_cache(codec, reg); 220 219 } 221 220 222 - return 0; 221 + return ret; 223 222 } 224 223 225 224 static int dac33_write(struct snd_soc_codec *codec, unsigned int reg, ··· 330 329 dac33_read_reg_cache(codec, DAC33_LINER_TO_RLO_VOL)); 331 330 } 332 331 333 - static inline void dac33_read_id(struct snd_soc_codec *codec) 332 + static inline int dac33_read_id(struct snd_soc_codec *codec) 334 333 { 334 + int i, ret = 0; 335 335 u8 reg; 336 336 337 - dac33_read(codec, DAC33_DEVICE_ID_MSB, &reg); 338 - dac33_read(codec, DAC33_DEVICE_ID_LSB, &reg); 339 - dac33_read(codec, DAC33_DEVICE_REV_ID, &reg); 337 + for (i = 0; i < 3; i++) { 338 + ret = dac33_read(codec, DAC33_DEVICE_ID_MSB + i, &reg); 339 + if (ret < 0) 340 + break; 341 + } 342 + 343 + return ret; 340 344 } 341 345 342 346 static inline void dac33_soft_power(struct snd_soc_codec *codec, int power) ··· 1082 1076 /* Number of samples under i2c latency */ 1083 1077 dac33->alarm_threshold = US_TO_SAMPLES(rate, 1084 1078 dac33->mode1_latency); 1079 + nsample_limit = DAC33_BUFFER_SIZE_SAMPLES - 1080 + dac33->alarm_threshold; 1081 + 1085 1082 if (dac33->auto_fifo_config) { 1086 1083 if (period_size <= dac33->alarm_threshold) 1087 1084 /* ··· 1095 1086 ((dac33->alarm_threshold / period_size) + 1096 1087 (dac33->alarm_threshold % period_size ? 1097 1088 1 : 0)); 1089 + else if (period_size > nsample_limit) 1090 + dac33->nsample = nsample_limit; 1098 1091 else 1099 1092 dac33->nsample = period_size; 1100 1093 } else { ··· 1108 1097 */ 1109 1098 dac33->nsample_max = substream->runtime->buffer_size - 1110 1099 period_size; 1111 - nsample_limit = DAC33_BUFFER_SIZE_SAMPLES - 1112 - dac33->alarm_threshold; 1100 + 1113 1101 if (dac33->nsample_max > nsample_limit) 1114 1102 dac33->nsample_max = nsample_limit; 1115 1103 ··· 1424 1414 dev_err(codec->dev, "Failed to power up codec: %d\n", ret); 1425 1415 goto err_power; 1426 1416 } 1427 - dac33_read_id(codec); 1417 + ret = dac33_read_id(codec); 1428 1418 dac33_hard_power(codec, 0); 1419 + 1420 + if (ret < 0) { 1421 + dev_err(codec->dev, "Failed to read chip ID: %d\n", ret); 1422 + ret = -ENODEV; 1423 + goto err_power; 1424 + } 1429 1425 1430 1426 /* Check if the IRQ number is valid and request it */ 1431 1427 if (dac33->irq >= 0) {
+3 -3
sound/soc/codecs/tpa6130a2.c
··· 119 119 { 120 120 struct tpa6130a2_data *data; 121 121 u8 val; 122 - int ret; 122 + int ret = 0; 123 123 124 124 BUG_ON(tpa6130a2_client == NULL); 125 125 data = i2c_get_clientdata(tpa6130a2_client); 126 126 127 127 mutex_lock(&data->mutex); 128 - if (power) { 128 + if (power && !data->power_state) { 129 129 /* Power on */ 130 130 if (data->power_gpio >= 0) 131 131 gpio_set_value(data->power_gpio, 1); ··· 153 153 val = tpa6130a2_read(TPA6130A2_REG_CONTROL); 154 154 val &= ~TPA6130A2_SWS; 155 155 tpa6130a2_i2c_write(TPA6130A2_REG_CONTROL, val); 156 - } else { 156 + } else if (!power && data->power_state) { 157 157 /* set SWS */ 158 158 val = tpa6130a2_read(TPA6130A2_REG_CONTROL); 159 159 val |= TPA6130A2_SWS;
-6
sound/soc/codecs/wm8900.c
··· 186 186 { 187 187 switch (reg) { 188 188 case WM8900_REG_ID: 189 - case WM8900_REG_POWER1: 190 189 return 1; 191 190 default: 192 191 return 0; ··· 1198 1199 dev_err(codec->dev, "Device is not a WM8900 - ID %x\n", reg); 1199 1200 return -ENODEV; 1200 1201 } 1201 - 1202 - /* Read back from the chip */ 1203 - reg = snd_soc_read(codec, WM8900_REG_POWER1); 1204 - reg = (reg >> 12) & 0xf; 1205 - dev_info(codec->dev, "WM8900 revision %d\n", reg); 1206 1202 1207 1203 wm8900_reset(codec); 1208 1204
+1 -1
sound/soc/codecs/wm_hubs.c
··· 123 123 reg_r = reg & WM8993_DCS_DAC_WR_VAL_0_MASK; 124 124 break; 125 125 default: 126 - WARN(1, "Unknown DCS readback method"); 126 + WARN(1, "Unknown DCS readback method\n"); 127 127 break; 128 128 } 129 129
+1 -1
sound/soc/pxa/tosa.c
··· 79 79 static int tosa_startup(struct snd_pcm_substream *substream) 80 80 { 81 81 struct snd_soc_pcm_runtime *rtd = substream->private_data; 82 - struct snd_soc_codec *codec = rtd->card->codec; 82 + struct snd_soc_codec *codec = rtd->codec; 83 83 84 84 /* check the jack status at stream startup */ 85 85 tosa_ext_control(codec);
+4 -1
sound/soc/soc-core.c
··· 165 165 { 166 166 struct snd_soc_pcm_runtime *rtd = 167 167 container_of(dev, struct snd_soc_pcm_runtime, dev); 168 + int ret; 168 169 169 - strict_strtol(buf, 10, &rtd->pmdown_time); 170 + ret = strict_strtol(buf, 10, &rtd->pmdown_time); 171 + if (ret) 172 + return ret; 170 173 171 174 return count; 172 175 }
+1 -1
sound/spi/at73c213.c
··· 155 155 if (max_tries < 1) 156 156 max_tries = 1; 157 157 158 - /* ssc_div must be a power of 2. */ 158 + /* ssc_div must be even. */ 159 159 ssc_div = (ssc_div + 1) & ~1UL; 160 160 161 161 if ((ssc_rate / (ssc_div * 2 * 16)) < BITRATE_MIN) {