28 Aug
2023
28 Aug
'23
1:48 p.m.
Hi Andy Shevchenko,
Subject: Re: [PATCH] ASoC: tlv320aic32x4-i2c: Simplify probe()
On Sun, Aug 27, 2023 at 10:45:36AM +0100, Biju Das wrote:
Simplify probe() by replacing of_match_node() and i2c_match_id() with i2c_get_match_data().
...
- dev_set_drvdata(&i2c->dev, (void *)i2c_get_match_data(i2c));
You (potentially) drop const qualifier here. It's not good and it's not explained in the commit message why.
dev_set_drvdata() needs non-const void*, otherwise I get warning. The original code also use this cast. That is the reason it is not explained in commit message.
Cheers, Biju