From: Andy Shevchenko Date: Tue, 23 Jul 2019 19:16:39 +0000 (+0300) Subject: usb: dwc2: Switch to use device_property_count_u32() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=18425e5eb029eadbf82407d4fc224ced52fde986;p=linux.git usb: dwc2: Switch to use device_property_count_u32() Use use device_property_count_u32() directly, that makes code neater. Acked-by: Minas Harutyunyan Signed-off-by: Andy Shevchenko Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index 55f841a540158..31e090ac9f1ec 100644 --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c @@ -404,10 +404,7 @@ static void dwc2_get_device_properties(struct dwc2_hsotg *hsotg) device_property_read_u32(hsotg->dev, "g-np-tx-fifo-size", &p->g_np_tx_fifo_size); - num = device_property_read_u32_array(hsotg->dev, - "g-tx-fifo-size", - NULL, 0); - + num = device_property_count_u32(hsotg->dev, "g-tx-fifo-size"); if (num > 0) { num = min(num, 15); memset(p->g_tx_fifo_size, 0,