Merge remote-tracking branches 'asoc/topic/pm-ops', 'asoc/topic/pxa' and 'asoc/topic...
[firefly-linux-kernel-4.4.55.git] / sound / soc / codecs / da7210.c
index 137e8ebc092c5a9f2c1264723211ba7e8405871f..457ed82d3e10ecf7d39e0e9bfc6ed70176bbc096 100644 (file)
@@ -335,7 +335,7 @@ static SOC_ENUM_SINGLE_DECL(da7210_hp_mode_sel,
 static int da7210_put_alc_sw(struct snd_kcontrol *kcontrol,
                             struct snd_ctl_elem_value *ucontrol)
 {
-       struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
+       struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
 
        if (ucontrol->value.integer.value[0]) {
                /* Check if noise suppression is enabled */
@@ -358,7 +358,7 @@ static int da7210_put_alc_sw(struct snd_kcontrol *kcontrol,
 static int da7210_put_noise_sup_sw(struct snd_kcontrol *kcontrol,
                                   struct snd_ctl_elem_value *ucontrol)
 {
-       struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
+       struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
        u8 val;
 
        if (ucontrol->value.integer.value[0]) {
@@ -680,7 +680,7 @@ struct da7210_priv {
        int master;
 };
 
-static struct reg_default da7210_reg_defaults[] = {
+static const struct reg_default da7210_reg_defaults[] = {
        { 0x00, 0x00 },
        { 0x01, 0x11 },
        { 0x03, 0x00 },
@@ -1182,7 +1182,7 @@ static struct snd_soc_codec_driver soc_codec_dev_da7210 = {
 
 #if IS_ENABLED(CONFIG_I2C)
 
-static struct reg_default da7210_regmap_i2c_patch[] = {
+static const struct reg_default da7210_regmap_i2c_patch[] = {
 
        /* System controller master disable */
        { DA7210_STARTUP1, 0x00 },
@@ -1259,7 +1259,6 @@ MODULE_DEVICE_TABLE(i2c, da7210_i2c_id);
 static struct i2c_driver da7210_i2c_driver = {
        .driver = {
                .name = "da7210",
-               .owner = THIS_MODULE,
        },
        .probe          = da7210_i2c_probe,
        .remove         = da7210_i2c_remove,
@@ -1269,7 +1268,7 @@ static struct i2c_driver da7210_i2c_driver = {
 
 #if defined(CONFIG_SPI_MASTER)
 
-static struct reg_default da7210_regmap_spi_patch[] = {
+static const struct reg_default da7210_regmap_spi_patch[] = {
        /* Dummy read to give two pulses over nCS for SPI */
        { DA7210_AUX2, 0x00 },
        { DA7210_AUX2, 0x00 },