diff options
| author | Takashi Iwai <tiwai@suse.de> | 2023-10-31 08:58:36 +0100 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2023-10-31 08:58:36 +0100 |
| commit | c468b5dd759ede754b23cbc9c50b048a781d4217 (patch) | |
| tree | 3ec5f17b34fbb4711253fc4698d9cacbf6b9e71b /sound/soc/codecs/cs4271.c | |
| parent | 99248c8902f505ec064cf2b0f74629016f2f4c82 (diff) | |
| parent | f71e0be5d297b25453fdf4c1757b3e83e94b5f98 (diff) | |
| download | linux-c468b5dd759ede754b23cbc9c50b048a781d4217.tar.gz linux-c468b5dd759ede754b23cbc9c50b048a781d4217.tar.bz2 linux-c468b5dd759ede754b23cbc9c50b048a781d4217.zip | |
Merge branch 'for-next' into for-linus
Pull 6.7 materials
Signed-off-by: Takashi Iwai <tiwai@suse.de>
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 188b8b43c524..9e6f8a048dd5 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; |
