All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath10k: Use device_get_match_data() to simplify code
@ 2020-01-23 23:29 ` Stephen Boyd
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Boyd @ 2020-01-23 23:29 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-kernel, ath10k, linux-wireless, netdev

Use device_get_match_data() here to simplify the code a bit.

Signed-off-by: Stephen Boyd <swboyd@chromium.org>
---
 drivers/net/wireless/ath/ath10k/snoc.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
index 19a4d053d1de..88900f0399f5 100644
--- a/drivers/net/wireless/ath/ath10k/snoc.c
+++ b/drivers/net/wireless/ath/ath10k/snoc.c
@@ -1466,7 +1466,6 @@ MODULE_DEVICE_TABLE(of, ath10k_snoc_dt_match);
 static int ath10k_snoc_probe(struct platform_device *pdev)
 {
 	const struct ath10k_snoc_drv_priv *drv_data;
-	const struct of_device_id *of_id;
 	struct ath10k_snoc *ar_snoc;
 	struct device *dev;
 	struct ath10k *ar;
@@ -1474,14 +1473,13 @@ static int ath10k_snoc_probe(struct platform_device *pdev)
 	int ret;
 	u32 i;
 
-	of_id = of_match_device(ath10k_snoc_dt_match, &pdev->dev);
-	if (!of_id) {
+	dev = &pdev->dev;
+	drv_data = device_get_match_data(dev);
+	if (!drv_data) {
 		dev_err(&pdev->dev, "failed to find matching device tree id\n");
 		return -EINVAL;
 	}
 
-	drv_data = of_id->data;
-	dev = &pdev->dev;
 
 	ret = dma_set_mask_and_coherent(dev, drv_data->dma_mask);
 	if (ret) {
-- 
Sent by a computer, using git, on the internet


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

* [PATCH] ath10k: Use device_get_match_data() to simplify code
@ 2020-01-23 23:29 ` Stephen Boyd
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Boyd @ 2020-01-23 23:29 UTC (permalink / raw)
  To: Kalle Valo; +Cc: netdev, linux-wireless, linux-kernel, ath10k

Use device_get_match_data() here to simplify the code a bit.

Signed-off-by: Stephen Boyd <swboyd@chromium.org>
---
 drivers/net/wireless/ath/ath10k/snoc.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
index 19a4d053d1de..88900f0399f5 100644
--- a/drivers/net/wireless/ath/ath10k/snoc.c
+++ b/drivers/net/wireless/ath/ath10k/snoc.c
@@ -1466,7 +1466,6 @@ MODULE_DEVICE_TABLE(of, ath10k_snoc_dt_match);
 static int ath10k_snoc_probe(struct platform_device *pdev)
 {
 	const struct ath10k_snoc_drv_priv *drv_data;
-	const struct of_device_id *of_id;
 	struct ath10k_snoc *ar_snoc;
 	struct device *dev;
 	struct ath10k *ar;
@@ -1474,14 +1473,13 @@ static int ath10k_snoc_probe(struct platform_device *pdev)
 	int ret;
 	u32 i;
 
-	of_id = of_match_device(ath10k_snoc_dt_match, &pdev->dev);
-	if (!of_id) {
+	dev = &pdev->dev;
+	drv_data = device_get_match_data(dev);
+	if (!drv_data) {
 		dev_err(&pdev->dev, "failed to find matching device tree id\n");
 		return -EINVAL;
 	}
 
-	drv_data = of_id->data;
-	dev = &pdev->dev;
 
 	ret = dma_set_mask_and_coherent(dev, drv_data->dma_mask);
 	if (ret) {
-- 
Sent by a computer, using git, on the internet


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* Re: [PATCH] ath10k: Use device_get_match_data() to simplify code
  2020-01-23 23:29 ` Stephen Boyd
@ 2020-01-26  4:18   ` Justin Capella
  -1 siblings, 0 replies; 8+ messages in thread
From: Justin Capella @ 2020-01-26  4:18 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: Kalle Valo, LKML, ath10k, linux-wireless, netdev

Maybe use dev here as well?

>                 dev_err(&pdev->dev, "failed to find matching device tree id\n");

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

* Re: [PATCH] ath10k: Use device_get_match_data() to simplify code
@ 2020-01-26  4:18   ` Justin Capella
  0 siblings, 0 replies; 8+ messages in thread
From: Justin Capella @ 2020-01-26  4:18 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: netdev, ath10k, linux-wireless, LKML, Kalle Valo

Maybe use dev here as well?

>                 dev_err(&pdev->dev, "failed to find matching device tree id\n");

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* Re: [PATCH] ath10k: Use device_get_match_data() to simplify code
  2020-01-26  4:18   ` Justin Capella
@ 2020-01-26 14:25     ` Kalle Valo
  -1 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2020-01-26 14:25 UTC (permalink / raw)
  To: Justin Capella; +Cc: Stephen Boyd, netdev, ath10k, linux-wireless, LKML

Justin Capella <justincapella@gmail.com> writes:

> Maybe use dev here as well?
>
>>                 dev_err(&pdev->dev, "failed to find matching device tree id\n");

I changed that. And also fixed a checkpatch warning:

drivers/net/wireless/ath/ath10k/snoc.c:1483: Please don't use multiple blank lines

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

* Re: [PATCH] ath10k: Use device_get_match_data() to simplify code
@ 2020-01-26 14:25     ` Kalle Valo
  0 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2020-01-26 14:25 UTC (permalink / raw)
  To: Justin Capella; +Cc: netdev, linux-wireless, LKML, ath10k, Stephen Boyd

Justin Capella <justincapella@gmail.com> writes:

> Maybe use dev here as well?
>
>>                 dev_err(&pdev->dev, "failed to find matching device tree id\n");

I changed that. And also fixed a checkpatch warning:

drivers/net/wireless/ath/ath10k/snoc.c:1483: Please don't use multiple blank lines

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* Re: [PATCH] ath10k: Use device_get_match_data() to simplify code
  2020-01-23 23:29 ` Stephen Boyd
                   ` (2 preceding siblings ...)
  (?)
@ 2020-01-26 14:34 ` Kalle Valo
  -1 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2020-01-26 14:34 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: linux-kernel, ath10k, linux-wireless, netdev

Stephen Boyd <swboyd@chromium.org> wrote:

> Use device_get_match_data() here to simplify the code a bit.
> 
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

fa43e99dd4b7 ath10k: Use device_get_match_data() to simplify code

-- 
https://patchwork.kernel.org/patch/11349353/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

* Re: [PATCH] ath10k: Use device_get_match_data() to simplify code
  2020-01-23 23:29 ` Stephen Boyd
  (?)
  (?)
@ 2020-01-26 14:34 ` Kalle Valo
  -1 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2020-01-26 14:34 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: netdev, linux-wireless, linux-kernel, ath10k

Stephen Boyd <swboyd@chromium.org> wrote:

> Use device_get_match_data() here to simplify the code a bit.
> 
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

fa43e99dd4b7 ath10k: Use device_get_match_data() to simplify code

-- 
https://patchwork.kernel.org/patch/11349353/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

end of thread, other threads:[~2020-01-26 14:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-23 23:29 [PATCH] ath10k: Use device_get_match_data() to simplify code Stephen Boyd
2020-01-23 23:29 ` Stephen Boyd
2020-01-26  4:18 ` Justin Capella
2020-01-26  4:18   ` Justin Capella
2020-01-26 14:25   ` Kalle Valo
2020-01-26 14:25     ` Kalle Valo
2020-01-26 14:34 ` Kalle Valo
2020-01-26 14:34 ` Kalle Valo

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.