summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/cs42xx8-i2c.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/cs42xx8-i2c.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/cs42xx8-i2c.c')
-rw-r--r--sound/soc/codecs/cs42xx8-i2c.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/sound/soc/codecs/cs42xx8-i2c.c b/sound/soc/codecs/cs42xx8-i2c.c
index a422472820..ecaebf8e1c 100644
--- a/sound/soc/codecs/cs42xx8-i2c.c
+++ b/sound/soc/codecs/cs42xx8-i2c.c
@@ -12,27 +12,21 @@
#include <linux/i2c.h>
#include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/mod_devicetable.h>
#include <linux/pm_runtime.h>
#include <sound/soc.h>
#include "cs42xx8.h"
-static const struct of_device_id cs42xx8_of_match[];
-
static int cs42xx8_i2c_probe(struct i2c_client *i2c)
{
int ret;
struct cs42xx8_driver_data *drvdata;
- const struct of_device_id *of_id;
-
- of_id = of_match_device(cs42xx8_of_match, &i2c->dev);
- if (!of_id) {
- dev_err(&i2c->dev, "failed to find driver data\n");
- return -EINVAL;
- }
- drvdata = (struct cs42xx8_driver_data *)of_id->data;
+ drvdata = (struct cs42xx8_driver_data *)i2c_get_match_data(i2c);
+ if (!drvdata)
+ return dev_err_probe(&i2c->dev, -EINVAL,
+ "failed to find driver data\n");
ret = cs42xx8_probe(&i2c->dev,
devm_regmap_init_i2c(i2c, &cs42xx8_regmap_config), drvdata);