From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: "Jaroslav Kysela" <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Mark Brown" <broonie@kernel.org>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ASoC: ak4642: Simplify probe()
Date: Tue, 29 Aug 2023 18:24:29 +0300 [thread overview]
Message-ID: <ZO4NrT36gbwc27+0@smile.fi.intel.com> (raw)
In-Reply-To: <20230828180003.127896-1-biju.das.jz@bp.renesas.com>
On Mon, Aug 28, 2023 at 07:00:03PM +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() and replace
> dev_err()->dev_err_probe().
...
> - if (np) {
> - const struct of_device_id *of_id;
> -
> + if (dev_fwnode(dev)) {
Why do we need this at all?
> mcko = ak4642_of_parse_mcko(dev);
> if (IS_ERR(mcko))
> mcko = NULL;
This can suffice on its own, right?
Can be done in a separate change as a precursor to this one.
> -
> - of_id = of_match_device(ak4642_of_match, dev);
> - if (of_id)
> - drvdata = of_id->data;
> - } else {
> - const struct i2c_device_id *id =
> - i2c_match_id(ak4642_i2c_id, i2c);
> - drvdata = (const struct ak4642_drvdata *)id->driver_data;
> }
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-08-29 15:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-28 18:00 [PATCH v2] ASoC: ak4642: Simplify probe() Biju Das
2023-08-29 15:24 ` Andy Shevchenko [this message]
2023-08-29 18:02 ` Biju Das
2023-08-31 13:37 ` Andy Shevchenko
2023-08-31 14:13 ` Biju Das
2023-09-11 23:57 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZO4NrT36gbwc27+0@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=biju.das.jz@bp.renesas.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox