diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 17:39:57 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 17:39:57 +0000 |
commit | dc50eab76b709d68175a358d6e23a5a3890764d3 (patch) | |
tree | c754d0390db060af0213ff994f0ac310e4cfd6e9 /sound/soc/codecs/cs4271.c | |
parent | Adding debian version 6.6.15-2. (diff) | |
download | linux-dc50eab76b709d68175a358d6e23a5a3890764d3.tar.xz linux-dc50eab76b709d68175a358d6e23a5a3890764d3.zip |
Merging upstream version 6.7.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sound/soc/codecs/cs4271.c')
-rw-r--r-- | sound/soc/codecs/cs4271.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c index 188b8b43c5..9e6f8a048d 100644 --- a/sound/soc/codecs/cs4271.c +++ b/sound/soc/codecs/cs4271.c @@ -15,7 +15,6 @@ #include <linux/delay.h> #include <linux/gpio.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/of_gpio.h> #include <linux/regulator/consumer.h> #include <sound/pcm.h> @@ -563,19 +562,12 @@ static int cs4271_component_probe(struct snd_soc_component *component) struct cs4271_private *cs4271 = snd_soc_component_get_drvdata(component); struct cs4271_platform_data *cs4271plat = component->dev->platform_data; int ret; - bool amutec_eq_bmutec = false; + bool amutec_eq_bmutec; -#ifdef CONFIG_OF - if (of_match_device(cs4271_dt_ids, component->dev)) { - if (of_get_property(component->dev->of_node, - "cirrus,amutec-eq-bmutec", NULL)) - amutec_eq_bmutec = true; - - if (of_get_property(component->dev->of_node, - "cirrus,enable-soft-reset", NULL)) - cs4271->enable_soft_reset = true; - } -#endif + amutec_eq_bmutec = of_property_read_bool(component->dev->of_node, + "cirrus,amutec-eq-bmutec"); + cs4271->enable_soft_reset = of_property_read_bool(component->dev->of_node, + "cirrus,enable-soft-reset"); ret = regulator_bulk_enable(ARRAY_SIZE(cs4271->supplies), cs4271->supplies); @@ -655,9 +647,7 @@ static int cs4271_common_probe(struct device *dev, if (!cs4271) return -ENOMEM; - if (of_match_device(cs4271_dt_ids, dev)) - cs4271->gpio_nreset = - of_get_named_gpio(dev->of_node, "reset-gpio", 0); + cs4271->gpio_nreset = of_get_named_gpio(dev->of_node, "reset-gpio", 0); if (cs4271plat) cs4271->gpio_nreset = cs4271plat->gpio_nreset; |