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

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

index 61b7bc5..57907f2 100644 (file)
@@ -215,7 +215,7 @@ static void *typec_mux_match(struct device_connection *con, int ep, void *data)
        }
 
        /* Alternate Mode muxes */
-       nval = fwnode_property_read_u16_array(con->fwnode, "svid", NULL, 0);
+       nval = fwnode_property_count_u16(con->fwnode, "svid");
        if (nval <= 0)
                return NULL;