diff options
Diffstat (limited to 'sound/soc/codecs/tlv320adcx140.c')
| -rw-r--r-- | sound/soc/codecs/tlv320adcx140.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sound/soc/codecs/tlv320adcx140.c b/sound/soc/codecs/tlv320adcx140.c index 91a22d927915..443cf59cb71a 100644 --- a/sound/soc/codecs/tlv320adcx140.c +++ b/sound/soc/codecs/tlv320adcx140.c @@ -12,7 +12,6 @@ #include <linux/regulator/consumer.h> #include <linux/acpi.h> #include <linux/of.h> -#include <linux/of_gpio.h> #include <linux/slab.h> #include <sound/core.h> #include <sound/pcm.h> @@ -613,8 +612,7 @@ static int adcx140_phase_calib_info(struct snd_kcontrol *kcontrol, static int adcx140_phase_calib_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *value) { - struct snd_soc_component *codec = - snd_soc_kcontrol_component(kcontrol); + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); struct adcx140_priv *adcx140 = snd_soc_component_get_drvdata(codec); value->value.integer.value[0] = adcx140->phase_calib_on ? 1 : 0; @@ -626,8 +624,7 @@ static int adcx140_phase_calib_get(struct snd_kcontrol *kcontrol, static int adcx140_phase_calib_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *value) { - struct snd_soc_component *codec - = snd_soc_kcontrol_component(kcontrol); + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); struct adcx140_priv *adcx140 = snd_soc_component_get_drvdata(codec); bool v = value->value.integer.value[0] ? true : false; @@ -925,7 +922,7 @@ static int adcx140_configure_gpio(struct adcx140_priv *adcx140) gpio_count = device_property_count_u32(adcx140->dev, "ti,gpio-config"); - if (gpio_count == 0) + if (gpio_count <= 0) return 0; if (gpio_count != ADCX140_NUM_GPIO_CFGS) @@ -1208,7 +1205,7 @@ static struct i2c_driver adcx140_i2c_driver = { .name = "tlv320adcx140-codec", .of_match_table = of_match_ptr(tlv320adcx140_of_match), }, - .probe_new = adcx140_i2c_probe, + .probe = adcx140_i2c_probe, .id_table = adcx140_i2c_id, }; module_i2c_driver(adcx140_i2c_driver); |
