Message ID | 20230813073458.59606-1-biju.das.jz@bp.renesas.com |
---|---|
State | Accepted |
Commit | b39eee2754e9fbcbbdd866c1aad59575d8c4342e |
Headers | show |
Series | ASoC: ak4613: Simplify probe() | expand |
On Sun, 13 Aug 2023 08:34:58 +0100, Biju Das wrote: > Simpilfy probe() by replacing of_device_get_match_data() and id lookup for > retrieving match data by i2c_get_match_data(). > > While at it, drop unused local variable np from probe(). > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: ak4613: Simplify probe() commit: b39eee2754e9fbcbbdd866c1aad59575d8c4342e All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
diff --git a/sound/soc/codecs/ak4613.c b/sound/soc/codecs/ak4613.c index ad56caec9dac..619a817ee91c 100644 --- a/sound/soc/codecs/ak4613.c +++ b/sound/soc/codecs/ak4613.c @@ -880,20 +880,11 @@ static void ak4613_parse_of(struct ak4613_priv *priv, static int ak4613_i2c_probe(struct i2c_client *i2c) { struct device *dev = &i2c->dev; - struct device_node *np = dev->of_node; const struct regmap_config *regmap_cfg; struct regmap *regmap; struct ak4613_priv *priv; - regmap_cfg = NULL; - if (np) - regmap_cfg = of_device_get_match_data(dev); - else { - const struct i2c_device_id *id = - i2c_match_id(ak4613_i2c_id, i2c); - regmap_cfg = (const struct regmap_config *)id->driver_data; - } - + regmap_cfg = i2c_get_match_data(i2c); if (!regmap_cfg) return -EINVAL;
Simpilfy probe() by replacing of_device_get_match_data() and id lookup for retrieving match data by i2c_get_match_data(). While at it, drop unused local variable np from probe(). Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> --- sound/soc/codecs/ak4613.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)