summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm8985.c
diff options
context:
space:
mode:
authorStephen Kitt <steve@sk2.org>2022-03-25 19:25:15 +0300
committerMark Brown <broonie@kernel.org>2022-04-05 12:23:18 +0300
commit6d8f318b949aaa43a415947ee834890546e4e81b (patch)
tree2592ce4483df50378b00637d185f4683154ffa2f /sound/soc/codecs/wm8985.c
parentb79bd63a66894ca6c75fb9827dc8f3f7fc1233e2 (diff)
downloadlinux-6d8f318b949aaa43a415947ee834890546e4e81b.tar.xz
ASoC: wm*: use i2c_match_id and simple i2c probe
As part of the ongoing i2c transition to the simple probe ("probe_new"), this patch uses i2c_match_id to retrieve the driver_data for the probed device. The id parameter is thus no longer necessary and the simple probe can be used instead. Signed-off-by: Stephen Kitt <steve@sk2.org> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220325162515.1204107-1-steve@sk2.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/wm8985.c')
-rw-r--r--sound/soc/codecs/wm8985.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/soc/codecs/wm8985.c b/sound/soc/codecs/wm8985.c
index a7e01106fbc0..cf2c32eac773 100644
--- a/sound/soc/codecs/wm8985.c
+++ b/sound/soc/codecs/wm8985.c
@@ -1167,10 +1167,12 @@ static struct spi_driver wm8985_spi_driver = {
#endif
#if IS_ENABLED(CONFIG_I2C)
-static int wm8985_i2c_probe(struct i2c_client *i2c,
- const struct i2c_device_id *id)
+static const struct i2c_device_id wm8985_i2c_id[];
+
+static int wm8985_i2c_probe(struct i2c_client *i2c)
{
struct wm8985_priv *wm8985;
+ const struct i2c_device_id *id = i2c_match_id(wm8985_i2c_id, i2c);
int ret;
wm8985 = devm_kzalloc(&i2c->dev, sizeof *wm8985, GFP_KERNEL);
@@ -1205,7 +1207,7 @@ static struct i2c_driver wm8985_i2c_driver = {
.driver = {
.name = "wm8985",
},
- .probe = wm8985_i2c_probe,
+ .probe_new = wm8985_i2c_probe,
.id_table = wm8985_i2c_id
};
#endif