* [PATCH] usb: renesas_usbhs: Use of_device_get_match_data() helper
@ 2017-10-04 12:26 Geert Uytterhoeven
2017-10-05 9:20 ` Simon Horman
2017-10-05 10:39 ` Yoshihiro Shimoda
0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2017-10-04 12:26 UTC (permalink / raw)
To: Felipe Balbi, Yoshihiro Shimoda
Cc: Greg Kroah-Hartman, 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/renesas_usbhs/common.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
index f0ce304c5aaf54f1..32f86935d59f6b09 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -501,7 +501,6 @@ static struct renesas_usbhs_platform_info *usbhs_parse_dt(struct device *dev)
{
struct renesas_usbhs_platform_info *info;
struct renesas_usbhs_driver_param *dparam;
- const struct of_device_id *of_id = of_match_device(usbhs_of_match, dev);
u32 tmp;
int gpio;
@@ -510,7 +509,7 @@ static struct renesas_usbhs_platform_info *usbhs_parse_dt(struct device *dev)
return NULL;
dparam = &info->driver_param;
- dparam->type = of_id ? (uintptr_t)of_id->data : 0;
+ dparam->type = (uintptr_t)of_device_get_match_data(dev);
if (!of_property_read_u32(dev->of_node, "renesas,buswait", &tmp))
dparam->buswait_bwait = tmp;
gpio = of_get_named_gpio_flags(dev->of_node, "renesas,enable-gpio", 0,
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] usb: renesas_usbhs: Use of_device_get_match_data() helper
2017-10-04 12:26 [PATCH] usb: renesas_usbhs: Use of_device_get_match_data() helper Geert Uytterhoeven
@ 2017-10-05 9:20 ` Simon Horman
2017-10-05 10:39 ` Yoshihiro Shimoda
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2017-10-05 9:20 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Felipe Balbi, Yoshihiro Shimoda, Greg Kroah-Hartman, linux-usb,
linux-renesas-soc
On Wed, Oct 04, 2017 at 02:26:48PM +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] 3+ messages in thread
* RE: [PATCH] usb: renesas_usbhs: Use of_device_get_match_data() helper
2017-10-04 12:26 [PATCH] usb: renesas_usbhs: Use of_device_get_match_data() helper Geert Uytterhoeven
2017-10-05 9:20 ` Simon Horman
@ 2017-10-05 10:39 ` Yoshihiro Shimoda
1 sibling, 0 replies; 3+ messages in thread
From: Yoshihiro Shimoda @ 2017-10-05 10:39 UTC (permalink / raw)
To: Geert Uytterhoeven, Felipe Balbi
Cc: Greg Kroah-Hartman, linux-usb, linux-renesas-soc
Hi,
> From: Geert Uytterhoeven, Sent: Wednesday, October 4, 2017 9:27 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>
Best regards,
Yoshihiro Shimoda
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-05 10:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-04 12:26 [PATCH] usb: renesas_usbhs: Use of_device_get_match_data() helper Geert Uytterhoeven
2017-10-05 9:20 ` Simon Horman
2017-10-05 10:39 ` 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.