lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 16 Aug 2021 21:33:16 +0300
From:   Péter Ujfalusi <peter.ujfalusi@...il.com>
To:     Aakash Hemadri <aakashhemadri123@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Liam Girdwood <lgirdwood@...il.com>
Cc:     Takashi Iwai <tiwai@...e.com>, Jawoslav Kysela <perex@...ex.cz>,
        alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
        Shuah Khan <skhan@...uxfoundation.org>,
        Bjorn Helgaas <bjorn@...gaas.com>
Subject: Re: [PATCH 1/3] ASoC: ti: davinci-mcasp: Use of_device_get_match_data



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@...il.com>
> ---
>  sound/soc/ti/davinci-mcasp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/ti/davinci-mcasp.c b/sound/soc/ti/davinci-mcasp.c
> index 56a19eeec5c7..b26e8d324078 100644
> --- a/sound/soc/ti/davinci-mcasp.c
> +++ b/sound/soc/ti/davinci-mcasp.c
> @@ -1881,7 +1881,7 @@ static bool davinci_mcasp_have_gpiochip(struct davinci_mcasp *mcasp)
>  static int davinci_mcasp_get_config(struct davinci_mcasp *mcasp,
>  				    struct platform_device *pdev)
>  {
> -	const struct of_device_id *match = of_match_device(mcasp_dt_ids, &pdev->dev);
> +	const struct of_device_id *match = of_device_get_match_data(&pdev->dev);

No.
of_device_get_match_data() returns the match->data

>  	struct device_node *np = pdev->dev.of_node;
>  	struct davinci_mcasp_pdata *pdata = NULL;
>  	const u32 *of_serial_dir32;
> 

-- 
Péter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