From: Jagan Teki Date: Mon, 6 Aug 2018 13:25:06 +0000 (+0530) Subject: reset: Add reset valid X-Git-Tag: v2025.01-rc5-pxa1908~3158^2~3 X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=652ee2788fa8310f4a38798d974b116609f9ddbf;p=u-boot.git reset: Add reset valid Add reset_valid to check whether given reset is valid or not. Cc: Simon Glass Signed-off-by: Jagan Teki --- diff --git a/include/reset.h b/include/reset.h index bc495a90c2..65aa7a4ce5 100644 --- a/include/reset.h +++ b/include/reset.h @@ -306,4 +306,15 @@ static inline int reset_release_bulk(struct reset_ctl_bulk *bulk) } #endif +/** + * reset_valid() - check if reset is valid + * + * @reset_ctl: the reset to check + * @return TRUE if valid, or FALSE + */ +static inline bool reset_valid(struct reset_ctl *reset_ctl) +{ + return !!reset_ctl->dev; +} + #endif