* [PATCH v1] usb: dwc2: Switch to use device_property_count_u32()
@ 2019-07-23 19:16 Andy Shevchenko
2019-07-25 7:50 ` Minas Harutyunyan
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2019-07-23 19:16 UTC (permalink / raw)
To: Minas Harutyunyan, linux-usb, Greg Kroah-Hartman; +Cc: Andy Shevchenko
Use use device_property_count_u32() directly, that makes code neater.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/usb/dwc2/params.c | 5 +----
1 file changed, 1 insertion(+), 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,
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] usb: dwc2: Switch to use device_property_count_u32()
2019-07-23 19:16 [PATCH v1] usb: dwc2: Switch to use device_property_count_u32() Andy Shevchenko
@ 2019-07-25 7:50 ` Minas Harutyunyan
0 siblings, 0 replies; 2+ messages in thread
From: Minas Harutyunyan @ 2019-07-25 7:50 UTC (permalink / raw)
To: Andy Shevchenko, linux-usb, Greg Kroah-Hartman
On 7/23/2019 11:17 PM, Andy Shevchenko wrote:
> 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>
> drivers/usb/dwc2/params.c | 5 +----
> 1 file changed, 1 insertion(+), 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,
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-25 7:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-23 19:16 [PATCH v1] usb: dwc2: Switch to use device_property_count_u32() Andy Shevchenko
2019-07-25 7:50 ` Minas Harutyunyan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).