* [PATCH v1] usb: typec: mux: Switch to use fwnode_property_count_uXX()
@ 2019-07-23 19:47 Andy Shevchenko
2019-07-29 14:26 ` Heikki Krogerus
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2019-07-23 19:47 UTC (permalink / raw)
To: Heikki Krogerus, linux-usb, Greg Kroah-Hartman; +Cc: Andy Shevchenko
Use fwnode_property_count_uXX() directly, that makes code neater.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/usb/typec/mux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/typec/mux.c b/drivers/usb/typec/mux.c
index 61b7bc58dd81..57907f26f681 100644
--- a/drivers/usb/typec/mux.c
+++ b/drivers/usb/typec/mux.c
@@ -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;
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] usb: typec: mux: Switch to use fwnode_property_count_uXX()
2019-07-23 19:47 [PATCH v1] usb: typec: mux: Switch to use fwnode_property_count_uXX() Andy Shevchenko
@ 2019-07-29 14:26 ` Heikki Krogerus
0 siblings, 0 replies; 2+ messages in thread
From: Heikki Krogerus @ 2019-07-29 14:26 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-usb, Greg Kroah-Hartman
On Tue, Jul 23, 2019 at 10:47:26PM +0300, Andy Shevchenko wrote:
> Use fwnode_property_count_uXX() directly, that makes code neater.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/usb/typec/mux.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/typec/mux.c b/drivers/usb/typec/mux.c
> index 61b7bc58dd81..57907f26f681 100644
> --- a/drivers/usb/typec/mux.c
> +++ b/drivers/usb/typec/mux.c
> @@ -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;
>
> --
> 2.20.1
thanks,
--
heikki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-29 15:34 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:47 [PATCH v1] usb: typec: mux: Switch to use fwnode_property_count_uXX() Andy Shevchenko
2019-07-29 14:26 ` Heikki Krogerus
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).