summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/tlv320aic32x4-spi.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 17:39:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 17:39:57 +0000
commitdc50eab76b709d68175a358d6e23a5a3890764d3 (patch)
treec754d0390db060af0213ff994f0ac310e4cfd6e9 /sound/soc/codecs/tlv320aic32x4-spi.c
parentAdding debian version 6.6.15-2. (diff)
downloadlinux-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/tlv320aic32x4-spi.c')
-rw-r--r--sound/soc/codecs/tlv320aic32x4-spi.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/sound/soc/codecs/tlv320aic32x4-spi.c b/sound/soc/codecs/tlv320aic32x4-spi.c
index 03cce8d640..d5976c9176 100644
--- a/sound/soc/codecs/tlv320aic32x4-spi.c
+++ b/sound/soc/codecs/tlv320aic32x4-spi.c
@@ -16,12 +16,11 @@
#include "tlv320aic32x4.h"
-static const struct of_device_id aic32x4_of_id[];
-
static int aic32x4_spi_probe(struct spi_device *spi)
{
struct regmap *regmap;
struct regmap_config config;
+ enum aic32x4_type type;
config = aic32x4_regmap_config;
config.reg_bits = 7;
@@ -30,20 +29,9 @@ static int aic32x4_spi_probe(struct spi_device *spi)
config.read_flag_mask = 0x01;
regmap = devm_regmap_init_spi(spi, &config);
+ type = (uintptr_t)spi_get_device_match_data(spi);
- if (spi->dev.of_node) {
- const struct of_device_id *oid;
-
- oid = of_match_node(aic32x4_of_id, spi->dev.of_node);
- dev_set_drvdata(&spi->dev, (void *)oid->data);
- } else {
- const struct spi_device_id *id_entry;
-
- id_entry = spi_get_device_id(spi);
- dev_set_drvdata(&spi->dev, (void *)id_entry->driver_data);
- }
-
- return aic32x4_probe(&spi->dev, regmap);
+ return aic32x4_probe(&spi->dev, regmap, type);
}
static void aic32x4_spi_remove(struct spi_device *spi)