Merge remote-tracking branches 'asoc/topic/wm8741', 'asoc/topic/wm8753', 'asoc/topic...
[deliverable/linux.git] / sound / soc / codecs / sti-sas.c
index 4168b88ba3b152d5163bc9c46b591fedc272945b..160d61a66204b25db880c0e7eb7618344026e81e 100644 (file)
@@ -227,8 +227,8 @@ static int stih416_dac_probe(struct snd_soc_dai *dai)
        dac->rst = devm_reset_control_get(codec->dev, "dac_rst");
        if (IS_ERR(dac->rst)) {
                dev_err(dai->codec->dev,
-                       "%s: ERROR: DAC reset control not defined (%d)!\n",
-                       __func__, (int)dac->rst);
+                       "%s: ERROR: DAC reset control not defined !\n",
+                       __func__);
                dac->rst = NULL;
                return -EFAULT;
        }
@@ -238,7 +238,7 @@ static int stih416_dac_probe(struct snd_soc_dai *dai)
        return 0;
 }
 
-const struct snd_soc_dapm_widget stih416_sas_dapm_widgets[] = {
+static const struct snd_soc_dapm_widget stih416_sas_dapm_widgets[] = {
        SND_SOC_DAPM_PGA("DAC bandgap", STIH416_AUDIO_DAC_CTRL,
                         STIH416_DAC_NOT_PNDBG_MASK, 0, NULL, 0),
        SND_SOC_DAPM_OUT_DRV("DAC standby ana", STIH416_AUDIO_DAC_CTRL,
@@ -248,7 +248,7 @@ const struct snd_soc_dapm_widget stih416_sas_dapm_widgets[] = {
        SND_SOC_DAPM_OUTPUT("DAC Output"),
 };
 
-const struct snd_soc_dapm_widget stih407_sas_dapm_widgets[] = {
+static const struct snd_soc_dapm_widget stih407_sas_dapm_widgets[] = {
        SND_SOC_DAPM_OUT_DRV("DAC standby ana", STIH407_AUDIO_DAC_CTRL,
                             STIH407_DAC_STANDBY_ANA, 1, NULL, 0),
        SND_SOC_DAPM_DAC("DAC standby",  "dac_p", STIH407_AUDIO_DAC_CTRL,
@@ -256,13 +256,13 @@ const struct snd_soc_dapm_widget stih407_sas_dapm_widgets[] = {
        SND_SOC_DAPM_OUTPUT("DAC Output"),
 };
 
-const struct snd_soc_dapm_route stih416_sas_route[] = {
+static const struct snd_soc_dapm_route stih416_sas_route[] = {
        {"DAC Output", NULL, "DAC bandgap"},
        {"DAC Output", NULL, "DAC standby ana"},
        {"DAC standby ana", NULL, "DAC standby"},
 };
 
-const struct snd_soc_dapm_route stih407_sas_route[] = {
+static const struct snd_soc_dapm_route stih407_sas_route[] = {
        {"DAC Output", NULL, "DAC standby ana"},
        {"DAC standby ana", NULL, "DAC standby"},
 };
@@ -407,21 +407,21 @@ static int sti_sas_prepare(struct snd_pcm_substream *substream,
        return 0;
 }
 
-const struct snd_soc_dai_ops stih416_dac_ops = {
+static const struct snd_soc_dai_ops stih416_dac_ops = {
        .set_fmt = sti_sas_dac_set_fmt,
        .mute_stream = stih416_sas_dac_mute,
        .prepare = sti_sas_prepare,
        .set_sysclk = sti_sas_set_sysclk,
 };
 
-const struct snd_soc_dai_ops stih407_dac_ops = {
+static const struct snd_soc_dai_ops stih407_dac_ops = {
        .set_fmt = sti_sas_dac_set_fmt,
        .mute_stream = stih407_sas_dac_mute,
        .prepare = sti_sas_prepare,
        .set_sysclk = sti_sas_set_sysclk,
 };
 
-const struct regmap_config stih407_sas_regmap = {
+static const struct regmap_config stih407_sas_regmap = {
        .reg_bits = 32,
        .val_bits = 32,
 
@@ -434,7 +434,7 @@ const struct regmap_config stih407_sas_regmap = {
        .reg_write = sti_sas_write_reg,
 };
 
-const struct regmap_config stih416_sas_regmap = {
+static const struct regmap_config stih416_sas_regmap = {
        .reg_bits = 32,
        .val_bits = 32,
 
@@ -447,7 +447,7 @@ const struct regmap_config stih416_sas_regmap = {
        .reg_write = sti_sas_write_reg,
 };
 
-const struct sti_sas_dev_data stih416_data = {
+static const struct sti_sas_dev_data stih416_data = {
        .chipid = CHIPID_STIH416,
        .regmap = &stih416_sas_regmap,
        .dac_ops = &stih416_dac_ops,
@@ -457,7 +457,7 @@ const struct sti_sas_dev_data stih416_data = {
        .num_dapm_routes = ARRAY_SIZE(stih416_sas_route),
 };
 
-const struct sti_sas_dev_data stih407_data = {
+static const struct sti_sas_dev_data stih407_data = {
        .chipid = CHIPID_STIH407,
        .regmap = &stih407_sas_regmap,
        .dac_ops = &stih407_dac_ops,
@@ -547,6 +547,7 @@ static int sti_sas_driver_probe(struct platform_device *pdev)
 {
        struct device_node *pnode = pdev->dev.of_node;
        struct sti_sas_data *drvdata;
+       const struct of_device_id *of_id;
 
        /* Allocate device structure */
        drvdata = devm_kzalloc(&pdev->dev, sizeof(struct sti_sas_data),
@@ -555,12 +556,13 @@ static int sti_sas_driver_probe(struct platform_device *pdev)
                return -ENOMEM;
 
        /* Populate data structure depending on compatibility */
-       if (!of_match_node(sti_sas_dev_match, pnode)->data) {
+       of_id = of_match_node(sti_sas_dev_match, pnode);
+       if (!of_id->data) {
                dev_err(&pdev->dev, "data associated to device is missing");
                return -EINVAL;
        }
 
-       drvdata->dev_data = of_match_node(sti_sas_dev_match, pnode)->data;
+       drvdata->dev_data = (struct sti_sas_dev_data *)of_id->data;
 
        /* Initialise device structure */
        drvdata->dev = &pdev->dev;
@@ -613,7 +615,6 @@ static int sti_sas_driver_remove(struct platform_device *pdev)
 static struct platform_driver sti_sas_platform_driver = {
        .driver = {
                .name = "sti-sas-codec",
-               .owner = THIS_MODULE,
                .of_match_table = sti_sas_dev_match,
        },
        .probe = sti_sas_driver_probe,
This page took 0.026338 seconds and 5 git commands to generate.