1
0
Fork 0

usb: dwc2: Switch to use device_property_count_u32()

Use use device_property_count_u32() directly, that makes code neater.

Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
alistair/sunxi64-5.4-dsi
Andy Shevchenko 2019-07-23 22:16:39 +03:00 committed by Felipe Balbi
parent 5b76f6a0b0
commit 18425e5eb0
1 changed files with 1 additions and 4 deletions

View File

@ -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,