[PATCH 15/20] usb: usb251xb: convert to of_property_for_each_u32_new()
Richard Leitner
richard.leitner at linux.dev
Mon Jul 8 17:45:39 AEST 2024
Hi Luca,
On Wed, Jul 03, 2024 at 12:36:59PM GMT, Luca Ceresoli wrote:
> Simplify code using of_property_for_each_u32_new() as the two additional
> parameters in of_property_for_each_u32() are not used here.
>
> Signed-off-by: Luca Ceresoli <luca.ceresoli at bootlin.com>
please feel free to add:
Acked-by: Richard Leitner <richard.leitner at linux.dev>
> ---
> drivers/usb/misc/usb251xb.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
> index 7da404f55a6d..490004dbb9d8 100644
> --- a/drivers/usb/misc/usb251xb.c
> +++ b/drivers/usb/misc/usb251xb.c
> @@ -382,11 +382,9 @@ static void usb251xb_get_ports_field(struct usb251xb *hub,
> bool ds_only, u8 *fld)
> {
> struct device *dev = hub->dev;
> - struct property *prop;
> - const __be32 *p;
> u32 port;
>
> - of_property_for_each_u32(dev->of_node, prop_name, prop, p, port) {
> + of_property_for_each_u32_new(dev->of_node, prop_name, port) {
> if ((port >= ds_only ? 1 : 0) && (port <= port_cnt))
> *fld |= BIT(port);
> else
>
> --
> 2.34.1
More information about the Linuxppc-dev
mailing list