From: Jagan Teki Date: Fri, 10 Aug 2018 11:36:41 +0530 Subject: [U-Boot] [PATCH v2 23/53] reset: Add reset valid In-Reply-To: <20180810060711.6547-1-jagan@amarulasolutions.com> References: <20180810060711.6547-1-jagan@amarulasolutions.com> Message-ID: <20180810060711.6547-24-jagan@amarulasolutions.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Add reset_valid to check whether given reset is valid or not. Cc: Simon Glass Signed-off-by: Jagan Teki --- include/reset.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/reset.h b/include/reset.h index a5af31f549..70130bb886 100644 --- a/include/reset.h +++ b/include/reset.h @@ -315,4 +315,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 -- 2.18.0.321.gffc6fa0e3