* [PATCH] usb: host: xhci-plat: Use of_device_get_match_data() helper
@ 2017-10-04 12:25 Geert Uytterhoeven
2017-10-05 9:19 ` Simon Horman
2017-10-05 10:38 ` Yoshihiro Shimoda
0 siblings, 2 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2017-10-04 12:25 UTC (permalink / raw)
To: Mathias Nyman, Greg Kroah-Hartman, Yoshihiro Shimoda
Cc: linux-usb, linux-renesas-soc, Geert Uytterhoeven
Use the of_device_get_match_data() helper instead of open coding.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/usb/host/xhci-plat.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index 163bafde709f79bf..a1b42348e0c8c6c8 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -16,6 +16,7 @@
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/of.h>
+#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/usb/phy.h>
#include <linux/slab.h>
@@ -152,7 +153,7 @@ MODULE_DEVICE_TABLE(of, usb_xhci_of_match);
static int xhci_plat_probe(struct platform_device *pdev)
{
- const struct of_device_id *match;
+ const struct xhci_plat_priv *priv_match;
const struct hc_driver *driver;
struct device *sysdev;
struct xhci_hcd *xhci;
@@ -238,9 +239,8 @@ static int xhci_plat_probe(struct platform_device *pdev)
}
xhci = hcd_to_xhci(hcd);
- match = of_match_node(usb_xhci_of_match, pdev->dev.of_node);
- if (match) {
- const struct xhci_plat_priv *priv_match = match->data;
+ priv_match = of_device_get_match_data(&pdev->dev);
+ if (priv_match) {
struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd);
/* Just copy data for now */
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] usb: host: xhci-plat: Use of_device_get_match_data() helper
2017-10-04 12:25 [PATCH] usb: host: xhci-plat: Use of_device_get_match_data() helper Geert Uytterhoeven
@ 2017-10-05 9:19 ` Simon Horman
2017-10-05 10:12 ` Mathias Nyman
2017-10-05 10:38 ` Yoshihiro Shimoda
1 sibling, 1 reply; 5+ messages in thread
From: Simon Horman @ 2017-10-05 9:19 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Mathias Nyman, Greg Kroah-Hartman, Yoshihiro Shimoda, linux-usb,
linux-renesas-soc
On Wed, Oct 04, 2017 at 02:25:03PM +0200, Geert Uytterhoeven wrote:
> Use the of_device_get_match_data() helper instead of open coding.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] usb: host: xhci-plat: Use of_device_get_match_data() helper
2017-10-05 9:19 ` Simon Horman
@ 2017-10-05 10:12 ` Mathias Nyman
2017-10-06 9:26 ` Simon Horman
0 siblings, 1 reply; 5+ messages in thread
From: Mathias Nyman @ 2017-10-05 10:12 UTC (permalink / raw)
To: Simon Horman, Geert Uytterhoeven
Cc: Greg Kroah-Hartman, Yoshihiro Shimoda, linux-usb,
linux-renesas-soc
On 05.10.2017 12:19, Simon Horman wrote:
> On Wed, Oct 04, 2017 at 02:25:03PM +0200, Geert Uytterhoeven wrote:
>> Use the of_device_get_match_data() helper instead of open coding.
>>
>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
>
>
Thanks, I already applied and sent forward before this new reviewed-by tag
-Mathias
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] usb: host: xhci-plat: Use of_device_get_match_data() helper
2017-10-05 10:12 ` Mathias Nyman
@ 2017-10-06 9:26 ` Simon Horman
0 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2017-10-06 9:26 UTC (permalink / raw)
To: Mathias Nyman
Cc: Geert Uytterhoeven, Greg Kroah-Hartman, Yoshihiro Shimoda,
linux-usb, linux-renesas-soc
On Thu, Oct 05, 2017 at 01:12:01PM +0300, Mathias Nyman wrote:
> On 05.10.2017 12:19, Simon Horman wrote:
> >On Wed, Oct 04, 2017 at 02:25:03PM +0200, Geert Uytterhoeven wrote:
> >>Use the of_device_get_match_data() helper instead of open coding.
> >>
> >>Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> >
> >Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
> >
> >
>
> Thanks, I already applied and sent forward before this new reviewed-by tag
Thanks, sorry for not noticing that.
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] usb: host: xhci-plat: Use of_device_get_match_data() helper
2017-10-04 12:25 [PATCH] usb: host: xhci-plat: Use of_device_get_match_data() helper Geert Uytterhoeven
2017-10-05 9:19 ` Simon Horman
@ 2017-10-05 10:38 ` Yoshihiro Shimoda
1 sibling, 0 replies; 5+ messages in thread
From: Yoshihiro Shimoda @ 2017-10-05 10:38 UTC (permalink / raw)
To: Geert Uytterhoeven, Mathias Nyman, Greg Kroah-Hartman
Cc: linux-usb@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Hi,
> From: Geert Uytterhoeven, Sent: Wednesday, October 4, 2017 9:25 PM
>
> Use the of_device_get_match_data() helper instead of open coding.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Thank you for the patch!
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
But, it seems too late about this Reviewed-by though...
https://marc.info/?l=linux-usb&m=150719811907415&w=2
Best regards,
Yoshihiro Shimoda
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-10-06 9:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-04 12:25 [PATCH] usb: host: xhci-plat: Use of_device_get_match_data() helper Geert Uytterhoeven
2017-10-05 9:19 ` Simon Horman
2017-10-05 10:12 ` Mathias Nyman
2017-10-06 9:26 ` Simon Horman
2017-10-05 10:38 ` Yoshihiro Shimoda
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.