From: "Péter Ujfalusi" <peter.ujfalusi@gmail.com>
To: Aakash Hemadri <aakashhemadri123@gmail.com>,
Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
Takashi Iwai <tiwai@suse.com>,
Shuah Khan <skhan@linuxfoundation.org>,
Bjorn Helgaas <bjorn@helgaas.com>
Subject: Re: [PATCH 2/3] ASoC: ti: omap-mcbsp: Use of_device_get_match_data
Date: Mon, 16 Aug 2021 21:35:15 +0300 [thread overview]
Message-ID: <ed02b26b-d1cc-dfc2-ef35-1430677fb1df@gmail.com> (raw)
In-Reply-To: <44f3b21198dd1e40e1e5e783db2b3dd76505b562.1628972198.git.aakashhemadri123@gmail.com>
On 14/08/2021 23:19, Aakash Hemadri wrote:
> Prefer `of_device_get_match_data` over `of_match_device`
>
> Retrieve OF match data using `of_device_get_match_data`, this is cleaner
> and better expresses intent.
>
> Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
> ---
> sound/soc/ti/omap-mcbsp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/ti/omap-mcbsp.c b/sound/soc/ti/omap-mcbsp.c
> index 4479d74f0a45..fcb651487854 100644
> --- a/sound/soc/ti/omap-mcbsp.c
> +++ b/sound/soc/ti/omap-mcbsp.c
> @@ -1373,7 +1373,7 @@ static int asoc_mcbsp_probe(struct platform_device *pdev)
> const struct of_device_id *match;
> int ret;
>
> - match = of_match_device(omap_mcbsp_of_match, &pdev->dev);
> + match = of_device_get_match_data(&pdev->dev);
Similarly incorrect,
of_device_get_match_data() is retrieving the match->data
> if (match) {
> struct device_node *node = pdev->dev.of_node;
> struct omap_mcbsp_platform_data *pdata_quirk = pdata;
>
--
Péter
WARNING: multiple messages have this Message-ID (diff)
From: "Péter Ujfalusi" <peter.ujfalusi@gmail.com>
To: Aakash Hemadri <aakashhemadri123@gmail.com>,
Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>
Cc: Takashi Iwai <tiwai@suse.com>, Jawoslav Kysela <perex@perex.cz>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
Shuah Khan <skhan@linuxfoundation.org>,
Bjorn Helgaas <bjorn@helgaas.com>
Subject: Re: [PATCH 2/3] ASoC: ti: omap-mcbsp: Use of_device_get_match_data
Date: Mon, 16 Aug 2021 21:35:15 +0300 [thread overview]
Message-ID: <ed02b26b-d1cc-dfc2-ef35-1430677fb1df@gmail.com> (raw)
In-Reply-To: <44f3b21198dd1e40e1e5e783db2b3dd76505b562.1628972198.git.aakashhemadri123@gmail.com>
On 14/08/2021 23:19, Aakash Hemadri wrote:
> Prefer `of_device_get_match_data` over `of_match_device`
>
> Retrieve OF match data using `of_device_get_match_data`, this is cleaner
> and better expresses intent.
>
> Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
> ---
> sound/soc/ti/omap-mcbsp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/ti/omap-mcbsp.c b/sound/soc/ti/omap-mcbsp.c
> index 4479d74f0a45..fcb651487854 100644
> --- a/sound/soc/ti/omap-mcbsp.c
> +++ b/sound/soc/ti/omap-mcbsp.c
> @@ -1373,7 +1373,7 @@ static int asoc_mcbsp_probe(struct platform_device *pdev)
> const struct of_device_id *match;
> int ret;
>
> - match = of_match_device(omap_mcbsp_of_match, &pdev->dev);
> + match = of_device_get_match_data(&pdev->dev);
Similarly incorrect,
of_device_get_match_data() is retrieving the match->data
> if (match) {
> struct device_node *node = pdev->dev.of_node;
> struct omap_mcbsp_platform_data *pdata_quirk = pdata;
>
--
Péter
next prev parent reply other threads:[~2021-08-16 18:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-14 20:19 [PATCH 0/3] ASoC: ti: Use of_device_get_match_data Aakash Hemadri
2021-08-14 20:19 ` Aakash Hemadri
2021-08-14 20:19 ` [PATCH 1/3] ASoC: ti: davinci-mcasp: " Aakash Hemadri
2021-08-14 20:19 ` Aakash Hemadri
2021-08-16 18:33 ` Péter Ujfalusi
2021-08-16 18:33 ` Péter Ujfalusi
2021-08-14 20:19 ` [PATCH 2/3] ASoC: ti: omap-mcbsp: " Aakash Hemadri
2021-08-14 20:19 ` Aakash Hemadri
2021-08-16 18:35 ` Péter Ujfalusi [this message]
2021-08-16 18:35 ` Péter Ujfalusi
2021-08-14 20:19 ` [PATCH 3/3] ASoC: ti: davinci-evm: " Aakash Hemadri
2021-08-14 20:19 ` Aakash Hemadri
2021-08-16 18:34 ` Péter Ujfalusi
2021-08-16 18:34 ` Péter Ujfalusi
2021-08-16 18:37 ` [PATCH 0/3] ASoC: ti: " Péter Ujfalusi
2021-08-16 18:37 ` Péter Ujfalusi
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=ed02b26b-d1cc-dfc2-ef35-1430677fb1df@gmail.com \
--to=peter.ujfalusi@gmail.com \
--cc=aakashhemadri123@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=bjorn@helgaas.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=tiwai@suse.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.