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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'sound-fix2-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull second set of sound fixes from Takashi Iwai:
"A collection of small fixes in HD-audio quirks and runtime PM, ASoC
rcar, abs8500 and other codecs. Most of commits are for stable
kernels, too"

* tag 'sound-fix2-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda - Set current_headset_type to ALC_HEADSET_TYPE_ENUM (janitorial)
ALSA: hda - Provide missing pin configs for VAIO with ALC260
ALSA: hda - Add headset quirk for Dell Inspiron 3135
ALSA: hda - Fix the headphone jack detection on Sony VAIO TX
ALSA: hda - Fix missing bass speaker on ASUS N550
ALSA: hda - Fix unbalanced runtime PM notification at resume
ASoC: arizona: Set FLL to free-run before disabling
ALSA: hda - A casual Dell Headset quirk
ASoC: rcar: fixup dma_async_issue_pending() timing
ASoC: rcar: off by one in rsnd_scu_set_route()
ASoC: wm5110: Add post SYSCLK register patch for rev D chip
ASoC: ab8500: Revert to using custom I/O functions
ALSA: hda - Also enable mute/micmute LED control for "Lenovo dock" fixup
ALSA: firewire-lib: include sound/asound.h to refer to snd_pcm_format_t
ALSA: hda - Select FW_LOADER from CONFIG_SND_HDA_CODEC_CA0132_DSP
ALSA: hda - Enable mute/mic-mute LEDs for more Thinkpads with Realtek codec
ASoC: rcar: fixup mod access before checking

