From 5a675abfe7c3f12b475cc0a6c9074a9fbe0b6bb6 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Sat, 21 Jan 2023 18:02:52 -0600 Subject: reset: Allow reset_get_by_name() with NULL name This allows devm_reset_control_get(dev, NULL) to work and get the first reset control, which is common in code ported from Linux. Signed-off-by: Samuel Holland Reviewed-by: Simon Glass Link: https://lore.kernel.org/r/20230122000252.53642-2-samuel@sholland.org --- include/reset.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/reset.h b/include/reset.h index 965f02e0cee..036a786d2ac 100644 --- a/include/reset.h +++ b/include/reset.h @@ -238,7 +238,8 @@ int reset_get_bulk(struct udevice *dev, struct reset_ctl_bulk *bulk); * * @dev: The client device. * @name: The name of the reset signal to request, within the client's - * list of reset signals. + * list of reset signals, or NULL to request the first reset + * signal in the list. * @reset_ctl: A pointer to a reset control struct to initialize. * Return: 0 if OK, or a negative error code. */ -- cgit v1.3.1