Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/es8316', 'asoc/topic...
authorMark Brown <broonie@kernel.org>
Fri, 1 Sep 2017 11:12:36 +0000 (12:12 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 1 Sep 2017 11:12:36 +0000 (12:12 +0100)
14 files changed:
sound/soc/codecs/hdmi-codec.c
sound/soc/dwc/dwc-i2s.c
sound/soc/fsl/fsl-asoc-card.c
sound/soc/fsl/fsl_asrc.c
sound/soc/fsl/fsl_asrc_dma.c
sound/soc/fsl/fsl_dma.c
sound/soc/fsl/fsl_esai.c
sound/soc/fsl/fsl_spdif.c
sound/soc/fsl/fsl_ssi.c
sound/soc/fsl/imx-audmux.c
sound/soc/fsl/imx-pcm-fiq.c
sound/soc/fsl/mpc5200_dma.c
sound/soc/mxs/mxs-sgtl5000.c
sound/soc/sh/fsi.c

index d73d2c1ed8239d166a27f23161046d92a916571e..3abf82563408fde68c8d5398ef6cf1f7592c9b42 100644 (file)
@@ -67,14 +67,14 @@ struct hdmi_codec_cea_spk_alloc {
 };
 
 /* Channel maps  stereo HDMI */
-const struct snd_pcm_chmap_elem hdmi_codec_stereo_chmaps[] = {
+static const struct snd_pcm_chmap_elem hdmi_codec_stereo_chmaps[] = {
        { .channels = 2,
          .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR } },
        { }
 };
 
 /* Channel maps for multi-channel playbacks, up to 8 n_ch */
-const struct snd_pcm_chmap_elem hdmi_codec_8ch_chmaps[] = {
+static const struct snd_pcm_chmap_elem hdmi_codec_8ch_chmaps[] = {
        { .channels = 2, /* CA_ID 0x00 */
          .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR } },
        { .channels = 4, /* CA_ID 0x01 */
@@ -340,7 +340,7 @@ static unsigned long hdmi_codec_spk_mask_from_alloc(int spk_alloc)
        return spk_mask;
 }
 
-void hdmi_codec_eld_chmap(struct hdmi_codec_priv *hcp)
+static void hdmi_codec_eld_chmap(struct hdmi_codec_priv *hcp)
 {
        u8 spk_alloc;
        unsigned long spk_mask;
@@ -696,7 +696,7 @@ static const struct snd_soc_dai_driver hdmi_i2s_dai = {
        .name = "i2s-hifi",
        .id = DAI_ID_I2S,
        .playback = {
-               .stream_name = "Playback",
+               .stream_name = "I2S Playback",
                .channels_min = 2,
                .channels_max = 8,
                .rates = HDMI_RATES,
@@ -711,7 +711,7 @@ static const struct snd_soc_dai_driver hdmi_spdif_dai = {
        .name = "spdif-hifi",
        .id = DAI_ID_SPDIF,
        .playback = {
-               .stream_name = "Playback",
+               .stream_name = "SPDIF Playback",
                .channels_min = 2,
                .channels_max = 2,
                .rates = HDMI_RATES,
index 91606763818089ffe2c4d058eb214f1e5714765a..e27e21f8569a0e9719c2c90a801189dd0507c8a3 100644 (file)
@@ -381,7 +381,7 @@ static int dw_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
        return ret;
 }
 
-static struct snd_soc_dai_ops dw_i2s_dai_ops = {
+static const struct snd_soc_dai_ops dw_i2s_dai_ops = {
        .startup        = dw_i2s_startup,
        .shutdown       = dw_i2s_shutdown,
        .hw_params      = dw_i2s_hw_params,
@@ -617,10 +617,8 @@ static int dw_i2s_probe(struct platform_device *pdev)
        const char *clk_id;
 
        dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
-       if (!dev) {
-               dev_warn(&pdev->dev, "kzalloc fail\n");
+       if (!dev)
                return -ENOMEM;
-       }
 
        dw_i2s_dai = devm_kzalloc(&pdev->dev, sizeof(*dw_i2s_dai), GFP_KERNEL);
        if (!dw_i2s_dai)
index 9998aea2359794fff4b9ccb82b7ab3ee375437aa..2db4d0c80d332cbf406273f822d1a061114cf250 100644 (file)
@@ -683,7 +683,7 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
        snd_soc_card_set_drvdata(&priv->card, priv);
 
        ret = devm_snd_soc_register_card(&pdev->dev, &priv->card);
-       if (ret)
+       if (ret && ret != -EPROBE_DEFER)
                dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
 
 asrc_fail:
index 8cfffa70c144aff3c8f8157d3e7c000c85236620..806d39927318f97d55baf39739f8b7e14467f438 100644 (file)
@@ -542,7 +542,7 @@ static int fsl_asrc_dai_trigger(struct snd_pcm_substream *substream, int cmd,
        return 0;
 }
 
-static struct snd_soc_dai_ops fsl_asrc_dai_ops = {
+static const struct snd_soc_dai_ops fsl_asrc_dai_ops = {
        .hw_params    = fsl_asrc_dai_hw_params,
        .hw_free      = fsl_asrc_dai_hw_free,
        .trigger      = fsl_asrc_dai_trigger,
index 282d841840b1cfbea8d1ca97c3b764d21101d15c..e1b97e59275a9ebdc31f85cc7e8aa883b0ad1700 100644 (file)
@@ -20,7 +20,7 @@
 
 #define FSL_ASRC_DMABUF_SIZE   (256 * 1024)
 
-static struct snd_pcm_hardware snd_imx_hardware = {
+static const struct snd_pcm_hardware snd_imx_hardware = {
        .info = SNDRV_PCM_INFO_INTERLEAVED |
                SNDRV_PCM_INFO_BLOCK_TRANSFER |
                SNDRV_PCM_INFO_MMAP |
@@ -279,10 +279,8 @@ static int fsl_asrc_dma_startup(struct snd_pcm_substream *substream)
        struct fsl_asrc_pair *pair;
 
        pair = kzalloc(sizeof(struct fsl_asrc_pair), GFP_KERNEL);
-       if (!pair) {
-               dev_err(dev, "failed to allocate pair\n");
+       if (!pair)
                return -ENOMEM;
-       }
 
        pair->asrc_priv = asrc_priv;
 
index ccadefceeff2c00e1e6e9ed2f74225d00a9a3cde..0c11f434a37461fb6cf9786ed32d36083b7acb9f 100644 (file)
@@ -63,7 +63,6 @@ struct dma_object {
        struct ccsr_dma_channel __iomem *channel;
        unsigned int irq;
        bool assigned;
-       char path[1];
 };
 
 /*
@@ -870,7 +869,7 @@ static struct device_node *find_ssi_node(struct device_node *dma_channel_np)
        return NULL;
 }
 
-static struct snd_pcm_ops fsl_dma_ops = {
+static const struct snd_pcm_ops fsl_dma_ops = {
        .open           = fsl_dma_open,
        .close          = fsl_dma_close,
        .ioctl          = snd_pcm_lib_ioctl,
@@ -897,20 +896,18 @@ static int fsl_soc_dma_probe(struct platform_device *pdev)
 
        ret = of_address_to_resource(ssi_np, 0, &res);
        if (ret) {
-               dev_err(&pdev->dev, "could not determine resources for %s\n",
-                       ssi_np->full_name);
+               dev_err(&pdev->dev, "could not determine resources for %pOF\n",
+                       ssi_np);
                of_node_put(ssi_np);
                return ret;
        }
 
-       dma = kzalloc(sizeof(*dma) + strlen(np->full_name), GFP_KERNEL);
+       dma = kzalloc(sizeof(*dma), GFP_KERNEL);
        if (!dma) {
-               dev_err(&pdev->dev, "could not allocate dma object\n");
                of_node_put(ssi_np);
                return -ENOMEM;
        }
 
-       strcpy(dma->path, np->full_name);
        dma->dai.ops = &fsl_dma_ops;
        dma->dai.pcm_new = fsl_dma_new;
        dma->dai.pcm_free = fsl_dma_free_dma_buffers;
index 809a069d490b1a2ba91eaaca599b387f0d496b40..cef79a1a620b7dc3105572e6987c358da8db8a30 100644 (file)
@@ -620,7 +620,7 @@ static int fsl_esai_trigger(struct snd_pcm_substream *substream, int cmd,
        return 0;
 }
 
-static struct snd_soc_dai_ops fsl_esai_dai_ops = {
+static const struct snd_soc_dai_ops fsl_esai_dai_ops = {
        .startup = fsl_esai_startup,
        .shutdown = fsl_esai_shutdown,
        .trigger = fsl_esai_trigger,
index 1ff467c9598a355381981af24bc2a67befbe7713..7e6cc4da00887d25e4c549c273dc3e0b4874c586 100644 (file)
@@ -626,7 +626,7 @@ static int fsl_spdif_trigger(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static struct snd_soc_dai_ops fsl_spdif_dai_ops = {
+static const struct snd_soc_dai_ops fsl_spdif_dai_ops = {
        .startup = fsl_spdif_startup,
        .hw_params = fsl_spdif_hw_params,
        .trigger = fsl_spdif_trigger,
index 173cb8496641353b63177acba147278541c36370..64598d1183f8f14613a844333ff6c9c2da21f6bc 100644 (file)
@@ -1432,10 +1432,8 @@ static int fsl_ssi_probe(struct platform_device *pdev)
 
        ssi_private = devm_kzalloc(&pdev->dev, sizeof(*ssi_private),
                        GFP_KERNEL);
-       if (!ssi_private) {
-               dev_err(&pdev->dev, "could not allocate DAI object\n");
+       if (!ssi_private)
                return -ENOMEM;
-       }
 
        ssi_private->soc = of_id->data;
        ssi_private->dev = &pdev->dev;
index fc57da341d6106e029c6766370421b9cdc97e8f5..392d5eef356d3a8a90cb2b4cb52c07d5520ebbc0 100644 (file)
@@ -268,13 +268,13 @@ static int imx_audmux_parse_dt_defaults(struct platform_device *pdev,
 
                ret = of_property_read_u32(child, "fsl,audmux-port", &port);
                if (ret) {
-                       dev_warn(&pdev->dev, "Failed to get fsl,audmux-port of child node \"%s\"\n",
-                                       child->full_name);
+                       dev_warn(&pdev->dev, "Failed to get fsl,audmux-port of child node \"%pOF\"\n",
+                                       child);
                        continue;
                }
                if (!of_property_read_bool(child, "fsl,port-config")) {
-                       dev_warn(&pdev->dev, "child node \"%s\" does not have property fsl,port-config\n",
-                                       child->full_name);
+                       dev_warn(&pdev->dev, "child node \"%pOF\" does not have property fsl,port-config\n",
+                                       child);
                        continue;
                }
 
@@ -292,15 +292,15 @@ static int imx_audmux_parse_dt_defaults(struct platform_device *pdev,
                }
 
                if (ret != -EOVERFLOW) {
-                       dev_err(&pdev->dev, "Failed to read u32 at index %d of child %s\n",
-                                       i, child->full_name);
+                       dev_err(&pdev->dev, "Failed to read u32 at index %d of child %pOF\n",
+                                       i, child);
                        continue;
                }
 
                if (audmux_type == IMX31_AUDMUX) {
                        if (i % 2) {
-                               dev_err(&pdev->dev, "One pdcr value is missing in child node %s\n",
-                                               child->full_name);
+                               dev_err(&pdev->dev, "One pdcr value is missing in child node %pOF\n",
+                                               child);
                                continue;
                        }
                        imx_audmux_v2_configure_port(port, ptcr, pdcr);
index 92410f7ca1fafab6dcf6132808c758eea49f67c1..4e5fefee111eb285c1005edcbf22dd9d1c47d6f2 100644 (file)
@@ -154,7 +154,7 @@ static snd_pcm_uframes_t snd_imx_pcm_pointer(struct snd_pcm_substream *substream
        return bytes_to_frames(substream->runtime, iprtd->offset);
 }
 
-static struct snd_pcm_hardware snd_imx_hardware = {
+static const struct snd_pcm_hardware snd_imx_hardware = {
        .info = SNDRV_PCM_INFO_INTERLEAVED |
                SNDRV_PCM_INFO_BLOCK_TRANSFER |
                SNDRV_PCM_INFO_MMAP |
@@ -227,7 +227,7 @@ static int snd_imx_pcm_mmap(struct snd_pcm_substream *substream,
        return ret;
 }
 
-static struct snd_pcm_ops imx_pcm_ops = {
+static const struct snd_pcm_ops imx_pcm_ops = {
        .open           = snd_imx_open,
        .close          = snd_imx_close,
        .ioctl          = snd_pcm_lib_ioctl,
@@ -341,7 +341,7 @@ static void imx_pcm_fiq_free(struct snd_pcm *pcm)
        imx_pcm_free(pcm);
 }
 
-static struct snd_soc_platform_driver imx_soc_platform_fiq = {
+static const struct snd_soc_platform_driver imx_soc_platform_fiq = {
        .ops            = &imx_pcm_ops,
        .pcm_new        = imx_pcm_fiq_new,
        .pcm_free       = imx_pcm_fiq_free,
index 1f7e70bfbd5506a4088143d8ee9dfff0e059ee2d..e63029f1aabc0b499985226c9624950cb146737c 100644 (file)
@@ -287,7 +287,7 @@ psc_dma_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static struct snd_pcm_ops psc_dma_ops = {
+static const struct snd_pcm_ops psc_dma_ops = {
        .open           = psc_dma_open,
        .close          = psc_dma_close,
        .hw_free        = psc_dma_hw_free,
@@ -356,7 +356,7 @@ static void psc_dma_free(struct snd_pcm *pcm)
        }
 }
 
-static struct snd_soc_platform_driver mpc5200_audio_dma_platform = {
+static const struct snd_soc_platform_driver mpc5200_audio_dma_platform = {
        .ops            = &psc_dma_ops,
        .pcm_new        = &psc_dma_new,
        .pcm_free       = &psc_dma_free,
index a96276e773328b39b0feb1d6d603b77a672d2048..2ed3240cc68210b38ac4b215f0eddc4bff2d943b 100644 (file)
@@ -140,7 +140,6 @@ static int mxs_sgtl5000_probe(struct platform_device *pdev)
        }
 
        card->dev = &pdev->dev;
-       platform_set_drvdata(pdev, card);
 
        ret = devm_snd_soc_register_card(&pdev->dev, card);
        if (ret) {
index 39ec772912d5ace45f0fa758895640459757bdaf..6d3c7706d93fbc1019377b48212c41e521a4b0e9 100644 (file)
@@ -1962,10 +1962,8 @@ static int fsi_probe(struct platform_device *pdev)
        }
 
        master = devm_kzalloc(&pdev->dev, sizeof(*master), GFP_KERNEL);
-       if (!master) {
-               dev_err(&pdev->dev, "Could not allocate master\n");
+       if (!master)
                return -ENOMEM;
-       }
 
        master->base = devm_ioremap_nocache(&pdev->dev,
                                            res->start, resource_size(res));
@@ -2109,7 +2107,7 @@ static int fsi_resume(struct device *dev)
        return 0;
 }
 
-static struct dev_pm_ops fsi_pm_ops = {
+static const struct dev_pm_ops fsi_pm_ops = {
        .suspend                = fsi_suspend,
        .resume                 = fsi_resume,
 };