+161 -47
+1
sound/firewire/amdtp.h
··· 4 4 #include <linux/err.h> 5 5 #include <linux/interrupt.h> 6 6 #include <linux/mutex.h> 7 + #include <sound/asound.h> 7 8 #include "packets-buffer.h" 8 9 9 10 /**
+2 -1
sound/pci/hda/Kconfig
··· 209 209 210 210 config SND_HDA_CODEC_CA0132_DSP 211 211 bool "Support new DSP code for CA0132 codec" 212 - depends on SND_HDA_CODEC_CA0132 && FW_LOADER 212 + depends on SND_HDA_CODEC_CA0132 213 213 select SND_HDA_DSP_LOADER 214 + select FW_LOADER 214 215 help 215 216 Say Y here to enable the DSP for Creative CA0132 for extended 216 217 features like equalizer or echo cancellation.
+4
sound/pci/hda/hda_codec.c
··· 4000 4000 * in the resume / power-save sequence 4001 4001 */ 4002 4002 hda_keep_power_on(codec); 4003 + if (codec->pm_down_notified) { 4004 + codec->pm_down_notified = 0; 4005 + hda_call_pm_notify(codec->bus, true); 4006 + } 4003 4007 hda_set_power_state(codec, AC_PWRST_D0); 4004 4008 restore_shutup_pins(codec); 4005 4009 hda_exec_init_verbs(codec);
+68 -4
sound/pci/hda/patch_realtek.c
··· 1512 1512 ALC260_FIXUP_KN1, 1513 1513 ALC260_FIXUP_FSC_S7020, 1514 1514 ALC260_FIXUP_FSC_S7020_JWSE, 1515 + ALC260_FIXUP_VAIO_PINS, 1515 1516 }; 1516 1517 1517 1518 static void alc260_gpio1_automute(struct hda_codec *codec) ··· 1653 1652 .chained = true, 1654 1653 .chain_id = ALC260_FIXUP_FSC_S7020, 1655 1654 }, 1655 + [ALC260_FIXUP_VAIO_PINS] = { 1656 + .type = HDA_FIXUP_PINS, 1657 + .v.pins = (const struct hda_pintbl[]) { 1658 + /* Pin configs are missing completely on some VAIOs */ 1659 + { 0x0f, 0x01211020 }, 1660 + { 0x10, 0x0001003f }, 1661 + { 0x11, 0x411111f0 }, 1662 + { 0x12, 0x01a15930 }, 1663 + { 0x13, 0x411111f0 }, 1664 + { 0x14, 0x411111f0 }, 1665 + { 0x15, 0x411111f0 }, 1666 + { 0x16, 0x411111f0 }, 1667 + { 0x17, 0x411111f0 }, 1668 + { 0x18, 0x411111f0 }, 1669 + { 0x19, 0x411111f0 }, 1670 + { } 1671 + } 1672 + }, 1656 1673 }; 1657 1674 1658 1675 static const struct snd_pci_quirk alc260_fixup_tbl[] = { ··· 1679 1660 SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_FIXUP_GPIO1), 1680 1661 SND_PCI_QUIRK(0x103c, 0x280a, "HP dc5750", ALC260_FIXUP_HP_DC5750), 1681 1662 SND_PCI_QUIRK(0x103c, 0x30ba, "HP Presario B1900", ALC260_FIXUP_HP_B1900), 1663 + SND_PCI_QUIRK(0x104d, 0x81bb, "Sony VAIO", ALC260_FIXUP_VAIO_PINS), 1664 + SND_PCI_QUIRK(0x104d, 0x81e2, "Sony VAIO TX", ALC260_FIXUP_HP_PIN_0F), 1682 1665 SND_PCI_QUIRK(0x10cf, 0x1326, "FSC LifeBook S7020", ALC260_FIXUP_FSC_S7020), 1683 1666 SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FIXUP_GPIO1), 1684 1667 SND_PCI_QUIRK(0x152d, 0x0729, "Quanta KN1", ALC260_FIXUP_KN1), ··· 3414 3393 static void alc_update_headset_jack_cb(struct hda_codec *codec, struct hda_jack_tbl *jack) 3415 3394 { 3416 3395 struct alc_spec *spec = codec->spec; 3417 - spec->current_headset_type = ALC_HEADSET_MODE_UNKNOWN; 3396 + spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN; 3418 3397 snd_hda_gen_hp_automute(codec, jack); 3419 3398 } 3420 3399 ··· 3673 3652 #if IS_ENABLED(CONFIG_THINKPAD_ACPI) 3674 3653 3675 3654 #include <linux/thinkpad_acpi.h> 3655 + #include <acpi/acpi.h> 3676 3656 3677 3657 static int (*led_set_func)(int, bool); 3658 + 3659 + static acpi_status acpi_check_cb(acpi_handle handle, u32 lvl, void *context, 3660 + void **rv) 3661 + { 3662 + bool *found = context; 3663 + *found = true; 3664 + return AE_OK; 3665 + } 3666 + 3667 + static bool is_thinkpad(struct hda_codec *codec) 3668 + { 3669 + bool found = false; 3670 + if (codec->subsystem_id >> 16 != 0x17aa) 3671 + return false; 3672 + if (ACPI_SUCCESS(acpi_get_devices("LEN0068", acpi_check_cb, &found, NULL)) && found) 3673 + return true; 3674 + found = false; 3675 + return ACPI_SUCCESS(acpi_get_devices("IBM0068", acpi_check_cb, &found, NULL)) && found; 3676 + } 3678 3677 3679 3678 static void update_tpacpi_mute_led(void *private_data, int enabled) 3680 3679 { ··· 3721 3680 bool removefunc = false; 3722 3681 3723 3682 if (action == HDA_FIXUP_ACT_PROBE) { 3683 + if (!is_thinkpad(codec)) 3684 + return; 3724 3685 if (!led_set_func) 3725 3686 led_set_func = symbol_request(tpacpi_led_set); 3726 3687 if (!led_set_func) { ··· 3966 3923 [ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT] = { 3967 3924 .type = HDA_FIXUP_FUNC, 3968 3925 .v.func = alc269_fixup_pincfg_no_hp_to_lineout, 3926 + .chained = true, 3927 + .chain_id = ALC269_FIXUP_THINKPAD_ACPI, 3969 3928 }, 3970 3929 [ALC269_FIXUP_DELL1_MIC_NO_PRESENCE] = { 3971 3930 .type = HDA_FIXUP_PINS, ··· 4072 4027 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST] = { 4073 4028 .type = HDA_FIXUP_FUNC, 4074 4029 .v.func = alc269_fixup_limit_int_mic_boost, 4030 + .chained = true, 4031 + .chain_id = ALC269_FIXUP_THINKPAD_ACPI, 4075 4032 }, 4076 4033 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = { 4077 4034 .type = HDA_FIXUP_FUNC, ··· 4117 4070 [ALC269_FIXUP_THINKPAD_ACPI] = { 4118 4071 .type = HDA_FIXUP_FUNC, 4119 4072 .v.func = alc_fixup_thinkpad_acpi, 4120 - .chained = true, 4121 - .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST 4122 4073 }, 4123 4074 [ALC255_FIXUP_DELL1_MIC_NO_PRESENCE] = { 4124 4075 .type = HDA_FIXUP_PINS, ··· 4173 4128 SND_PCI_QUIRK(0x1028, 0x0608, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 4174 4129 SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 4175 4130 SND_PCI_QUIRK(0x1028, 0x0613, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 4131 + SND_PCI_QUIRK(0x1028, 0x0614, "Dell Inspiron 3135", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 4176 4132 SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_MONO_SPEAKERS), 4177 4133 SND_PCI_QUIRK(0x1028, 0x061f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), 4178 4134 SND_PCI_QUIRK(0x1028, 0x063f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), ··· 4219 4173 SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK), 4220 4174 SND_PCI_QUIRK(0x17aa, 0x220c, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 4221 4175 SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 4222 - SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad", ALC269_FIXUP_THINKPAD_ACPI), 4176 + SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 4223 4177 SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 4224 4178 SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 4225 4179 SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC283_FIXUP_INT_MIC), ··· 4227 4181 SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 4228 4182 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), 4229 4183 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), 4184 + SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", ALC269_FIXUP_THINKPAD_ACPI), 4230 4185 SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */ 4231 4186 4232 4187 #if 0 ··· 4745 4698 ALC668_FIXUP_DELL_MIC_NO_PRESENCE, 4746 4699 ALC668_FIXUP_HEADSET_MODE, 4747 4700 ALC662_FIXUP_BASS_CHMAP, 4701 + ALC662_FIXUP_BASS_1A, 4702 + ALC662_FIXUP_BASS_1A_CHMAP, 4748 4703 }; 4749 4704 4750 4705 static const struct hda_fixup alc662_fixups[] = { ··· 4927 4878 .chained = true, 4928 4879 .chain_id = ALC662_FIXUP_ASUS_MODE4 4929 4880 }, 4881 + [ALC662_FIXUP_BASS_1A] = { 4882 + .type = HDA_FIXUP_PINS, 4883 + .v.pins = (const struct hda_pintbl[]) { 4884 + {0x1a, 0x80106111}, /* bass speaker */ 4885 + {} 4886 + }, 4887 + }, 4888 + [ALC662_FIXUP_BASS_1A_CHMAP] = { 4889 + .type = HDA_FIXUP_FUNC, 4890 + .v.func = alc662_fixup_bass_chmap, 4891 + .chained = true, 4892 + .chain_id = ALC662_FIXUP_BASS_1A, 4893 + }, 4930 4894 }; 4931 4895 4932 4896 static const struct snd_pci_quirk alc662_fixup_tbl[] = { ··· 4952 4890 SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), 4953 4891 SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 4954 4892 SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 4893 + SND_PCI_QUIRK(0x1028, 0x0625, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 4955 4894 SND_PCI_QUIRK(0x1028, 0x0626, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 4956 4895 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), 4896 + SND_PCI_QUIRK(0x1043, 0x11cd, "Asus N550", ALC662_FIXUP_BASS_1A_CHMAP), 4957 4897 SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_CHMAP), 4958 4898 SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_BASS_CHMAP), 4959 4899 SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT),
+34 -32
sound/soc/codecs/ab8500-codec.c
··· 126 126 127 127 /* Private data for AB8500 device-driver */ 128 128 struct ab8500_codec_drvdata { 129 - struct regmap *regmap; 130 - 131 129 /* Sidetone */ 132 130 long *sid_fir_values; 133 131 enum sid_state sid_status; ··· 166 168 */ 167 169 168 170 /* Read a register from the audio-bank of AB8500 */ 169 - static int ab8500_codec_read_reg(void *context, unsigned int reg, 170 - unsigned int *value) 171 + static unsigned int ab8500_codec_read_reg(struct snd_soc_codec *codec, 172 + unsigned int reg) 171 173 { 172 - struct device *dev = context; 173 174 int status; 175 + unsigned int value = 0; 174 176 175 177 u8 value8; 176 - status = abx500_get_register_interruptible(dev, AB8500_AUDIO, 177 - reg, &value8); 178 - *value = (unsigned int)value8; 178 + status = abx500_get_register_interruptible(codec->dev, AB8500_AUDIO, 179 + reg, &value8); 180 + if (status < 0) { 181 + dev_err(codec->dev, 182 + "%s: ERROR: Register (0x%02x:0x%02x) read failed (%d).\n", 183 + __func__, (u8)AB8500_AUDIO, (u8)reg, status); 184 + } else { 185 + dev_dbg(codec->dev, 186 + "%s: Read 0x%02x from register 0x%02x:0x%02x\n", 187 + __func__, value8, (u8)AB8500_AUDIO, (u8)reg); 188 + value = (unsigned int)value8; 189 + } 179 190 180 - return status; 191 + return value; 181 192 } 182 193 183 194 /* Write to a register in the audio-bank of AB8500 */ 184 - static int ab8500_codec_write_reg(void *context, unsigned int reg, 185 - unsigned int value) 195 + static int ab8500_codec_write_reg(struct snd_soc_codec *codec, 196 + unsigned int reg, unsigned int value) 186 197 { 187 - struct device *dev = context; 198 + int status; 188 199 189 - return abx500_set_register_interruptible(dev, AB8500_AUDIO, 190 - reg, value); 200 + status = abx500_set_register_interruptible(codec->dev, AB8500_AUDIO, 201 + reg, value); 202 + if (status < 0) 203 + dev_err(codec->dev, 204 + "%s: ERROR: Register (%02x:%02x) write failed (%d).\n", 205 + __func__, (u8)AB8500_AUDIO, (u8)reg, status); 206 + else 207 + dev_dbg(codec->dev, 208 + "%s: Wrote 0x%02x into register %02x:%02x\n", 209 + __func__, (u8)value, (u8)AB8500_AUDIO, (u8)reg); 210 + 211 + return status; 191 212 } 192 - 193 - static const struct regmap_config ab8500_codec_regmap = { 194 - .reg_read = ab8500_codec_read_reg, 195 - .reg_write = ab8500_codec_write_reg, 196 - }; 197 213 198 214 /* 199 215 * Controls - DAPM ··· 2485 2473 2486 2474 dev_dbg(dev, "%s: Enter.\n", __func__); 2487 2475 2488 - snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP); 2489 - 2490 2476 /* Setup AB8500 according to board-settings */ 2491 2477 pdata = dev_get_platdata(dev->parent); 2492 - 2493 - codec->control_data = drvdata->regmap; 2494 2478 2495 2479 if (np) { 2496 2480 if (!pdata) ··· 2565 2557 2566 2558 static struct snd_soc_codec_driver ab8500_codec_driver = { 2567 2559 .probe = ab8500_codec_probe, 2560 + .read = ab8500_codec_read_reg, 2561 + .write = ab8500_codec_write_reg, 2562 + .reg_word_size = sizeof(u8), 2568 2563 .controls = ab8500_ctrls, 2569 2564 .num_controls = ARRAY_SIZE(ab8500_ctrls), 2570 2565 .dapm_widgets = ab8500_dapm_widgets, ··· 2591 2580 drvdata->sid_status = SID_UNCONFIGURED; 2592 2581 drvdata->anc_status = ANC_UNCONFIGURED; 2593 2582 dev_set_drvdata(&pdev->dev, drvdata); 2594 - 2595 - drvdata->regmap = devm_regmap_init(&pdev->dev, NULL, &pdev->dev, 2596 - &ab8500_codec_regmap); 2597 - if (IS_ERR(drvdata->regmap)) { 2598 - status = PTR_ERR(drvdata->regmap); 2599 - dev_err(&pdev->dev, "%s: Failed to allocate regmap: %d\n", 2600 - __func__, status); 2601 - return status; 2602 - } 2603 2583 2604 2584 dev_dbg(&pdev->dev, "%s: Register codec.\n", __func__); 2605 2585 status = snd_soc_register_codec(&pdev->dev, &ab8500_codec_driver,
+4
sound/soc/codecs/arizona.c
··· 1529 1529 try_wait_for_completion(&fll->ok); 1530 1530 1531 1531 regmap_update_bits(arizona->regmap, fll->base + 1, 1532 + ARIZONA_FLL1_FREERUN, 0); 1533 + regmap_update_bits(arizona->regmap, fll->base + 1, 1532 1534 ARIZONA_FLL1_ENA, ARIZONA_FLL1_ENA); 1533 1535 if (use_sync) 1534 1536 regmap_update_bits(arizona->regmap, fll->base + 0x11, ··· 1548 1546 struct arizona *arizona = fll->arizona; 1549 1547 bool change; 1550 1548 1549 + regmap_update_bits(arizona->regmap, fll->base + 1, 1550 + ARIZONA_FLL1_FREERUN, ARIZONA_FLL1_FREERUN); 1551 1551 regmap_update_bits_check(arizona->regmap, fll->base + 1, 1552 1552 ARIZONA_FLL1_ENA, 0, &change); 1553 1553 regmap_update_bits(arizona->regmap, fll->base + 0x11,
+42 -1
sound/soc/codecs/wm5110.c
··· 37 37 struct arizona_fll fll[2]; 38 38 }; 39 39 40 + static const struct reg_default wm5110_sysclk_revd_patch[] = { 41 + { 0x3093, 0x1001 }, 42 + { 0x30E3, 0x1301 }, 43 + { 0x3133, 0x1201 }, 44 + { 0x3183, 0x1501 }, 45 + { 0x31D3, 0x1401 }, 46 + }; 47 + 48 + static int wm5110_sysclk_ev(struct snd_soc_dapm_widget *w, 49 + struct snd_kcontrol *kcontrol, int event) 50 + { 51 + struct snd_soc_codec *codec = w->codec; 52 + struct arizona *arizona = dev_get_drvdata(codec->dev->parent); 53 + struct regmap *regmap = codec->control_data; 54 + const struct reg_default *patch = NULL; 55 + int i, patch_size; 56 + 57 + switch (arizona->rev) { 58 + case 3: 59 + patch = wm5110_sysclk_revd_patch; 60 + patch_size = ARRAY_SIZE(wm5110_sysclk_revd_patch); 61 + break; 62 + default: 63 + return 0; 64 + } 65 + 66 + switch (event) { 67 + case SND_SOC_DAPM_POST_PMU: 68 + if (patch) 69 + for (i = 0; i < patch_size; i++) 70 + regmap_write(regmap, patch[i].reg, 71 + patch[i].def); 72 + break; 73 + 74 + default: 75 + break; 76 + } 77 + 78 + return 0; 79 + } 80 + 40 81 static DECLARE_TLV_DB_SCALE(ana_tlv, 0, 100, 0); 41 82 static DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0); 42 83 static DECLARE_TLV_DB_SCALE(digital_tlv, -6400, 50, 0); ··· 441 400 442 401 static const struct snd_soc_dapm_widget wm5110_dapm_widgets[] = { 443 402 SND_SOC_DAPM_SUPPLY("SYSCLK", ARIZONA_SYSTEM_CLOCK_1, ARIZONA_SYSCLK_ENA_SHIFT, 444 - 0, NULL, 0), 403 + 0, wm5110_sysclk_ev, SND_SOC_DAPM_POST_PMU), 445 404 SND_SOC_DAPM_SUPPLY("ASYNCCLK", ARIZONA_ASYNC_CLOCK_1, 446 405 ARIZONA_ASYNC_CLK_ENA_SHIFT, 0, NULL, 0), 447 406 SND_SOC_DAPM_SUPPLY("OPCLK", ARIZONA_OUTPUT_SYSTEM_CLOCK,
+5 -8
sound/soc/sh/rcar/core.c
··· 200 200 return; 201 201 } 202 202 203 + dma_async_issue_pending(dma->chan); 203 204 } 204 - 205 - dma_async_issue_pending(dma->chan); 206 205 } 207 206 208 207 int rsnd_dma_available(struct rsnd_dma *dma) ··· 287 288 struct rsnd_mod *mod, 288 289 struct rsnd_dai_stream *io) 289 290 { 290 - struct rsnd_priv *priv = rsnd_mod_to_priv(mod); 291 - struct device *dev = rsnd_priv_to_dev(priv); 292 - 293 - if (!mod) { 294 - dev_err(dev, "NULL mod\n"); 291 + if (!mod) 295 292 return -EIO; 296 - } 297 293 298 294 if (!list_empty(&mod->list)) { 295 + struct rsnd_priv *priv = rsnd_mod_to_priv(mod); 296 + struct device *dev = rsnd_priv_to_dev(priv); 297 + 299 298 dev_err(dev, "%s%d is not empty\n", 300 299 rsnd_mod_name(mod), 301 300 rsnd_mod_id(mod));
+1 -1
sound/soc/sh/rcar/scu.c
··· 68 68 return 0; 69 69 70 70 id = rsnd_mod_id(mod); 71 - if (id < 0 || id > ARRAY_SIZE(routes)) 71 + if (id < 0 || id >= ARRAY_SIZE(routes)) 72 72 return -EIO; 73 73 74 74 /*