LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 0/3] ASoC: ti: Use of_device_get_match_data
@ 2021-08-14 20:19 Aakash Hemadri
  2021-08-14 20:19 ` [PATCH 1/3] ASoC: ti: davinci-mcasp: " Aakash Hemadri
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Aakash Hemadri @ 2021-08-14 20:19 UTC (permalink / raw)
  To: Peter Ujfalusi, Mark Brown, Liam Girdwood
  Cc: Takashi Iwai, Jawoslav Kysela, alsa-devel, linux-kernel,
	Shuah Khan, Bjorn Helgaas

Hi,
	This patch series will apply cleanly on for-next
Prefer `of_device_get_match_data` over `of_match_device`.

Aakash Hemadri (3):
  ASoC: ti: davinci-mcasp: Use of_device_get_match_data
  ASoC: ti: omap-mcbsp: Use of_device_get_match_data
  ASoC: ti: davinci-evm: Use of_device_get_match_data

 sound/soc/ti/davinci-evm.c   | 2 +-
 sound/soc/ti/davinci-mcasp.c | 2 +-
 sound/soc/ti/omap-mcbsp.c    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.32.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/3] ASoC: ti: davinci-mcasp: Use of_device_get_match_data
  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-16 18:33   ` Péter Ujfalusi
  2021-08-14 20:19 ` [PATCH 2/3] ASoC: ti: omap-mcbsp: " Aakash Hemadri
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Aakash Hemadri @ 2021-08-14 20:19 UTC (permalink / raw)
  To: Peter Ujfalusi, Mark Brown, Liam Girdwood
  Cc: Takashi Iwai, Jawoslav Kysela, alsa-devel, linux-kernel,
	Shuah Khan, Bjorn Helgaas

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/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);
 	struct device_node *np = pdev->dev.of_node;
 	struct davinci_mcasp_pdata *pdata = NULL;
 	const u32 *of_serial_dir32;
-- 
2.32.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 2/3] ASoC: ti: omap-mcbsp: Use of_device_get_match_data
  2021-08-14 20:19 [PATCH 0/3] ASoC: ti: Use of_device_get_match_data 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:35   ` Péter Ujfalusi
  2021-08-14 20:19 ` [PATCH 3/3] ASoC: ti: davinci-evm: " Aakash Hemadri
  2021-08-16 18:37 ` [PATCH 0/3] ASoC: ti: " Péter Ujfalusi
  3 siblings, 1 reply; 8+ messages in thread
From: Aakash Hemadri @ 2021-08-14 20:19 UTC (permalink / raw)
  To: Peter Ujfalusi, Mark Brown, Liam Girdwood
  Cc: Takashi Iwai, Jawoslav Kysela, alsa-devel, linux-kernel,
	Shuah Khan, Bjorn Helgaas

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);
 	if (match) {
 		struct device_node *node = pdev->dev.of_node;
 		struct omap_mcbsp_platform_data *pdata_quirk = pdata;
-- 
2.32.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 3/3] ASoC: ti: davinci-evm: Use of_device_get_match_data
  2021-08-14 20:19 [PATCH 0/3] ASoC: ti: Use of_device_get_match_data Aakash Hemadri
  2021-08-14 20:19 ` [PATCH 1/3] ASoC: ti: davinci-mcasp: " Aakash Hemadri
  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:34   ` Péter Ujfalusi
  2021-08-16 18:37 ` [PATCH 0/3] ASoC: ti: " Péter Ujfalusi
  3 siblings, 1 reply; 8+ messages in thread
From: Aakash Hemadri @ 2021-08-14 20:19 UTC (permalink / raw)
  To: Peter Ujfalusi, Mark Brown, Liam Girdwood
  Cc: Takashi Iwai, Jawoslav Kysela, alsa-devel, linux-kernel,
	Shuah Khan, Bjorn Helgaas

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/davinci-evm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/ti/davinci-evm.c b/sound/soc/ti/davinci-evm.c
index b043a0070d20..bf13f3d25cec 100644
--- a/sound/soc/ti/davinci-evm.c
+++ b/sound/soc/ti/davinci-evm.c
@@ -389,7 +389,7 @@ static int davinci_evm_probe(struct platform_device *pdev)
 	struct clk *mclk;
 	int ret = 0;
 
-	match = of_match_device(of_match_ptr(davinci_evm_dt_ids), &pdev->dev);
+	match = of_device_get_match_data(&pdev->dev);
 	if (!match) {
 		dev_err(&pdev->dev, "Error: No device match found\n");
 		return -ENODEV;
-- 
2.32.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] ASoC: ti: davinci-mcasp: Use of_device_get_match_data
  2021-08-14 20:19 ` [PATCH 1/3] ASoC: ti: davinci-mcasp: " Aakash Hemadri
