diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2019-07-23 22:16:39 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-25 12:07:41 +0300 |
commit | 07e803ec9f6be4b216b89f8530ea30d2a397696d (patch) | |
tree | 526c7d251bc1269649d8964858ddc2a2dc020f79 /drivers/usb/dwc2/params.c | |
parent | 57cd166afc4b430d7b98dca71911bfef478d236b (diff) | |
download | linux-07e803ec9f6be4b216b89f8530ea30d2a397696d.tar.xz |
usb: dwc2: Switch to use device_property_count_u32()
Use use device_property_count_u32() directly, that makes code neater.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Link: https://lore.kernel.org/r/20190723191639.67883-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc2/params.c')
-rw-r--r-- | drivers/usb/dwc2/params.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index 55f841a54015..31e090ac9f1e 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, |