diff options
| -rw-r--r-- | drivers/pinctrl/pinconf.c | 4 | ||||
| -rw-r--r-- | drivers/pinctrl/pinctrl-exynos.c | 12 | ||||
| -rw-r--r-- | drivers/pinctrl/pinctrl-palmas.c | 5 | ||||
| -rw-r--r-- | drivers/pinctrl/pinctrl-tegra114.c | 5 | ||||
| -rw-r--r-- | fs/aio.c | 52 | ||||
| -rw-r--r-- | sound/pci/ac97/ac97_codec.c | 1 | ||||
| -rw-r--r-- | sound/pci/hda/patch_conexant.c | 11 | ||||
| -rw-r--r-- | sound/soc/blackfin/bf6xx-i2s.c | 1 | ||||
| -rw-r--r-- | sound/soc/codecs/88pm860x-codec.c | 3 | ||||
| -rw-r--r-- | sound/soc/codecs/ab8500-codec.c | 7 | ||||
| -rw-r--r-- | sound/soc/codecs/max98095.c | 4 | ||||
| -rw-r--r-- | sound/soc/fsl/imx-sgtl5000.c | 7 | ||||
| -rw-r--r-- | sound/soc/soc-core.c | 1 |
13 files changed, 79 insertions, 34 deletions
diff --git a/drivers/pinctrl/pinconf.c b/drivers/pinctrl/pinconf.c index a138965c01cb..b8fcc38c0d11 100644 --- a/drivers/pinctrl/pinconf.c +++ b/drivers/pinctrl/pinconf.c | |||
| @@ -490,7 +490,7 @@ exit: | |||
| 490 | * <devicename> <state> <pinname> are values that should match the pinctrl-maps | 490 | * <devicename> <state> <pinname> are values that should match the pinctrl-maps |
| 491 | * <newvalue> reflects the new config and is driver dependant | 491 | * <newvalue> reflects the new config and is driver dependant |
| 492 | */ | 492 | */ |
| 493 | static int pinconf_dbg_config_write(struct file *file, | 493 | static ssize_t pinconf_dbg_config_write(struct file *file, |
| 494 | const char __user *user_buf, size_t count, loff_t *ppos) | 494 | const char __user *user_buf, size_t count, loff_t *ppos) |
| 495 | { | 495 | { |
| 496 | struct pinctrl_maps *maps_node; | 496 | struct pinctrl_maps *maps_node; |
| @@ -508,7 +508,7 @@ static int pinconf_dbg_config_write(struct file *file, | |||
| 508 | int i; | 508 | int i; |
| 509 | 509 | ||
| 510 | /* Get userspace string and assure termination */ | 510 | /* Get userspace string and assure termination */ |
| 511 | buf_size = min(count, (size_t)(sizeof(buf)-1)); | 511 | buf_size = min(count, sizeof(buf) - 1); |
| 512 | if (copy_from_user(buf, user_buf, buf_size)) | 512 | if (copy_from_user(buf, user_buf, buf_size)) |
| 513 | return -EFAULT; | 513 | return -EFAULT; |
| 514 | buf[buf_size] = 0; | 514 | buf[buf_size] = 0; |
diff --git a/drivers/pinctrl/pinctrl-exynos.c b/drivers/pinctrl/pinctrl-exynos.c index 2689f8d01a1e..155b1b3a0e7a 100644 --- a/drivers/pinctrl/pinctrl-exynos.c +++ b/drivers/pinctrl/pinctrl-exynos.c | |||
| @@ -663,18 +663,18 @@ static void exynos_pinctrl_resume(struct samsung_pinctrl_drv_data *drvdata) | |||
| 663 | /* pin banks of s5pv210 pin-controller */ | 663 | /* pin banks of s5pv210 pin-controller */ |
| 664 | static struct samsung_pin_bank s5pv210_pin_bank[] = { | 664 | static struct samsung_pin_bank s5pv210_pin_bank[] = { |
| 665 | EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00), | 665 | EXYNOS_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00), |
| 666 | EXYNOS_PIN_BANK_EINTG(6, 0x020, "gpa1", 0x04), | 666 | EXYNOS_PIN_BANK_EINTG(4, 0x020, "gpa1", 0x04), |
| 667 | EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpb", 0x08), | 667 | EXYNOS_PIN_BANK_EINTG(8, 0x040, "gpb", 0x08), |
| 668 | EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpc0", 0x0c), | 668 | EXYNOS_PIN_BANK_EINTG(5, 0x060, "gpc0", 0x0c), |
| 669 | EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpc1", 0x10), | 669 | EXYNOS_PIN_BANK_EINTG(5, 0x080, "gpc1", 0x10), |
| 670 | EXYNOS_PIN_BANK_EINTG(4, 0x0a0, "gpd0", 0x14), | 670 | EXYNOS_PIN_BANK_EINTG(4, 0x0a0, "gpd0", 0x14), |
| 671 | EXYNOS_PIN_BANK_EINTG(4, 0x0c0, "gpd1", 0x18), | 671 | EXYNOS_PIN_BANK_EINTG(6, 0x0c0, "gpd1", 0x18), |
| 672 | EXYNOS_PIN_BANK_EINTG(5, 0x0e0, "gpe0", 0x1c), | 672 | EXYNOS_PIN_BANK_EINTG(8, 0x0e0, "gpe0", 0x1c), |
| 673 | EXYNOS_PIN_BANK_EINTG(8, 0x100, "gpe1", 0x20), | 673 | EXYNOS_PIN_BANK_EINTG(5, 0x100, "gpe1", 0x20), |
| 674 | EXYNOS_PIN_BANK_EINTG(6, 0x120, "gpf0", 0x24), | 674 | EXYNOS_PIN_BANK_EINTG(8, 0x120, "gpf0", 0x24), |
| 675 | EXYNOS_PIN_BANK_EINTG(8, 0x140, "gpf1", 0x28), | 675 | EXYNOS_PIN_BANK_EINTG(8, 0x140, "gpf1", 0x28), |
| 676 | EXYNOS_PIN_BANK_EINTG(8, 0x160, "gpf2", 0x2c), | 676 | EXYNOS_PIN_BANK_EINTG(8, 0x160, "gpf2", 0x2c), |
| 677 | EXYNOS_PIN_BANK_EINTG(8, 0x180, "gpf3", 0x30), | 677 | EXYNOS_PIN_BANK_EINTG(6, 0x180, "gpf3", 0x30), |
| 678 | EXYNOS_PIN_BANK_EINTG(7, 0x1a0, "gpg0", 0x34), | 678 | EXYNOS_PIN_BANK_EINTG(7, 0x1a0, "gpg0", 0x34), |
| 679 | EXYNOS_PIN_BANK_EINTG(7, 0x1c0, "gpg1", 0x38), | 679 | EXYNOS_PIN_BANK_EINTG(7, 0x1c0, "gpg1", 0x38), |
| 680 | EXYNOS_PIN_BANK_EINTG(7, 0x1e0, "gpg2", 0x3c), | 680 | EXYNOS_PIN_BANK_EINTG(7, 0x1e0, "gpg2", 0x3c), |
diff --git a/drivers/pinctrl/pinctrl-palmas.c b/drivers/pinctrl/pinctrl-palmas.c index 82638fac3cfa..30c4d356cb33 100644 --- a/drivers/pinctrl/pinctrl-palmas.c +++ b/drivers/pinctrl/pinctrl-palmas.c | |||
| @@ -891,9 +891,10 @@ static int palmas_pinconf_set(struct pinctrl_dev *pctldev, | |||
| 891 | param = pinconf_to_config_param(configs[i]); | 891 | param = pinconf_to_config_param(configs[i]); |
| 892 | param_val = pinconf_to_config_argument(configs[i]); | 892 | param_val = pinconf_to_config_argument(configs[i]); |
| 893 | 893 | ||
| 894 | if (param == PIN_CONFIG_BIAS_PULL_PIN_DEFAULT) | ||
| 895 | continue; | ||
| 896 | |||
| 894 | switch (param) { | 897 | switch (param) { |
| 895 | case PIN_CONFIG_BIAS_PULL_PIN_DEFAULT: | ||
| 896 | return 0; | ||
| 897 | case PIN_CONFIG_BIAS_DISABLE: | 898 | case PIN_CONFIG_BIAS_DISABLE: |
| 898 | case PIN_CONFIG_BIAS_PULL_UP: | 899 | case PIN_CONFIG_BIAS_PULL_UP: |
| 899 | case PIN_CONFIG_BIAS_PULL_DOWN: | 900 | case PIN_CONFIG_BIAS_PULL_DOWN: |
diff --git a/drivers/pinctrl/pinctrl-tegra114.c b/drivers/pinctrl/pinctrl-tegra114.c index 622c4854977e..93c9e3899d5e 100644 --- a/drivers/pinctrl/pinctrl-tegra114.c +++ b/drivers/pinctrl/pinctrl-tegra114.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * | 3 | * |
| 4 | * Copyright (c) 2012-2013, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2012-2013, NVIDIA CORPORATION. All rights reserved. |
| 5 | * | 5 | * |
| 6 | * Arthur: Pritesh Raithatha <praithatha@nvidia.com> | 6 | * Author: Pritesh Raithatha <praithatha@nvidia.com> |
| 7 | * | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify it | 8 | * This program is free software; you can redistribute it and/or modify it |
| 9 | * under the terms and conditions of the GNU General Public License, | 9 | * under the terms and conditions of the GNU General Public License, |
| @@ -2763,7 +2763,6 @@ static struct platform_driver tegra114_pinctrl_driver = { | |||
| 2763 | }; | 2763 | }; |
| 2764 | module_platform_driver(tegra114_pinctrl_driver); | 2764 | module_platform_driver(tegra114_pinctrl_driver); |
| 2765 | 2765 | ||
| 2766 | MODULE_ALIAS("platform:tegra114-pinctrl"); | ||
| 2767 | MODULE_AUTHOR("Pritesh Raithatha <praithatha@nvidia.com>"); | 2766 | MODULE_AUTHOR("Pritesh Raithatha <praithatha@nvidia.com>"); |
| 2768 | MODULE_DESCRIPTION("NVIDIA Tegra114 pincontrol driver"); | 2767 | MODULE_DESCRIPTION("NVIDIA Tegra114 pinctrl driver"); |
| 2769 | MODULE_LICENSE("GPL v2"); | 2768 | MODULE_LICENSE("GPL v2"); |
| @@ -167,10 +167,25 @@ static int __init aio_setup(void) | |||
| 167 | } | 167 | } |
| 168 | __initcall(aio_setup); | 168 | __initcall(aio_setup); |
| 169 | 169 | ||
| 170 | static void put_aio_ring_file(struct kioctx *ctx) | ||
| 171 | { | ||
| 172 | struct file *aio_ring_file = ctx->aio_ring_file; | ||
| 173 | if (aio_ring_file) { | ||
| 174 | truncate_setsize(aio_ring_file->f_inode, 0); | ||
| 175 | |||
| 176 | /* Prevent further access to the kioctx from migratepages */ | ||
| 177 | spin_lock(&aio_ring_file->f_inode->i_mapping->private_lock); | ||
| 178 | aio_ring_file->f_inode->i_mapping->private_data = NULL; | ||
| 179 | ctx->aio_ring_file = NULL; | ||
| 180 | spin_unlock(&aio_ring_file->f_inode->i_mapping->private_lock); | ||
| 181 | |||
| 182 | fput(aio_ring_file); | ||
| 183 | } | ||
| 184 | } | ||
| 185 | |||
| 170 | static void aio_free_ring(struct kioctx *ctx) | 186 | static void aio_free_ring(struct kioctx *ctx) |
| 171 | { | 187 | { |
| 172 | int i; | 188 | int i; |
| 173 | struct file *aio_ring_file = ctx->aio_ring_file; | ||
| 174 | 189 | ||
| 175 | for (i = 0; i < ctx->nr_pages; i++) { | 190 | for (i = 0; i < ctx->nr_pages; i++) { |
| 176 | pr_debug("pid(%d) [%d] page->count=%d\n", current->pid, i, | 191 | pr_debug("pid(%d) [%d] page->count=%d\n", current->pid, i, |
| @@ -178,14 +193,10 @@ static void aio_free_ring(struct kioctx *ctx) | |||
| 178 | put_page(ctx->ring_pages[i]); | 193 | put_page(ctx->ring_pages[i]); |
| 179 | } | 194 | } |
| 180 | 195 | ||
| 196 | put_aio_ring_file(ctx); | ||
| 197 | |||
| 181 | if (ctx->ring_pages && ctx->ring_pages != ctx->internal_pages) | 198 | if (ctx->ring_pages && ctx->ring_pages != ctx->internal_pages) |
| 182 | kfree(ctx->ring_pages); | 199 | kfree(ctx->ring_pages); |
| 183 | |||
| 184 | if (aio_ring_file) { | ||
| 185 | truncate_setsize(aio_ring_file->f_inode, 0); | ||
| 186 | fput(aio_ring_file); | ||
| 187 | ctx->aio_ring_file = NULL; | ||
| 188 | } | ||
| 189 | } | 200 | } |
| 190 | 201 | ||
| 191 | static int aio_ring_mmap(struct file *file, struct vm_area_struct *vma) | 202 | static int aio_ring_mmap(struct file *file, struct vm_area_struct *vma) |
| @@ -207,9 +218,8 @@ static int aio_set_page_dirty(struct page *page) | |||
| 207 | static int aio_migratepage(struct address_space *mapping, struct page *new, | 218 | static int aio_migratepage(struct address_space *mapping, struct page *new, |
| 208 | struct page *old, enum migrate_mode mode) | 219 | struct page *old, enum migrate_mode mode) |
| 209 | { | 220 | { |
| 210 | struct kioctx *ctx = mapping->private_data; | 221 | struct kioctx *ctx; |
| 211 | unsigned long flags; | 222 | unsigned long flags; |
| 212 | unsigned idx = old->index; | ||
| 213 | int rc; | 223 | int rc; |
| 214 | 224 | ||
| 215 | /* Writeback must be complete */ | 225 | /* Writeback must be complete */ |
| @@ -224,10 +234,23 @@ static int aio_migratepage(struct address_space *mapping, struct page *new, | |||
| 224 | 234 | ||
| 225 | get_page(new); | 235 | get_page(new); |
| 226 | 236 | ||
| 227 | spin_lock_irqsave(&ctx->completion_lock, flags); | 237 | /* We can potentially race against kioctx teardown here. Use the |
| 228 | migrate_page_copy(new, old); | 238 | * address_space's private data lock to protect the mapping's |
| 229 | ctx->ring_pages[idx] = new; | 239 | * private_data. |
| 230 | spin_unlock_irqrestore(&ctx->completion_lock, flags); | 240 | */ |
| 241 | spin_lock(&mapping->private_lock); | ||
| 242 | ctx = mapping->private_data; | ||
| 243 | if (ctx) { | ||
| 244 | pgoff_t idx; | ||
| 245 | spin_lock_irqsave(&ctx->completion_lock, flags); | ||
| 246 | migrate_page_copy(new, old); | ||
| 247 | idx = old->index; | ||
| 248 | if (idx < (pgoff_t)ctx->nr_pages) | ||
| 249 | ctx->ring_pages[idx] = new; | ||
| 250 | spin_unlock_irqrestore(&ctx->completion_lock, flags); | ||
| 251 | } else | ||
| 252 | rc = -EBUSY; | ||
| 253 | spin_unlock(&mapping->private_lock); | ||
| 231 | 254 | ||
| 232 | return rc; | 255 | return rc; |
| 233 | } | 256 | } |
| @@ -617,8 +640,7 @@ out_freepcpu: | |||
| 617 | out_freeref: | 640 | out_freeref: |
| 618 | free_percpu(ctx->users.pcpu_count); | 641 | free_percpu(ctx->users.pcpu_count); |
| 619 | out_freectx: | 642 | out_freectx: |
| 620 | if (ctx->aio_ring_file) | 643 | put_aio_ring_file(ctx); |
| 621 | fput(ctx->aio_ring_file); | ||
| 622 | kmem_cache_free(kioctx_cachep, ctx); | 644 | kmem_cache_free(kioctx_cachep, ctx); |
| 623 | pr_debug("error allocating ioctx %d\n", err); | 645 | pr_debug("error allocating ioctx %d\n", err); |
| 624 | return ERR_PTR(err); | 646 | return ERR_PTR(err); |
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 445ca481d8d3..bf578ba2677e 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c | |||
| @@ -175,6 +175,7 @@ static const struct ac97_codec_id snd_ac97_codec_ids[] = { | |||
| 175 | { 0x54524106, 0xffffffff, "TR28026", NULL, NULL }, | 175 | { 0x54524106, 0xffffffff, "TR28026", NULL, NULL }, |
| 176 | { 0x54524108, 0xffffffff, "TR28028", patch_tritech_tr28028, NULL }, // added by xin jin [07/09/99] | 176 | { 0x54524108, 0xffffffff, "TR28028", patch_tritech_tr28028, NULL }, // added by xin jin [07/09/99] |
| 177 | { 0x54524123, 0xffffffff, "TR28602", NULL, NULL }, // only guess --jk [TR28023 = eMicro EM28023 (new CT1297)] | 177 | { 0x54524123, 0xffffffff, "TR28602", NULL, NULL }, // only guess --jk [TR28023 = eMicro EM28023 (new CT1297)] |
| 178 | { 0x54584e03, 0xffffffff, "TLV320AIC27", NULL, NULL }, | ||
| 178 | { 0x54584e20, 0xffffffff, "TLC320AD9xC", NULL, NULL }, | 179 | { 0x54584e20, 0xffffffff, "TLC320AD9xC", NULL, NULL }, |
| 179 | { 0x56494161, 0xffffffff, "VIA1612A", NULL, NULL }, // modified ICE1232 with S/PDIF | 180 | { 0x56494161, 0xffffffff, "VIA1612A", NULL, NULL }, // modified ICE1232 with S/PDIF |
| 180 | { 0x56494170, 0xffffffff, "VIA1617A", patch_vt1617a, NULL }, // modified VT1616 with S/PDIF | 181 | { 0x56494170, 0xffffffff, "VIA1617A", patch_vt1617a, NULL }, // modified VT1616 with S/PDIF |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 4edd2d0f9a3c..ec68eaea0336 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
| @@ -3231,6 +3231,7 @@ enum { | |||
| 3231 | CXT_FIXUP_INC_MIC_BOOST, | 3231 | CXT_FIXUP_INC_MIC_BOOST, |
| 3232 | CXT_FIXUP_HEADPHONE_MIC_PIN, | 3232 | CXT_FIXUP_HEADPHONE_MIC_PIN, |
| 3233 | CXT_FIXUP_HEADPHONE_MIC, | 3233 | CXT_FIXUP_HEADPHONE_MIC, |
| 3234 | CXT_FIXUP_GPIO1, | ||
| 3234 | }; | 3235 | }; |
| 3235 | 3236 | ||
| 3236 | static void cxt_fixup_stereo_dmic(struct hda_codec *codec, | 3237 | static void cxt_fixup_stereo_dmic(struct hda_codec *codec, |
| @@ -3375,6 +3376,15 @@ static const struct hda_fixup cxt_fixups[] = { | |||
| 3375 | .type = HDA_FIXUP_FUNC, | 3376 | .type = HDA_FIXUP_FUNC, |
| 3376 | .v.func = cxt_fixup_headphone_mic, | 3377 | .v.func = cxt_fixup_headphone_mic, |
| 3377 | }, | 3378 | }, |
| 3379 | [CXT_FIXUP_GPIO1] = { | ||
| 3380 | .type = HDA_FIXUP_VERBS, | ||
| 3381 | .v.verbs = (const struct hda_verb[]) { | ||
| 3382 | { 0x01, AC_VERB_SET_GPIO_MASK, 0x01 }, | ||
| 3383 | { 0x01, AC_VERB_SET_GPIO_DIRECTION, 0x01 }, | ||
| 3384 | { 0x01, AC_VERB_SET_GPIO_DATA, 0x01 }, | ||
| 3385 | { } | ||
| 3386 | }, | ||
| 3387 | }, | ||
| 3378 | }; | 3388 | }; |
| 3379 | 3389 | ||
| 3380 | static const struct snd_pci_quirk cxt5051_fixups[] = { | 3390 | static const struct snd_pci_quirk cxt5051_fixups[] = { |
| @@ -3384,6 +3394,7 @@ static const struct snd_pci_quirk cxt5051_fixups[] = { | |||
| 3384 | 3394 | ||
| 3385 | static const struct snd_pci_quirk cxt5066_fixups[] = { | 3395 | static const struct snd_pci_quirk cxt5066_fixups[] = { |
| 3386 | SND_PCI_QUIRK(0x1025, 0x0543, "Acer Aspire One 522", CXT_FIXUP_STEREO_DMIC), | 3396 | SND_PCI_QUIRK(0x1025, 0x0543, "Acer Aspire One 522", CXT_FIXUP_STEREO_DMIC), |
| 3397 | SND_PCI_QUIRK(0x1025, 0x054c, "Acer Aspire 3830TG", CXT_FIXUP_GPIO1), | ||
| 3387 | SND_PCI_QUIRK(0x1043, 0x138d, "Asus", CXT_FIXUP_HEADPHONE_MIC_PIN), | 3398 | SND_PCI_QUIRK(0x1043, 0x138d, "Asus", CXT_FIXUP_HEADPHONE_MIC_PIN), |
| 3388 | SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410), | 3399 | SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410), |
| 3389 | SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo T410", CXT_PINCFG_LENOVO_TP410), | 3400 | SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo T410", CXT_PINCFG_LENOVO_TP410), |
diff --git a/sound/soc/blackfin/bf6xx-i2s.c b/sound/soc/blackfin/bf6xx-i2s.c index c02405cc007d..5810a0603f2f 100644 --- a/sound/soc/blackfin/bf6xx-i2s.c +++ b/sound/soc/blackfin/bf6xx-i2s.c | |||
| @@ -88,6 +88,7 @@ static int bfin_i2s_hw_params(struct snd_pcm_substream *substream, | |||
| 88 | case SNDRV_PCM_FORMAT_S8: | 88 | case SNDRV_PCM_FORMAT_S8: |
| 89 | param.spctl |= 0x70; | 89 | param.spctl |= 0x70; |
| 90 | sport->wdsize = 1; | 90 | sport->wdsize = 1; |
| 91 | break; | ||
| 91 | case SNDRV_PCM_FORMAT_S16_LE: | 92 | case SNDRV_PCM_FORMAT_S16_LE: |
| 92 | param.spctl |= 0xf0; | 93 | param.spctl |= 0xf0; |
| 93 | sport->wdsize = 2; | 94 | sport->wdsize = 2; |
diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c index 8af04343cc1a..259d1ac4492f 100644 --- a/sound/soc/codecs/88pm860x-codec.c +++ b/sound/soc/codecs/88pm860x-codec.c | |||
| @@ -349,6 +349,9 @@ static int snd_soc_put_volsw_2r_st(struct snd_kcontrol *kcontrol, | |||
| 349 | val = ucontrol->value.integer.value[0]; | 349 | val = ucontrol->value.integer.value[0]; |
| 350 | val2 = ucontrol->value.integer.value[1]; | 350 | val2 = ucontrol->value.integer.value[1]; |
| 351 | 351 | ||
| 352 | if (val >= ARRAY_SIZE(st_table) || val2 >= ARRAY_SIZE(st_table)) | ||
| 353 | return -EINVAL; | ||
| 354 | |||
| 352 | err = snd_soc_update_bits(codec, reg, 0x3f, st_table[val].m); | 355 | err = snd_soc_update_bits(codec, reg, 0x3f, st_table[val].m); |
| 353 | if (err < 0) | 356 | if (err < 0) |
| 354 | return err; | 357 | return err; |
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c index b8ba0adacfce..80555d7551e6 100644 --- a/sound/soc/codecs/ab8500-codec.c +++ b/sound/soc/codecs/ab8500-codec.c | |||
| @@ -1225,13 +1225,18 @@ static int anc_status_control_put(struct snd_kcontrol *kcontrol, | |||
| 1225 | struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(codec->dev); | 1225 | struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(codec->dev); |
| 1226 | struct device *dev = codec->dev; | 1226 | struct device *dev = codec->dev; |
| 1227 | bool apply_fir, apply_iir; | 1227 | bool apply_fir, apply_iir; |
| 1228 | int req, status; | 1228 | unsigned int req; |
| 1229 | int status; | ||
| 1229 | 1230 | ||
| 1230 | dev_dbg(dev, "%s: Enter.\n", __func__); | 1231 | dev_dbg(dev, "%s: Enter.\n", __func__); |
| 1231 | 1232 | ||
| 1232 | mutex_lock(&drvdata->anc_lock); | 1233 | mutex_lock(&drvdata->anc_lock); |
| 1233 | 1234 | ||
| 1234 | req = ucontrol->value.integer.value[0]; | 1235 | req = ucontrol->value.integer.value[0]; |
| 1236 | if (req >= ARRAY_SIZE(enum_anc_state)) { | ||
| 1237 | status = -EINVAL; | ||
| 1238 | goto cleanup; | ||
| 1239 | } | ||
| 1235 | if (req != ANC_APPLY_FIR_IIR && req != ANC_APPLY_FIR && | 1240 | if (req != ANC_APPLY_FIR_IIR && req != ANC_APPLY_FIR && |
| 1236 | req != ANC_APPLY_IIR) { | 1241 | req != ANC_APPLY_IIR) { |
| 1237 | dev_err(dev, "%s: ERROR: Unsupported status to set '%s'!\n", | 1242 | dev_err(dev, "%s: ERROR: Unsupported status to set '%s'!\n", |
diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c index 41cdd1642970..8dbcacd44e6a 100644 --- a/sound/soc/codecs/max98095.c +++ b/sound/soc/codecs/max98095.c | |||
| @@ -1863,7 +1863,7 @@ static int max98095_put_eq_enum(struct snd_kcontrol *kcontrol, | |||
| 1863 | struct max98095_pdata *pdata = max98095->pdata; | 1863 | struct max98095_pdata *pdata = max98095->pdata; |
| 1864 | int channel = max98095_get_eq_channel(kcontrol->id.name); | 1864 | int channel = max98095_get_eq_channel(kcontrol->id.name); |
| 1865 | struct max98095_cdata *cdata; | 1865 | struct max98095_cdata *cdata; |
| 1866 | int sel = ucontrol->value.integer.value[0]; | 1866 | unsigned int sel = ucontrol->value.integer.value[0]; |
| 1867 | struct max98095_eq_cfg *coef_set; | 1867 | struct max98095_eq_cfg *coef_set; |
| 1868 | int fs, best, best_val, i; | 1868 | int fs, best, best_val, i; |
| 1869 | int regmask, regsave; | 1869 | int regmask, regsave; |
| @@ -2016,7 +2016,7 @@ static int max98095_put_bq_enum(struct snd_kcontrol *kcontrol, | |||
| 2016 | struct max98095_pdata *pdata = max98095->pdata; | 2016 | struct max98095_pdata *pdata = max98095->pdata; |
| 2017 | int channel = max98095_get_bq_channel(codec, kcontrol->id.name); | 2017 | int channel = max98095_get_bq_channel(codec, kcontrol->id.name); |
| 2018 | struct max98095_cdata *cdata; | 2018 | struct max98095_cdata *cdata; |
| 2019 | int sel = ucontrol->value.integer.value[0]; | 2019 | unsigned int sel = ucontrol->value.integer.value[0]; |
| 2020 | struct max98095_biquad_cfg *coef_set; | 2020 | struct max98095_biquad_cfg *coef_set; |
| 2021 | int fs, best, best_val, i; | 2021 | int fs, best, best_val, i; |
| 2022 | int regmask, regsave; | 2022 | int regmask, regsave; |
diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c index 46c5b4fdfc52..ca1be1d9dcf0 100644 --- a/sound/soc/fsl/imx-sgtl5000.c +++ b/sound/soc/fsl/imx-sgtl5000.c | |||
| @@ -62,7 +62,7 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) | |||
| 62 | struct device_node *ssi_np, *codec_np; | 62 | struct device_node *ssi_np, *codec_np; |
| 63 | struct platform_device *ssi_pdev; | 63 | struct platform_device *ssi_pdev; |
| 64 | struct i2c_client *codec_dev; | 64 | struct i2c_client *codec_dev; |
| 65 | struct imx_sgtl5000_data *data; | 65 | struct imx_sgtl5000_data *data = NULL; |
| 66 | int int_port, ext_port; | 66 | int int_port, ext_port; |
| 67 | int ret; | 67 | int ret; |
| 68 | 68 | ||
| @@ -128,7 +128,7 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) | |||
| 128 | goto fail; | 128 | goto fail; |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | data->codec_clk = devm_clk_get(&codec_dev->dev, NULL); | 131 | data->codec_clk = clk_get(&codec_dev->dev, NULL); |
| 132 | if (IS_ERR(data->codec_clk)) { | 132 | if (IS_ERR(data->codec_clk)) { |
| 133 | ret = PTR_ERR(data->codec_clk); | 133 | ret = PTR_ERR(data->codec_clk); |
| 134 | goto fail; | 134 | goto fail; |
| @@ -172,6 +172,8 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) | |||
| 172 | return 0; | 172 | return 0; |
| 173 | 173 | ||
| 174 | fail: | 174 | fail: |
| 175 | if (data && !IS_ERR(data->codec_clk)) | ||
| 176 | clk_put(data->codec_clk); | ||
| 175 | if (ssi_np) | 177 | if (ssi_np) |
| 176 | of_node_put(ssi_np); | 178 | of_node_put(ssi_np); |
| 177 | if (codec_np) | 179 | if (codec_np) |
| @@ -185,6 +187,7 @@ static int imx_sgtl5000_remove(struct platform_device *pdev) | |||
| 185 | struct imx_sgtl5000_data *data = platform_get_drvdata(pdev); | 187 | struct imx_sgtl5000_data *data = platform_get_drvdata(pdev); |
| 186 | 188 | ||
| 187 | snd_soc_unregister_card(&data->card); | 189 | snd_soc_unregister_card(&data->card); |
| 190 | clk_put(data->codec_clk); | ||
| 188 | 191 | ||
| 189 | return 0; | 192 | return 0; |
| 190 | } | 193 | } |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 4d0561312f3b..1a38be0d0ca8 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
| @@ -1380,7 +1380,6 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order) | |||
| 1380 | return -ENODEV; | 1380 | return -ENODEV; |
| 1381 | 1381 | ||
| 1382 | list_add(&cpu_dai->dapm.list, &card->dapm_list); | 1382 | list_add(&cpu_dai->dapm.list, &card->dapm_list); |
| 1383 | snd_soc_dapm_new_dai_widgets(&cpu_dai->dapm, cpu_dai); | ||
| 1384 | } | 1383 | } |
| 1385 | 1384 | ||
| 1386 | if (cpu_dai->driver->probe) { | 1385 | if (cpu_dai->driver->probe) { |