@ 2021-08-16 18:33   ` Péter Ujfalusi
  0 siblings, 0 replies; 8+ messages in thread
From: Péter Ujfalusi @ 2021-08-16 18:33 UTC (permalink / raw)
  To: Aakash Hemadri, Mark Brown, Liam Girdwood
  Cc: Takashi Iwai, Jawoslav Kysela, alsa-devel, linux-kernel,
	Shuah Khan, Bjorn Helgaas



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/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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] ASoC: ti: davinci-evm: Use of_device_get_match_data
  2021-08-14 20:19 ` [PATCH 3/3] ASoC: ti: davinci-evm: " Aakash Hemadri
@ 2021-08-16 18:34   ` Péter Ujfalusi
  0 siblings, 0 replies; 8+ messages in thread
From: Péter Ujfalusi @ 2021-08-16 18:34 UTC (permalink / raw)
  To: Aakash Hemadri, Mark Brown, Liam Girdwood
  Cc: Takashi Iwai, Jawoslav Kysela, alsa-devel, linux-kernel,
	Shuah Khan, Bjorn Helgaas



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/davinci-evm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/ti/davinci-evm.c b/sound/soc/ti/davinci-evm.c
> index b043a0070d20..bf13f3d25cec 100644
> --- a/sound/soc/ti/davinci-evm.c
> +++ b/sound/soc/ti/davinci-evm.c
> @@ -389,7 +389,7 @@ static int davinci_evm_probe(struct platform_device *pdev)
>  	struct clk *mclk;
>  	int ret = 0;
>  
> -	match = of_match_device(of_match_ptr(davinci_evm_dt_ids), &pdev->dev);
> +	match = of_device_get_match_data(&pdev->dev);

incorrect,
of_device_get_match_data() is retrieving the match->data

>  	if (!match) {
>  		dev_err(&pdev->dev, "Error: No device match found\n");
>  		return -ENODEV;
> 

-- 
Péter

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] ASoC: ti: omap-mcbsp: Use of_device_get_match_data
  2021-08-14 20:19 ` [PATCH 2/3] ASoC: ti: omap-mcbsp: " Aakash Hemadri
@ 2021-08-16 18:35   ` Péter Ujfalusi
  0 siblings, 0 replies; 8+ messages in thread
From: Péter Ujfalusi @ 2021-08-16 18:35 UTC (permalink / raw)
  To: Aakash Hemadri, Mark Brown, Liam Girdwood
  Cc: Takashi Iwai, Jawoslav Kysela, alsa-devel, linux-kernel,
	Shuah Khan, Bjorn Helgaas



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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/3] ASoC: ti: Use of_device_get_match_data
  2021-08-14 20:19 [PATCH 0/3] ASoC: ti: Use of_device_get_match_data Aakash Hemadri
                   ` (2 preceding siblings ...)
  2021-08-14 20:19 ` [PATCH 3/3] ASoC: ti: davinci-evm: " Aakash Hemadri
@ 2021-08-16 18:37 ` Péter Ujfalusi
  3 siblings, 0 replies; 8+ messages in thread
From: Péter Ujfalusi @ 2021-08-16 18:37 UTC (permalink / raw)
  To: Aakash Hemadri, Mark Brown, Liam Girdwood
  Cc: Takashi Iwai, Jawoslav Kysela, alsa-devel, linux-kernel,
	Shuah Khan, Bjorn Helgaas

Hi,

On 14/08/2021 23:19, Aakash Hemadri wrote:
> Hi,
> 	This patch series will apply cleanly on for-next
> Prefer `of_device_get_match_data` over `of_match_device`.

All three patch is wrong.
Mark, please do not pick them up.

> Aakash Hemadri (3):
>   ASoC: ti: davinci-mcasp: Use of_device_get_match_data
>   ASoC: ti: omap-mcbsp: Use of_device_get_match_data
>   ASoC: ti: davinci-evm: Use of_device_get_match_data
> 
>  sound/soc/ti/davinci-evm.c   | 2 +-
>  sound/soc/ti/davinci-mcasp.c | 2 +-
>  sound/soc/ti/omap-mcbsp.c    | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 

-- 
Péter

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-08-16 18:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-14 20:19 [PATCH 0/3] ASoC: ti: Use of_device_get_match_data Aakash Hemadri
2021-08-14 20:19 ` [PATCH 1/3] ASoC: ti: davinci-mcasp: " Aakash Hemadri
2021-08-16 18:33   ` Péter Ujfalusi
2021-08-14 20:19 ` [PATCH 2/3] ASoC: ti: omap-mcbsp: " Aakash Hemadri
2021-08-16 18:35   ` Péter Ujfalusi
2021-08-14 20:19 ` [PATCH 3/3] ASoC: ti: davinci-evm: " Aakash Hemadri
2021-08-16 18:34   ` Péter Ujfalusi
2021-08-16 18:37 ` [PATCH 0/3] ASoC: ti: " Péter Ujfalusi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).