Use the of_device_get_match_data() helper instead of open coding.
Signed-off-by: Geert Uytterhoeven
---
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 = >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", ))
dparam->buswait_bwait = tmp;
gpio = of_get_named_gpio_flags(dev->of_node, "renesas,enable-gpio", 0,
--
2.7.4
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html