Blob Blame History Raw
From 135327899d2874f2b65b3a3626b37d87df9e6a05 Mon Sep 17 00:00:00 2001
From: Hans Verkuil <hans.verkuil@cisco.com>
Date: Wed, 7 Jun 2017 11:46:09 -0300
Subject: [media] cec: add cec_phys_addr_invalidate() helper function
Git-commit: 135327899d2874f2b65b3a3626b37d87df9e6a05
Patch-mainline: v4.13-rc1
References: FATE#326289

Simplifies setting the physical address to CEC_PHYS_ADDR_INVALID.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 include/media/cec.h |   13 +++++++++++++
 1 file changed, 13 insertions(+)

--- a/include/media/cec.h
+++ b/include/media/cec.h
@@ -360,4 +360,17 @@ static inline int cec_phys_addr_validate
 
 #endif
 
+/**
+ * cec_phys_addr_invalidate() - set the physical address to INVALID
+ *
+ * @adap:	the CEC adapter
+ *
+ * This is a simple helper function to invalidate the physical
+ * address.
+ */
+static inline void cec_phys_addr_invalidate(struct cec_adapter *adap)
+{
+	cec_s_phys_addr(adap, CEC_PHYS_ADDR_INVALID, false);
+}
+
 #endif /* _MEDIA_CEC_H */