Merge remote-tracking branches 'asoc/topic/adau1977', 'asoc/topic/arizona', 'asoc...
authorMark Brown <broonie@kernel.org>
Fri, 1 Sep 2017 11:12:21 +0000 (12:12 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 1 Sep 2017 11:12:21 +0000 (12:12 +0100)
12 files changed:
sound/atmel/ac97c.c
sound/soc/atmel/atmel-classd.c
sound/soc/atmel/atmel-pdmic.c
sound/soc/au1x/db1200.c
sound/soc/au1x/dbdma2.c
sound/soc/au1x/dma.c
sound/soc/au1x/psc-i2s.c
sound/soc/bcm/cygnus-ssp.c
sound/soc/codecs/adau1977.c
sound/soc/codecs/cs47l24.c
sound/soc/codecs/wm5102.c
sound/soc/codecs/wm5110.c

index 9d2c9d9af688030d660b63badbefc3f88e553aa2..d78405329cebe06614f38a37c82a431019256f50 100644 (file)
@@ -783,7 +783,9 @@ static int atmel_ac97c_probe(struct platform_device *pdev)
                dev_dbg(&pdev->dev, "no peripheral clock\n");
                return PTR_ERR(pclk);
        }
-       clk_prepare_enable(pclk);
+       retval = clk_prepare_enable(pclk);
+       if (retval)
+               goto err_prepare_enable;
 
        retval = snd_card_new(&pdev->dev, SNDRV_DEFAULT_IDX1,
                              SNDRV_DEFAULT_STR1, THIS_MODULE,
@@ -879,6 +881,7 @@ err_request_irq:
        snd_card_free(card);
 err_snd_card_new:
        clk_disable_unprepare(pclk);
+err_prepare_enable:
        clk_put(pclk);
        return retval;
 }
@@ -897,9 +900,9 @@ static int atmel_ac97c_resume(struct device *pdev)
 {
        struct snd_card *card = dev_get_drvdata(pdev);
        struct atmel_ac97c *chip = card->private_data;
+       int ret = clk_prepare_enable(chip->pclk);
 
-       clk_prepare_enable(chip->pclk);
-       return 0;
+       return ret;
 }
 
 static SIMPLE_DEV_PM_OPS(atmel_ac97c_pm, atmel_ac97c_suspend, atmel_ac97c_resume);
index b7ef8c59b49a2bdb2895f2203e0c207170227c6f..0cd7caaed9c410e6d148a54477210525470c7a48 100644 (file)
@@ -652,7 +652,6 @@ static int atmel_classd_probe(struct platform_device *pdev)
        }
 
        snd_soc_card_set_drvdata(card, dd);
-       platform_set_drvdata(pdev, card);
 
        ret = atmel_classd_asoc_card_init(dev, card);
        if (ret) {
index c917df7715d1b4fb7b315c7f81f32ebe3308f87d..8e3d34be9e690878be8c084ed9dfb1ff79a7b087 100644 (file)
@@ -694,7 +694,6 @@ static int atmel_pdmic_probe(struct platform_device *pdev)
        }
 
        snd_soc_card_set_drvdata(card, dd);
-       platform_set_drvdata(pdev, card);
 
        ret = atmel_pdmic_asoc_card_init(dev, card);
        if (ret) {
index 5c73061d912ad55a2cf51e75f9779bad900f9f33..301e1fc9a3773ffdb0b433284bcaa8f1b5f70b3d 100644 (file)
@@ -99,7 +99,7 @@ static int db1200_i2s_startup(struct snd_pcm_substream *substream)
        return 0;
 }
 
-static struct snd_soc_ops db1200_i2s_wm8731_ops = {
+static const struct snd_soc_ops db1200_i2s_wm8731_ops = {
        .startup        = db1200_i2s_startup,
 };
 
index b5d1caa04d8e77e275bfbfaaca2c9e6bd61a92ed..6a035ca0f521f71a17710dc6934d0a836338b372 100644 (file)
@@ -304,7 +304,7 @@ static int au1xpsc_pcm_close(struct snd_pcm_substream *substream)
        return 0;
 }
 
