Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: dwc3-of-simple: Stop using of_reset_control_array_get() directly

Use of_reset_control_array_get_optional_exclusive() instead, it is
implemented as:

static inline struct reset_control *
of_reset_control_array_get_optional_exclusive(struct device_node *node)
{
return of_reset_control_array_get(node, false, true, true);
}

This makes the code easier to understand and removes the last remaining
direct use of of_reset_control_array_get(). No functional changes.

This change was made possible by commit f4cc91ddd856 ("usb: dwc3:
of-simple: remove Amlogic GXL and AXG compatibles"), which made the
parameters passed to of_reset_control_array_get() constant.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/20240125-dwc3-of-simple-reset-control-array-fix-v2-1-1ab6b52cad21@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Philipp Zabel and committed by
Greg Kroah-Hartman
44481a01 41fe9ea1

+1 -2
+1 -2
drivers/usb/dwc3/dwc3-of-simple.c
··· 52 52 if (of_device_is_compatible(np, "rockchip,rk3399-dwc3")) 53 53 simple->need_reset = true; 54 54 55 - simple->resets = of_reset_control_array_get(np, false, true, 56 - true); 55 + simple->resets = of_reset_control_array_get_optional_exclusive(np); 57 56 if (IS_ERR(simple->resets)) { 58 57 ret = PTR_ERR(simple->resets); 59 58 dev_err(dev, "failed to get device resets, err=%d\n", ret);