usb: dwc3: Switch to use device_property_count_u32()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 23 Jul 2019 19:17:04 +0000 (22:17 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jul 2019 09:07:41 +0000 (11:07 +0200)
Use use device_property_count_u32() directly, that makes code neater.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20190723191704.67945-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/core.c

index c9bb93a..98bce85 100644 (file)
@@ -813,8 +813,7 @@ static void dwc3_set_incr_burst_type(struct dwc3 *dwc)
         * result = 1, means INCRx burst mode supported.
         * result > 1, means undefined length burst mode supported.
         */
-       ntype = device_property_read_u32_array(dev,
-                       "snps,incr-burst-type-adjustment", NULL, 0);
+       ntype = device_property_count_u32(dev, "snps,incr-burst-type-adjustment");
        if (ntype <= 0)
                return;