summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2017-06-07 17:46:09 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-06-20 12:51:58 +0300
commit135327899d2874f2b65b3a3626b37d87df9e6a05 (patch)
treed4f45af65796a6db33fbd6fd31df75eadcc682bb /include
parent23111ec304166750479e17318b7175ff7db0d6ac (diff)
downloadlinux-135327899d2874f2b65b3a3626b37d87df9e6a05.tar.xz
[media] cec: add cec_phys_addr_invalidate() helper function
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>
Diffstat (limited to 'include')
-rw-r--r--include/media/cec.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/media/cec.h b/include/media/cec.h
index a548b292eeb1..3ce73951591e 100644
--- a/include/media/cec.h
+++ b/include/media/cec.h
@@ -360,4 +360,17 @@ static inline int cec_phys_addr_validate(u16 phys_addr, u16 *parent, u16 *port)
#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 */