-static struct snd_pcm_ops au1xpsc_pcm_ops = {
+static const struct snd_pcm_ops au1xpsc_pcm_ops = {
        .open           = au1xpsc_pcm_open,
        .close          = au1xpsc_pcm_close,
        .ioctl          = snd_pcm_lib_ioctl,
index fcf5a9adde8170e67c861ca5bd75b9d84c0833af..19457e2b351ec158433497f6ca4d65c7e11c5db3 100644 (file)
@@ -277,7 +277,7 @@ static snd_pcm_uframes_t alchemy_pcm_pointer(struct snd_pcm_substream *ss)
        return bytes_to_frames(ss->runtime, location);
 }
 
-static struct snd_pcm_ops alchemy_pcm_ops = {
+static const struct snd_pcm_ops alchemy_pcm_ops = {
        .open                   = alchemy_pcm_open,
        .close                  = alchemy_pcm_close,
        .ioctl                  = snd_pcm_lib_ioctl,
index 0bf9d62b91a07132fa1af21f902bfa257cdfee4b..e6eec081eaae03dd9f88f7285e6c331b79333fdf 100644 (file)
@@ -392,7 +392,7 @@ static int au1xpsc_i2s_drvresume(struct device *dev)
        return 0;
 }
 
-static struct dev_pm_ops au1xpsci2s_pmops = {
+static const struct dev_pm_ops au1xpsci2s_pmops = {
        .suspend        = au1xpsc_i2s_drvsuspend,
        .resume         = au1xpsc_i2s_drvresume,
 };
index e710bb0c56374b7fb97d41b588f535fc435a87e7..cdd5e82439dd08144b3e14df41a84d43cf3e5e21 100644 (file)
@@ -1288,7 +1288,7 @@ static const struct snd_soc_dai_driver cygnus_ssp_dai_info[] = {
        INIT_CPU_DAI(2),
 };
 
-static struct snd_soc_dai_driver cygnus_spdif_dai_info = {
+static const struct snd_soc_dai_driver cygnus_spdif_dai_info = {
        .name = "cygnus-spdif",
        .playback = {
                .channels_min = 2,
index 3292816757656c1919c5c88cdeba6673fed59099..e384f212beb2cc7cd90320952e1dda41c5064d1a 100644 (file)
@@ -388,8 +388,7 @@ static int adau1977_power_disable(struct adau1977 *adau1977)
 
        regcache_mark_dirty(adau1977->regmap);
 
-       if (adau1977->reset_gpio)
-               gpiod_set_value_cansleep(adau1977->reset_gpio, 0);
+       gpiod_set_value_cansleep(adau1977->reset_gpio, 0);
 
        regcache_cache_only(adau1977->regmap, true);
 
@@ -420,8 +419,7 @@ static int adau1977_power_enable(struct adau1977 *adau1977)
                        goto err_disable_avdd;
        }
 
-       if (adau1977->reset_gpio)
-               gpiod_set_value_cansleep(adau1977->reset_gpio, 1);
+       gpiod_set_value_cansleep(adau1977->reset_gpio, 1);
 
        regcache_cache_only(adau1977->regmap, false);
 
index 505dbc9d73cfe30cef585a9c8ba01e4aa5c2f711..e09fc8f037f10c5f04d62369c89852ab3b9273cc 100644 (file)
@@ -1203,7 +1203,7 @@ static const struct snd_soc_codec_driver soc_codec_dev_cs47l24 = {
        },
 };
 
-static struct snd_compr_ops cs47l24_compr_ops = {
+static const struct snd_compr_ops cs47l24_compr_ops = {
        .open = cs47l24_open,
        .free = wm_adsp_compr_free,
        .set_params = wm_adsp_compr_set_params,
index f5006923be2e21549ab031c6fb3fc21aed9c2e29..72486bf072f2854de417804afab7002158f8b333 100644 (file)
@@ -2017,7 +2017,7 @@ static const struct snd_soc_codec_driver soc_codec_dev_wm5102 = {
        },
 };
 
-static struct snd_compr_ops wm5102_compr_ops = {
+static const struct snd_compr_ops wm5102_compr_ops = {
        .open = wm5102_open,
        .free = wm_adsp_compr_free,
        .set_params = wm_adsp_compr_set_params,
index d6fae1397ce26860b8ddd2bbd6595b8ab862394c..858a24fc28e80065052d4bff98831680197c5927 100644 (file)
@@ -2372,7 +2372,7 @@ static const struct snd_soc_codec_driver soc_codec_dev_wm5110 = {
        },
 };
 
-static struct snd_compr_ops wm5110_compr_ops = {
+static const struct snd_compr_ops wm5110_compr_ops = {
        .open = wm5110_open,
        .free = wm_adsp_compr_free,
        .set_params = wm_adsp_compr_set_params,