diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2019-06-22 12:07:35 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2019-06-22 12:07:35 +0200 |
commit | 6808acb57a286cda48d8674713e672681ca7ffb3 (patch) | |
tree | 77ca408d2453069f6caec40053c4a20e60594c32 /sound/soc/codecs/ak4458.c | |
parent | d21e43f2ef32ba3242687dbedb3c4b9a76b3eebc (diff) | |
parent | 9e0babf2c06c73cda2c0cd37a1653d823adb40ec (diff) | |
download | linux-6808acb57a286cda48d8674713e672681ca7ffb3.tar.bz2 |
Merge branch 'linus' into timers/core
Pick up upstream fixes for pending changes.
Diffstat (limited to 'sound/soc/codecs/ak4458.c')
-rw-r--r-- | sound/soc/codecs/ak4458.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/sound/soc/codecs/ak4458.c b/sound/soc/codecs/ak4458.c index eab7c76cfcd9..71562154c0b1 100644 --- a/sound/soc/codecs/ak4458.c +++ b/sound/soc/codecs/ak4458.c @@ -304,7 +304,10 @@ static int ak4458_rstn_control(struct snd_soc_component *component, int bit) AK4458_00_CONTROL1, AK4458_RSTN_MASK, 0x0); - return ret; + if (ret < 0) + return ret; + + return 0; } static int ak4458_hw_params(struct snd_pcm_substream *substream, @@ -536,9 +539,10 @@ static void ak4458_power_on(struct ak4458_priv *ak4458) } } -static void ak4458_init(struct snd_soc_component *component) +static int ak4458_init(struct snd_soc_component *component) { struct ak4458_priv *ak4458 = snd_soc_component_get_drvdata(component); + int ret; /* External Mute ON */ if (ak4458->mute_gpiod) @@ -546,21 +550,21 @@ static void ak4458_init(struct snd_soc_component *component) ak4458_power_on(ak4458); - snd_soc_component_update_bits(component, AK4458_00_CONTROL1, + ret = snd_soc_component_update_bits(component, AK4458_00_CONTROL1, 0x80, 0x80); /* ACKS bit = 1; 10000000 */ + if (ret < 0) + return ret; - ak4458_rstn_control(component, 1); + return ak4458_rstn_control(component, 1); } static int ak4458_probe(struct snd_soc_component *component) { struct ak4458_priv *ak4458 = snd_soc_component_get_drvdata(component); - ak4458_init(component); - ak4458->fs = 48000; - return 0; + return ak4458_init(component); } static void ak4458_remove(struct snd_soc_component *component) |